From 85fc933c2ac38d48786df3bbfa5f1a3623cfefd3 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sat, 11 Dec 2021 19:10:19 +0700 Subject: [PATCH] Attempt to autofix Docker bug --- scripts/update/01-run.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/update/01-run.sh b/scripts/update/01-run.sh index 23dbb22..cbb2c26 100755 --- a/scripts/update/01-run.sh +++ b/scripts/update/01-run.sh @@ -128,7 +128,17 @@ cat < "$UMBREL_ROOT"/statuses/update-status.json {"state": "installing", "progress": 70, "description": "Removing old containers", "updateTo": "$RELEASE"} EOF cd "$UMBREL_ROOT" -./scripts/stop +./scripts/stop || { + # If Docker fails to stop containers we're most likely hitting this Docker bug: https://github.com/moby/moby/issues/17217 + # Restarting the Docker service seems to fix it + echo "Attempting to autofix Docker failure" + cat < "$UMBREL_ROOT"/statuses/update-status.json +{"state": "installing", "progress": 70, "description": "Attempting to autofix Docker failure", "updateTo": "$RELEASE"} +EOF + sudo systemctl restart docker + sleep 1 + ./scripts/stop +} # Fix broken Nextcloud installs from Umbrel v0.4.0 to be accessible from both # .local and Tor