From: zhangchunlong1@huawei.com Date: Tue, 23 Sep 2014 07:50:27 +0000 (+0800) Subject: check the configuration item glance_num_retries X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=5e8ef9e879c66030d9eafe250748781015efd52c;p=openstack-build%2Fcinder-build.git check the configuration item glance_num_retries we need to to check the value of the configuration item glance_num_retries in the code in order to ensure the " glance_num_retries " is equal or greater than 0 Change-Id: I661ee883f3e1009e7fb242e0df2fa130eb8daa66 Closes-Bug: #1372452 --- diff --git a/cinder/image/glance.py b/cinder/image/glance.py index 16340d508..19876ed19 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -128,6 +128,13 @@ class GlanceClientWrapper(object): self.api_servers = None self.version = version + if CONF.glance_num_retries < 0: + LOG.warning(_( + "glance_num_retries shouldn't be a negative value. " + "The number of retries will be set to 0 until this is" + "corrected in the cinder.conf.")) + CONF.set_override('glance_num_retries', 0) + def _create_static_client(self, context, netloc, use_ssl, version): """Create a client that we'll use for every call.""" self.netloc = netloc