From: Loic Dachary Date: Mon, 7 Sep 2015 11:42:19 +0000 (+0200) Subject: openstack: throttle job scheduling by default X-Git-Tag: 1.1.0~824^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=47c67d55989c53aaff1f1a13be65fe8a84247961;p=teuthology.git openstack: throttle job scheduling by default When running a suite with 50 jobs, it will schedule about 100 instance creation within less than a minute. It is likely to exceed the API quotas of the OpenStack provider (number of instance creation per minute) and lead to instance creation failures. Set the teuthology-suite to be called with --throttle 15 by default, that is about 60 / 15 = 4 * 2 = ~8 server creation per minute. http://tracker.ceph.com/issues/12977 Fixes: #12977 Signed-off-by: Loic Dachary --- diff --git a/scripts/openstack.py b/scripts/openstack.py index 4038efd2d..e0b9e049b 100644 --- a/scripts/openstack.py +++ b/scripts/openstack.py @@ -157,5 +157,14 @@ and analyze results. 'the keywords in the comma separated keyword ' 'string specified. ') ) + parser.add_argument( + '--throttle', + help=('When scheduling, wait SLEEP seconds between jobs. ' + 'Useful to avoid bursts that may be too hard on ' + 'the underlying infrastructure or exceed OpenStack API ' + 'limits (server creation per minute for instance).'), + type=int, + default=15, + ) return parser.parse_args(argv) diff --git a/teuthology/openstack/test/test_openstack.py b/teuthology/openstack/test/test_openstack.py index 9d8dcc6d7..20f2cd3c3 100644 --- a/teuthology/openstack/test/test_openstack.py +++ b/teuthology/openstack/test/test_openstack.py @@ -93,6 +93,7 @@ openstack keypair delete {key_name} || true '--timeout', '234', '--filter', 'trasher', '--filter-out', 'erasure-code', + '--throttle', '3', ] argv = (self.options + ['--upload',