diff --git a/cinder/common/config.py b/cinder/common/config.py index a1a3add1f..0d92d860a 100644 --- a/cinder/common/config.py +++ b/cinder/common/config.py @@ -61,6 +61,7 @@ global_opts = [ default=1, help='Version of the glance API to use'), cfg.IntOpt('glance_num_retries', + min=0, default=0, help='Number retries when downloading an image from glance'), cfg.BoolOpt('glance_api_insecure', diff --git a/cinder/image/glance.py b/cinder/image/glance.py index 1041a45c3..8acb81d44 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -36,7 +36,7 @@ from six.moves import range from six.moves import urllib from cinder import exception -from cinder.i18n import _, _LE, _LW +from cinder.i18n import _, _LE glance_opts = [ @@ -157,13 +157,6 @@ class GlanceClientWrapper(object): self.api_servers = None self.version = version - if CONF.glance_num_retries < 0: - LOG.warning(_LW( - "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