]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
openstack: global server creation lock 681/head
authorLoic Dachary <ldachary@redhat.com>
Wed, 28 Oct 2015 23:20:46 +0000 (08:20 +0900)
committerLoic Dachary <ldachary@redhat.com>
Wed, 28 Oct 2015 23:46:10 +0000 (08:46 +0900)
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 <ldachary@redhat.com>
teuthology/provision.py

index 2a54afc3887da3a83f67aec5d6866fa1aa5d6846..e839cb880d4d6c6ccc6618bfb27e6a70a6adbb27 100644 (file)
@@ -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) + "'" +