]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
openstack: run 20 server/deletion at a time 719/head
authorLoic Dachary <ldachary@redhat.com>
Fri, 13 Nov 2015 23:46:49 +0000 (00:46 +0100)
committerLoic Dachary <ldachary@redhat.com>
Thu, 26 Nov 2015 10:32:09 +0000 (11:32 +0100)
Signed-off-by: Loic Dachary <loic@dachary.org>
teuthology/openstack/openstack-teuthology.init

index 42c586d30b170333fb98dad8aaf6710801e14220..67f96e08aa5506c2b923052c791849123c781167 100755 (executable)
@@ -72,14 +72,10 @@ case $1 in
                 ip=$(ip a show dev eth0 | sed -n "s:.*inet \(.*\)/.*:\1:p")
                 openstack server list --long -f json | \
                     jq ".[] | select(.Properties | contains(\"ownedby='$ip'\")) | .ID" | \
-                    while read uuid ; do
-                    eval openstack server delete --wait $uuid
-                done
+                    xargs --no-run-if-empty --max-args 1 -P20 openstack server delete --wait
                 openstack volume list --long -f json | \
                     jq ".[] | select(.Properties | contains(\"ownedby='$ip'\")) | .ID" | \
-                    while read uuid ; do
-                    eval openstack volume delete $uuid
-                done
+                    xargs --no-run-if-empty --max-args 1 -P20 openstack volume delete
                 perl -pi -e 's/.*gitbuilder_host.*/gitbuilder_host: gitbuilder.ceph.com/' /home/$user/.teuthology.yaml
                 rm -fr /home/$user/src/* /tmp/stampsdir
                 ;;