X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=env%2Fmetal3%2F06_host_cleanup.sh;h=a649511ff5a09cc073e6b36f1eb9c67ef839d8f3;hb=bcee4e738ce66b69957abb987dda40032264e6f7;hp=9e8fbde1ab4a83aa9afb58146c066856e8021f5a;hpb=c3b53a32784bfcb07e6d5dbe84b1b365ff691a4a;p=icn.git diff --git a/env/metal3/06_host_cleanup.sh b/env/metal3/06_host_cleanup.sh index 9e8fbde..a649511 100755 --- a/env/metal3/06_host_cleanup.sh +++ b/env/metal3/06_host_cleanup.sh @@ -1,30 +1,17 @@ #!/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 +ip link del provisioning type bridge || true -ip link set dhcp0 down -brctl delbr dhcp0 - -rm -rf ${BS_DHCP_DIR} rm -rf ${IRONIC_DATA_DIR} - -kubeadm reset -f -iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X -rm -rf $HOME/.kube/config -rm -rf /var/lib/etcd