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
bcf8bca8
Commit
bcf8bca8
authored
9 years ago
by
Jenkins
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Removes Host Cleanup from Container Cleanup Script"
parents
23a16fbc
171a64bc
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
tools/cleanup-containers
+1
-33
1 addition, 33 deletions
tools/cleanup-containers
tools/cleanup-host
+29
-0
29 additions, 0 deletions
tools/cleanup-host
with
30 additions
and
33 deletions
tools/cleanup-containers
+
1
−
33
View file @
bcf8bca8
#!/bin/bash
#!/bin/bash
# Move to top level directory
docker
rm
$@
$(
docker ps
-a
-q
)
REAL_PATH
=
$(
python
-c
"import os,sys;print os.path.realpath('
$0
')"
)
cd
"
$(
dirname
"
$REAL_PATH
"
)
/.."
.
tools/validate-docker-execute
# Remove docker containers
docker ps
-a
-q
|
while
read
-r
line
;
do
echo
"Removing docker containers"
docker
rm
-f
$line
done
# 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 namespaces 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 interfaces 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 bridges 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 interfaces on the host"
ip
link
delete
$line
type
vxlan
done
This diff is collapsed.
Click to expand it.
tools/cleanup-host
0 → 100755
+
29
−
0
View file @
bcf8bca8
#!/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
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