From 049e868d6f6d0bfe70c5d2d4a50031a8c5069b3e Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Thu, 29 Oct 2015 08:20:46 +0900 Subject: [PATCH] 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 --- teuthology/provision.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/provision.py b/teuthology/provision.py index 2a54afc388..e839cb880d 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) + "'" + -- 2.39.5