[Pure Storage] Uniform Sync Replication disconnect

When a sync replicated volume is disconnected, the host connection
on the secondary array is not correctly removed.

This patch resolves that by ensuring the remote host connections
are also removed before the final disconnection of the volume from
the host.

Closes-Bug: #2029005
Change-Id: If1c08e918710b809ec62612e77740131914e2233
This commit is contained in:
Simon Dodsley 2023-07-29 09:51:51 -04:00
parent 4da12c70ac
commit 8e1d5b4aeb
3 changed files with 10 additions and 3 deletions

View File

@ -4252,7 +4252,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)
])

View File

@ -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
@ -3180,7 +3180,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)

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Pure Storage Cinder Driver: Fixed `bug 2029005
<https://bugs.launchpad.net/cinder/+bug/2029005>`__ to correctly
disconnect a sync replicated volume from host on the secondary
array when uniform option is set to True.