From 084d84152a4c2fcf4c94d46d4a1a97add409bd42 Mon Sep 17 00:00:00 2001 From: Simon Dodsley Date: Thu, 8 Jun 2023 12:04:56 -0400 Subject: [PATCH] [Pure Storage] Fix failure in replication failover A previous patch incorrectly removed a call using a specific version of API as part of the replication failover process. The call being made to the backend fails as one of the parameters is not supported in later API version. This patch fixes the call to the backend to use the required API version. There are no tempest tests for replication failover, hence why the original patch passed tests. Closes-Bug: #2028380 Change-Id: Id4f5f16a04220cc880e17ffd69a8303c93a6e8ba --- cinder/volume/drivers/pure.py | 5 ++++- .../notes/pure-storage-fix-failover-fe6260a112409742.yaml | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/pure-storage-fix-failover-fe6260a112409742.yaml diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index fcaecda0885..3b0acfa9da6 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -2666,10 +2666,13 @@ class PureBaseVolumeDriver(san.SanDriver): def _async_failover_host(self, volumes, secondary_array, pg_snap): # Try to copy the flasharray as close as we can. + + # We have to rely on a call that is only available in REST API 1.3 + # therefore we have to create a temporary FlashArray for this. target_array = self._get_flasharray( secondary_array._target, api_token=secondary_array._api_token, - request_kwargs=secondary_array._request_kwargs, + rest_version='1.3', ) volume_snaps = target_array.get_volume(pg_snap['name'], diff --git a/releasenotes/notes/pure-storage-fix-failover-fe6260a112409742.yaml b/releasenotes/notes/pure-storage-fix-failover-fe6260a112409742.yaml new file mode 100644 index 00000000000..e79529216c8 --- /dev/null +++ b/releasenotes/notes/pure-storage-fix-failover-fe6260a112409742.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + [Pure Storage] 'bug #2028380 + '_: + Fixed issue with cinder replication failover failing due to + incorrect REST call.