Skip to content
Snippets Groups Projects
Commit 4a1e761e authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Keepalived leaves VIP on the host in case of accidental removal."

parents b10e2928 b6de8fdc
No related branches found
No related tags found
No related merge requests found
---
- name: Destroying Kolla host configuration
command: /tmp/kolla-cleanup/tools/cleanup-host
command: >
env enable_haproxy={{ enable_haproxy }}
kolla_internal_vip_address={{ kolla_internal_vip_address }}
kolla_external_vip_address={{ kolla_external_vip_address }}
/tmp/kolla-cleanup/tools/cleanup-host
- name: Destroying kolla-cleanup folder
file:
......
......@@ -27,6 +27,18 @@ ip -o link show | awk -F': ' '/vxlan/{print $2}' | while read -r ifname ; do
ip link delete $ifname type vxlan
done
# Keepalived leaves VIP on the host in case of accidental removal.
# This snippet removes VIPs.
if [[ "$enable_haproxy" == "yes" ]]; then
ip -o addr list | awk '{print $2,$4}' | cut -d/ -f1 | while read -r ifname ifaddr ; do
if [[ "$kolla_internal_vip_address" == "$ifaddr" ||
"$kolla_external_vip_address" == "$ifaddr" ]]; then
echo "Removing VIP $ifaddr on the host"
ip addr delete dev $ifname $ifaddr
fi
done
fi
echo "Creating a fstab backup..."
sudo cp /etc/fstab /etc/fstab_backup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment