Add retry on attachment_update
In nova-live-migration job, evacuation failures are causing POST_FAILURE. As per discussion on bug, it looks like 500 is coming from cinder which is cause of this failure. Similar to attachment_delete method, this change adds a retry mechanism in cinder API calls attachment_update method. Closes-Bug: #1970642 Change-Id: I1da3c8481f7e7a1e8776cf03f5c4cf117b7fabaa
This commit is contained in:
parent
1738b52c30
commit
1f8ce3cc70
@ -873,6 +873,10 @@ class API(object):
|
||||
each.to_dict()) for each in attachments]
|
||||
|
||||
@translate_attachment_exception
|
||||
@retrying.retry(stop_max_attempt_number=5,
|
||||
retry_on_exception=lambda e:
|
||||
(isinstance(e, cinder_exception.ClientException) and
|
||||
e.code in (500, 504)))
|
||||
def attachment_update(self, context, attachment_id, connector,
|
||||
mountpoint=None):
|
||||
"""Updates the connector on the volume attachment. An attachment
|
||||
|
Loading…
x
Reference in New Issue
Block a user