Skip to content

Commit

Permalink
Merge pull request #694 from Netcracker/containerd-restart-poll
Browse files Browse the repository at this point in the history
[CPDEV-106079] add containerd health check after restart
  • Loading branch information
koryaga authored Sep 19, 2024
2 parents 8c02362 + babe06d commit f0def2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kubemarine/cri/containerd.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,12 @@ def configure_containerd(group: NodeGroup) -> RunnersGroupResult:
backup=True, sudo=True, mkdir=True)

log.debug("Restarting Containerd on %s node..." % node.get_node_name())
# to restart and wait untill containerd is up&running
node.sudo(
f"chmod 600 {os_specific_associations['config_location']} && "
f"sudo systemctl restart {os_specific_associations['service_name']} && "
f"systemctl status {os_specific_associations['service_name']}", callback=collector)
f"systemctl status {os_specific_associations['service_name']} && "
f"timeout 10 sh -c 'until sudo ctr version 2>&1; do sleep 1; done' ", callback=collector)
return collector.result


Expand Down

0 comments on commit f0def2c

Please sign in to comment.