Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
4a1e761e
Commit
4a1e761e
authored
8 years ago
by
Jenkins
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/roles/destroy/tasks/cleanup_host.yml
+5
-1
5 additions, 1 deletion
ansible/roles/destroy/tasks/cleanup_host.yml
tools/cleanup-host
+12
-0
12 additions, 0 deletions
tools/cleanup-host
with
17 additions
and
1 deletion
ansible/roles/destroy/tasks/cleanup_host.yml
+
5
−
1
View file @
4a1e761e
---
-
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
:
...
...
This diff is collapsed.
Click to expand it.
tools/cleanup-host
+
12
−
0
View file @
4a1e761e
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment