X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=env%2Fmetal3%2F06_host_cleanup.sh;h=f206d926fa7b9e064b6e8fa385ad391fba4d42a4;hb=71be2cf4ff58c75379dbc774afa3a8475e81cf59;hp=03fca87fe470fe3bb304a90cc1013f0453476e78;hpb=ec151f62b1977eb23da2c6b4ffd86b895e26e7ca;p=icn.git diff --git a/env/metal3/06_host_cleanup.sh b/env/metal3/06_host_cleanup.sh index 03fca87..f206d92 100755 --- a/env/metal3/06_host_cleanup.sh +++ b/env/metal3/06_host_cleanup.sh @@ -1,25 +1,20 @@ #!/usr/bin/env bash -set -x +set -eux -o pipefail + LIBDIR="$(dirname "$PWD")" source $LIBDIR/lib/common.sh # Kill and remove the running ironic containers -for name in ironic ironic-inspector dnsmasq httpd mariadb; do - sudo podman ps | grep -w "$name$" && sudo podman kill $name - sudo podman ps --all | grep -w "$name$" && sudo podman rm $name -f +for name in ironic ironic-inspector dnsmasq httpd mariadb ipa-downloader; do + sudo docker ps | grep -w "$name$" && sudo docker kill "$name" + sudo docker ps --all | grep -w "$name$" && sudo docker rm "$name" -f done -# Remove existing pod -if sudo podman pod exists ironic-pod ; then - sudo podman pod rm ironic-pod -f -fi - -ip link set provisioning down -brctl delbr provisioning +ip link set provisioning down || true +brctl delbr provision || true -ip link set dhcp0 down -brctl delbr dhcp0 +ip link set dhcp0 down || true +brctl delbr dhcp0 || true -rm -rf ${BS_DHCP_DIR} rm -rf ${IRONIC_DATA_DIR}