From: Loic Dachary Date: Wed, 28 Oct 2015 23:20:46 +0000 (+0900) Subject: openstack: global server creation lock X-Git-Tag: 1.1.0~771^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=049e868d6f6d0bfe70c5d2d4a50031a8c5069b3e;p=teuthology.git openstack: global server creation lock An attempt to reduce the instance error rate on OVH. When all workers are on the same machine, it makes them wait for an instance creation to complete before running another one. If not, it is possible for 200 workers to run 200 server creation simultaneously. While this should be throttled by OVH, these bursts may be the cause for occasional instance creation errors: few tenants are likely to have such a pattern. Signed-off-by: Loic Dachary --- diff --git a/teuthology/provision.py b/teuthology/provision.py index 2a54afc38..e839cb880 100644 --- a/teuthology/provision.py +++ b/teuthology/provision.py @@ -310,7 +310,7 @@ class ProvisionOpenStack(OpenStack): net = '' flavor = self.flavor(resources_hint['machine'], config['openstack'].get('flavor-select-regexp')) - misc.sh("openstack server create" + + misc.sh("flock --close /tmp/teuthology-server-create.lock openstack server create" + " " + config['openstack'].get('server-create', '') + " -f json " + " --image '" + str(image) + "'" +