Retry attachment delete API call for 504 Gateway Timeout
When cinder-api runs behind a load balancer(eg haproxy), the load
balancer can return 504 Gateway Timeout when cinder-api does not
respond within timeout. This change ensures nova retries deleting
a volume attachment in that case.
Also this change makes nova ignore 404 in the API call. This is
required because cinder might continue deleting the attachment even if
the load balancer returns 504. This also helps us in the situation
where the volume attachment was accidentally removed by users.
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /866087 /opendev. org/openstack/ nova/commit/ 3cb1e35b5e3a3f8 949bb0fd31fb8a2 46c5346703
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/victoria
commit 3cb1e35b5e3a3f8 949bb0fd31fb8a2 46c5346703
Author: Takashi Kajinami <email address hidden>
Date: Mon Jun 13 14:48:24 2022 +0900
Retry attachment delete API call for 504 Gateway Timeout
When cinder-api runs behind a load balancer(eg haproxy), the load
balancer can return 504 Gateway Timeout when cinder-api does not
respond within timeout. This change ensures nova retries deleting
a volume attachment in that case.
Also this change makes nova ignore 404 in the API call. This is
required because cinder might continue deleting the attachment even if
the load balancer returns 504. This also helps us in the situation
where the volume attachment was accidentally removed by users.
Conflicts:
nova/tests/ unit/volume/ test_cinder. py
nova/volume/ cinder. py
NOTE(melwitt): The conflicts are due to the following changes not in
Victoria:
* I23bb9e539d08f5 c6202909054c2dd 49b6c7a7a0e
(Remove six.text_type (1/2))
* I779bd1446dc1f0 70fa5100ccccda7 881fa508d79
(Remove six.text_type (2/2))
Closes-Bug: #1978444 dae7a3d53b556c6 e2a2b939989 6f8e953a30f2a11 ed4fbc2945) f0a8675e0d6f107 2e9625f570) 546e2f1c79d4336 e1e4923501) fbd8e174efbd0e0 f9d2c951ee)
Change-Id: I593011d9f4c43c
(cherry picked from commit 8f4b740ca529255
(cherry picked from commit b94ffb1123b1a6c
(cherry picked from commit 14f9b7627e8a48f
(cherry picked from commit 9b1c078112f11ea