mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
salt: Try 'systemctl' if 'service' command fails when restarting docker.
This commit is contained in:
parent
3e04a45a95
commit
05087612b9
@ -51,7 +51,11 @@ while true; do
|
|||||||
if [[ $loadedImageFlags == 7 ]]; then break; fi
|
if [[ $loadedImageFlags == 7 ]]; then break; fi
|
||||||
|
|
||||||
# Sometimes docker load hang, restart docker daemon resolve the issue
|
# Sometimes docker load hang, restart docker daemon resolve the issue
|
||||||
if [[ $restart_docker ]]; then service docker restart; fi
|
if [[ $restart_docker ]]; then
|
||||||
|
if ! service docker restart; then # Try systemctl if there's no service command.
|
||||||
|
systemctl restart docker
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# sleep for 15 seconds before attempting to load docker images again
|
# sleep for 15 seconds before attempting to load docker images again
|
||||||
sleep 15
|
sleep 15
|
||||||
|
Loading…
Reference in New Issue
Block a user