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
This commit is contained in:
zhangchunlong1@huawei.com 2014-09-23 15:50:27 +08:00
parent db2c817fc7
commit 5e8ef9e879

View File

@ -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