refactoring metal3 code
[icn.git] / env / metal3 / 06_host_cleanup.sh
index 9e8fbde..15792b2 100755 (executable)
@@ -6,15 +6,10 @@ 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
+    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
 
@@ -24,7 +19,8 @@ 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
+#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