handle new keystone and quantum connection errors
This commit is contained in:
parent
f34ca27c2d
commit
48deaf2c30
@ -54,7 +54,7 @@ class Puppet::Provider::Keystone < Puppet::Provider
|
||||
rv = keystone('--token', admin_token, '--endpoint', admin_endpoint, args)
|
||||
break
|
||||
rescue Exception => e
|
||||
if e.message =~ /(\(HTTP\s+400\))|(\[Errno 111\]\s+Connection\s+refused)/
|
||||
if e.message =~ /(\(HTTP\s+400\))|(\[Errno 111\]\s+Connection\s+refused)|(503\s+Service\s+Unavailable)|(Max\s+retries\s+exceeded)/
|
||||
notice("Can't connect to keystone backend. Waiting for retry...")
|
||||
retries -= 1
|
||||
sleep 2
|
||||
|
@ -108,7 +108,7 @@ class Puppet::Provider::Quantum < Puppet::Provider
|
||||
rv = quantum('--os-tenant-name', q['admin_tenant_name'], '--os-username', q['admin_user'], '--os-password', q['admin_password'], '--os-auth-url', auth_endpoint, args)
|
||||
break
|
||||
rescue Exception => e
|
||||
if e.message =~ /(\(HTTP\s+400\))|(\[Errno 111\]\s+Connection\s+refused)|(503\s+Service\s+Unavailable)/
|
||||
if e.message =~ /(\(HTTP\s+400\))|(\[Errno 111\]\s+Connection\s+refused)|(503\s+Service\s+Unavailable)|(Max\s+retries\s+exceeded)/
|
||||
notice("Can't connect to quantum backend. Waiting for retry...")
|
||||
retries -= 1
|
||||
sleep 2
|
||||
|
Loading…
Reference in New Issue
Block a user