From dc8aeb49ce4ad6523e3f093fed082f78a6442814 Mon Sep 17 00:00:00 2001 From: Cory Stone Date: Fri, 16 Nov 2012 14:15:06 -0600 Subject: 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 --- nova/volume/cinder.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nova/volume') 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) -- cgit