diff options
| author | Kuo-tung Kao <jelly.k@inwinstack.com> | 2015-10-06 11:07:43 +0800 |
|---|---|---|
| committer | Kuo-tung Kao <jelly.k@inwinstack.com> | 2015-10-06 13:55:58 +0800 |
| commit | 1e86af763ba514843326885a8b172f6e548f8be4 (patch) | |
| tree | 25c3663a32aedf105be35fd134ae6cc6ddf82350 /tools | |
| parent | 3a56ce182662bcc9cf753024275034907ea36032 (diff) | |
| download | kolla-1e86af763ba514843326885a8b172f6e548f8be4.tar.gz kolla-1e86af763ba514843326885a8b172f6e548f8be4.zip | |
put conatiner name to array in cleanup-containers
The brace in string variable will not be expanded in some case.
Put conatiner name into array.
Change-Id: I2fb16e7352bd579f207efce0fb9b2565a1e7236d
Closes-Bug: #1502467
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/cleanup-containers | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/cleanup-containers b/tools/cleanup-containers index 4a539d4c8..4e5cea8e7 100755 --- a/tools/cleanup-containers +++ b/tools/cleanup-containers @@ -6,7 +6,7 @@ if [[ $(pgrep qemu) ]]; then exit 1 fi -containers_to_kill=" +containers_to_kill=( glance_{api,registry,data} \ haproxy \ heat_{api{,_cfn},engine} \ @@ -22,12 +22,13 @@ containers_to_kill=" openvswitch_{vswitchd,db} \ rabbitmq{,_data} \ rsyslog \ - swift_{account_{auditor,reaper,replicator,server},container_{auditor,expirer,replicator,server,updater},proxy_server,rsyncd}" + swift_{account_{auditor,reaper,replicator,server},container_{auditor,expirer,replicator,server,updater},proxy_server,rsyncd} +) echo "Stopping containers..." -(docker stop -t 2 ${containers_to_kill} 2>&1) > /dev/null +(docker stop -t 2 ${containers_to_kill[@]} 2>&1) > /dev/null echo "Removing containers..." -(docker rm -v -f ${containers_to_kill} 2>&1) > /dev/null +(docker rm -v -f ${containers_to_kill[@]} 2>&1) > /dev/null echo "All cleaned up!" |
