X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=env%2Fmetal3%2F06_host_cleanup.sh;h=a649511ff5a09cc073e6b36f1eb9c67ef839d8f3;hb=038ef9e91d14bb90a81a6273a461a6472e18b408;hp=15792b25ccf6797dd573b722fde4701b8772362a;hpb=b82ae6975d26581802457364993bee061350ae32;p=icn.git diff --git a/env/metal3/06_host_cleanup.sh b/env/metal3/06_host_cleanup.sh index 15792b2..a649511 100755 --- a/env/metal3/06_host_cleanup.sh +++ b/env/metal3/06_host_cleanup.sh @@ -1,26 +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 docker ps | grep -w "$name$" && sudo docker kill $name - sudo docker ps --all | grep -w "$name$" && sudo docker 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 -ip link set provisioning down -brctl delbr provisioning - -ip link set dhcp0 down -brctl delbr dhcp0 +ip link set provisioning down || true +ip link del provisioning type bridge || true -rm -rf ${BS_DHCP_DIR} rm -rf ${IRONIC_DATA_DIR} - -#Kubeadm usage is deprecated in v1.0.0 -#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