From 40cf91aab62481429d012c7dffbe8d5897f220de Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Tue, 22 Aug 2023 15:32:37 +0200 Subject: [PATCH] cleanup: fix cleanup containers Currently the script only stops containers and removes services, without disabling service or removing symlink - which renders the service in a not-found state. After we disable and stop - some of the services end up in failed state (due to wrong exit codes for various reasons) - running reset-failed fixes that. Change-Id: I637783ce758dbf1c2a7b4b99aa6b61e2c5ca1460 --- tools/cleanup-containers | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/cleanup-containers b/tools/cleanup-containers index 549fa553d4..d2759c598a 100755 --- a/tools/cleanup-containers +++ b/tools/cleanup-containers @@ -42,7 +42,10 @@ fi echo "Stopping containers..." for container in ${containers_to_kill}; do +sudo systemctl disable kolla-${container}-container.service sudo systemctl stop kolla-${container}-container.service +sudo systemctl is-failed kolla-${container}-container.service && \ +sudo systemctl reset-failed kolla-${container}-container.service done echo "Removing containers..."