Add retry to cinder API calls related to volume detach
When shutting down an instance for which volume needs to be
deleted, if cinder RPC timeout expires before cinder volume
driver terminates connection, then an unknown cinder exception
is received and the volume is not removed.
This fix adds a retry mechanism directly in cinder API calls
attachment_delete, terminate_connection, and detach.
Change-Id: I3c9ae47d0ceb64fa3082a01cb7df27faa4f5a00d
Closes-Bug: #1834659
(cherry picked from commit 01c334cbdd859f4e486ac2c369a4bdb3ec7709cc)
(cherry picked from commit 118ee682571a4bd41c8009dbe2e47fdd1f85a630)
Reviewed: https:/ /review. opendev. org/722783 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=1d66884af7b 945dca2831c2b2a de534d87c934c9
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 1d66884af7b945d ca2831c2b2ade53 4d87c934c9
Author: Francois Palin <email address hidden>
Date: Mon Jul 8 10:12:25 2019 -0400
Add retry to cinder API calls related to volume detach
When shutting down an instance for which volume needs to be
deleted, if cinder RPC timeout expires before cinder volume
driver terminates connection, then an unknown cinder exception
is received and the volume is not removed.
This fix adds a retry mechanism directly in cinder API calls delete, terminate_ connection, and detach.
attachment_
Change-Id: I3c9ae47d0ceb64 fa3082a01cb7df2 7faa4f5a00d e486ac2c369a4bd b3ec7709cc) 41c8009dbe2e47f dd1f85a630)
Closes-Bug: #1834659
(cherry picked from commit 01c334cbdd859f4
(cherry picked from commit 118ee682571a4bd