diff --git a/cinder/tests/unit/volume/drivers/test_pure.py b/cinder/tests/unit/volume/drivers/test_pure.py index c1ab8e67f84..0dc0e40bbc7 100644 --- a/cinder/tests/unit/volume/drivers/test_pure.py +++ b/cinder/tests/unit/volume/drivers/test_pure.py @@ -4254,7 +4254,7 @@ class PureFCDriverTestCase(PureBaseSharedDriverTestCase): self.driver.terminate_connection(vol, FC_CONNECTOR) mock_disconnect.assert_has_calls([ mock.call(mock_secondary, vol, FC_CONNECTOR, - is_multiattach=False, remove_remote_hosts=False), + is_multiattach=False, remove_remote_hosts=True), mock.call(self.array, vol, FC_CONNECTOR, is_multiattach=False, remove_remote_hosts=False) ]) diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index c13b09dfdec..c6dc6f31f2b 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -927,7 +927,7 @@ class PureBaseVolumeDriver(san.SanDriver): for array in self._uniform_active_cluster_target_arrays: try: self._disconnect(array, volume, connector, - remove_remote_hosts=False, + remove_remote_hosts=True, is_multiattach=multiattach) except purestorage.PureError as err: # Swallow any exception, just warn and continue @@ -3273,7 +3273,7 @@ class PureFCDriver(PureBaseVolumeDriver, driver.FibreChannelDriver): for array in self._uniform_active_cluster_target_arrays: try: no_more_connections = self._disconnect( - array, volume, connector, remove_remote_hosts=False, + array, volume, connector, remove_remote_hosts=True, is_multiattach=multiattach) if no_more_connections: unused_wwns += self._get_array_wwns(array) diff --git a/releasenotes/notes/pure_uniform_disconnect_bug-357c849bf12e8832.yaml b/releasenotes/notes/pure_uniform_disconnect_bug-357c849bf12e8832.yaml new file mode 100644 index 00000000000..e516e53fce4 --- /dev/null +++ b/releasenotes/notes/pure_uniform_disconnect_bug-357c849bf12e8832.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Pure Storage Cinder Driver: Fixed `bug 2029005 + `__ to correctly + disconnect a sync replicated volume from host on the secondary + array when uniform option is set to True.