Skip to content

Commit

Permalink
fix: prevent race condition with docker/moby install (Azure#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon authored and Justin Hackett committed Mar 14, 2019
1 parent 11aef4c commit d8ae889
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion parts/k8s/kubernetescustomscript.sh
Expand Up @@ -46,7 +46,6 @@ if [ -f /var/log/azure/golden-image-install.complete ]; then
echo "detected golden image pre-install"
FULL_INSTALL_REQUIRED=false
rm -rf /home/packer
cleanUpContainerImages
else
FULL_INSTALL_REQUIRED=true
fi
Expand Down Expand Up @@ -165,6 +164,10 @@ echo `date`,`hostname`, endcustomscript>>/opt/m
mkdir -p /opt/azure/containers && touch /opt/azure/containers/provision.complete
ps auxfww > /opt/azure/provision-ps.log &

if ! $FULL_INSTALL_REQUIRED; then
cleanUpContainerImages
fi

if $REBOOTREQUIRED; then
echo 'reboot required, rebooting node in 1 minute'
/bin/bash -c "shutdown -r 1 &"
Expand Down
2 changes: 1 addition & 1 deletion parts/k8s/kubernetesinstalls.sh
Expand Up @@ -15,7 +15,7 @@ removeEtcd() {
}

removeMoby() {
sudo apt-get purge moby-engine moby-cli
sudo apt-get purge -y moby-engine moby-cli
}

installEtcd() {
Expand Down

0 comments on commit d8ae889

Please sign in to comment.