From 66e009abff258708acededfcaf94b83fbbbeb839 Mon Sep 17 00:00:00 2001 From: Evilham Date: Tue, 6 Sep 2022 15:04:54 +0200 Subject: [PATCH] [dd-ctl] Fix installation By toying with the new CI we discover that: Commit 075529f47278899bc1daae26a258ef059c4e20ae gets into an endless loop: WARNING:root:Could not get moodle SAML2 crt certificate. Retrying... See: https://ci.dd-work.space/#/builders/4/builds/62/steps/8/logs/stdio But by reverting 52f99c38bbe13125d5140e54dac56d2bd7e2ec43 it works as expected. See: https://ci.dd-work.space/#/builders/4/builds/67/steps/8/logs/stdio Upon investigation, we were not waiting for moodle to be fully up because 'healthy' is a substring of 'unhealthy' and grep wasn't taking that into account. --- dd-ctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dd-ctl b/dd-ctl index c276664..bb6442f 100755 --- a/dd-ctl +++ b/dd-ctl @@ -500,7 +500,7 @@ saml_certificates(){ wait_for_moodle(){ echo "Waiting for system to be fully up before customizing... It can take some minutes..." echo " (you can monitorize install with: docker logs dd-apps-moodle --follow" - while ! docker inspect -f '{{.State.Health.Status}}' dd-apps-moodle | grep -q "healthy"; do sleep 2; done + while ! docker inspect -f '{{.State.Health.Status}}' dd-apps-moodle | grep -q "^healthy$"; do sleep 2; done } upgrade_moodle(){