aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2023-08-22 15:32:37 +0200
committerMichal Nasiadka <mnasiadka@gmail.com>2023-08-28 13:05:02 +0000
commit40cf91aab62481429d012c7dffbe8d5897f220de (patch)
treeda1c0d34d498069ae46f6485f33d7d4c72acbf3c /tools
parentb86c304a2987d0e60570bcd43cbb08da9b64c241 (diff)
downloadkolla-ansible-40cf91aab62481429d012c7dffbe8d5897f220de.tar.gz
kolla-ansible-40cf91aab62481429d012c7dffbe8d5897f220de.zip
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/cleanup-containers3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/cleanup-containers b/tools/cleanup-containers
index 549fa553d..d2759c598 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..."