From 6f93a1d9dc51e6766958f2133fa325d003710e8a Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sat, 14 Nov 2015 00:46:49 +0100 Subject: [PATCH] openstack: run 20 server/deletion at a time Signed-off-by: Loic Dachary --- teuthology/openstack/openstack-teuthology.init | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/teuthology/openstack/openstack-teuthology.init b/teuthology/openstack/openstack-teuthology.init index 42c586d30b..67f96e08aa 100755 --- a/teuthology/openstack/openstack-teuthology.init +++ b/teuthology/openstack/openstack-teuthology.init @@ -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 ;; -- 2.39.5