Merge "Remove /etc/fstab Swift references during cleanup-host"

This commit is contained in:
Jenkins 2017-05-11 07:59:04 +00:00 committed by Gerrit Code Review
commit 6db0c9292b
2 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,7 @@
- name: Destroying Kolla host configuration - name: Destroying Kolla host configuration
command: > command: >
env enable_haproxy={{ enable_haproxy }} env enable_haproxy={{ enable_haproxy }}
enable_swift={{ enable_swift }}
kolla_internal_vip_address={{ kolla_internal_vip_address }} kolla_internal_vip_address={{ kolla_internal_vip_address }}
kolla_external_vip_address={{ kolla_external_vip_address }} kolla_external_vip_address={{ kolla_external_vip_address }}
/tmp/kolla-cleanup/tools/cleanup-host /tmp/kolla-cleanup/tools/cleanup-host

View File

@ -45,6 +45,12 @@ done
echo "Removing ceph references from fstab..." echo "Removing ceph references from fstab..."
sudo sed -i '/\/var\/lib\/ceph\/osd\//d' /etc/fstab sudo sed -i '/\/var\/lib\/ceph\/osd\//d' /etc/fstab
if [[ "$enable_swift" == "yes" ]]; then
echo "Removing swift references from fstab..."
cat /etc/fstab | grep "/srv/node/d*" | xargs umount
sed -i '/\/srv\/node\//d' /etc/fstab
fi
echo "Getting folders name..." echo "Getting folders name..."
FOLDER_PATH="/etc/kolla/" FOLDER_PATH="/etc/kolla/"
for dir in $FOLDER_PATH*; do for dir in $FOLDER_PATH*; do