diff options
author | Cory Stone <corystone@gmail.com> | 2012-11-16 14:15:06 -0600 |
---|---|---|
committer | Cory Stone <corystone@gmail.com> | 2013-01-07 14:57:27 -0600 |
commit | dc8aeb49ce4ad6523e3f093fed082f78a6442814 (patch) | |
tree | 79c4f459a2dbe200dcb10c8125a52bf0740a8e0d /nova/volume | |
parent | e1c7b18c7f3c8d97ba7b2cccf27b968ad4710735 (diff) | |
download | nova-dc8aeb49ce4ad6523e3f093fed082f78a6442814.tar.gz nova-dc8aeb49ce4ad6523e3f093fed082f78a6442814.tar.xz nova-dc8aeb49ce4ad6523e3f093fed082f78a6442814.zip |
Support cinderclient http retries.
HTTP retries were recently added to cinderclient. This adds the
config option required to use it. The default (unchanged) behavior
is 0 retries.
Change-Id: Ia7ad831045e8df9ad9c22f0119ae3485d91ad949
Diffstat (limited to 'nova/volume')
-rw-r--r-- | nova/volume/cinder.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/volume/cinder.py b/nova/volume/cinder.py index 04c151d1e..514295605 100644 --- a/nova/volume/cinder.py +++ b/nova/volume/cinder.py @@ -42,6 +42,9 @@ cinder_opts = [ default=None, help='Override service catalog lookup with template for cinder ' 'endpoint e.g. http://localhost:8776/v1/%(project_id)s'), + cfg.IntOpt('cinder_http_retries', + default=3, + help='Number of cinderclient retries on failed http calls'), ] CONF = cfg.CONF @@ -72,7 +75,8 @@ def cinderclient(context): c = cinder_client.Client(context.user_id, context.auth_token, project_id=context.project_id, - auth_url=url) + auth_url=url, + retries=CONF.cinder_http_retries) # noauth extracts user_id:project_id from auth_token c.client.auth_token = context.auth_token or '%s:%s' % (context.user_id, context.project_id) |