diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-07-23 15:52:56 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-07-23 15:52:56 +0000 |
| commit | bcf8bca80892ded82d5eedf43dfc0842f65a2501 (patch) | |
| tree | 3632f57efc162d63c2330856c7255562653339f4 /tools/cleanup-host | |
| parent | 23a16fbcdefa08b3495ba37c67ccbac369abd2e8 (diff) | |
| parent | 171a64bcd8deaee2ddfa59688b5c886cafd8a857 (diff) | |
| download | kolla-bcf8bca80892ded82d5eedf43dfc0842f65a2501.tar.gz kolla-bcf8bca80892ded82d5eedf43dfc0842f65a2501.zip | |
Merge "Removes Host Cleanup from Container Cleanup Script"
Diffstat (limited to 'tools/cleanup-host')
| -rwxr-xr-x | tools/cleanup-host | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/cleanup-host b/tools/cleanup-host new file mode 100755 index 000000000..c38dace43 --- /dev/null +++ b/tools/cleanup-host @@ -0,0 +1,29 @@ +#!/bin/bash + +. tools/validate-docker-execute + +# Move to top level directory +REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')") +cd "$(dirname "$REAL_PATH")/.." + +# Spawning the neutron-agents container leaves artifacts on the host. +# This script removes these artifacts. +ip netns list | while read -r line ; do + echo "Removing network namespace $line on the host" + ip netns delete $line +done + +ifconfig | grep tap | awk '{print $1;}'| cut -f1 -d':' | while read -r line ; do + echo "Removing tap interface $line on the host" + ip link delete $line type veth +done + +ifconfig | grep brq | awk '{print $1;}'| cut -f1 -d':' | while read -r line ; do + echo "Removing linux bridge $line on the host" + ip link delete $line type bridge +done + +ifconfig | grep vxlan | awk '{print $1;}'| cut -f1 -d':' | while read -r line ; do + echo "Removing vxlan interface $line on the host" + ip link delete $line type vxlan +done |
