Dell PowerFlex: Fixed volume detach issue

Problem:
Volumes attached prior to the os-brick < 6.13.0 and driver < 3.6.0
release does not store ``sdc_guid``. The detach workflow introduced
in os-brick=6.13.0 and driver=3.6.0 assumes ``sdc_guid`` is present,
causing detach operations to error for legacy attachments.

Fix:
Adds backward compatibility for detach operations on legacy volumes
that do not include an sdc_guid in the connector information. When
the sdc_guid field is missing, the detachment is now handled by
os-brick to ensure successful unmap operations for legacy attachments.

Closes-Bug: #2138280
Change-Id: Iefe9dc7a411af3e01e0333e7bfe0c2dbd926d8ae
Signed-off-by: Nilesh Thathagar <nilesh.thathagar@dell.com>
This commit is contained in:
Nilesh Thathagar
2026-01-27 08:37:03 +00:00
parent d3f4f3b45e
commit 09bece4842
3 changed files with 38 additions and 15 deletions
+13 -11
View File
@@ -396,9 +396,11 @@ class ScaleIOConnector(base.BaseLinuxConnector):
}
)
if self.no_secret:
# Since there is no connector configuration,
# the driver has done mapping and set QoS.
# The new volume attachment always handle on
# the driver side.
if "sdc_guid" in connection_properties:
LOG.info("ScaleIO map volume %(volume_name)s handle on "
"driver side", {'volume_name': self.volume_name})
self.volume_path = self._find_volume_path()
device_info['path'] = self.volume_path
return device_info
@@ -519,12 +521,16 @@ class ScaleIOConnector(base.BaseLinuxConnector):
'server_ip': self.server_ip}
)
# Since there is no connector configuration,
# the driver will unmap the volume.
if self.no_secret:
if "sdc_guid" in connection_properties:
LOG.info("ScaleIO volume : (%(volume_name)s) unmap "
"handle on driver side.",
{'volume_name': self.volume_name})
return
# The old routine with connector configuration
# The legacy volume unmap handle on os-brick side
LOG.info("ScaleIO legacy volume : (%(volume_name)s) unmap "
"handle on os-brick side.",
{'volume_name': self.volume_name})
self.volume_id = self.volume_id or self._get_volume_id()
guid = self._get_guid()
@@ -603,7 +609,3 @@ class ScaleIOConnector(base.BaseLinuxConnector):
LOG.info("ScaleIO disconnect volume %(volume_id)s "
"removed at path %(path)s.",
{'volume_id': self.volume_id, 'path': path})
@property
def no_secret(self):
return not self.server_password and not self.server_token
@@ -203,11 +203,12 @@ class ScaleIOConnectorTestCase(test_connector.ConnectorTestCase):
self.connector.GET_GUID_OP_CODE)
self.get_password_mock.assert_not_called()
def test_connect_volume_with_no_secret(self):
"""Successful connect to volume with no secret"""
def test_connect_volume_with_sdc_guid(self):
"""Successful connect to volume with sdc guid"""
connection_properties = {
'scaleIO_volname': self.vol['name'],
'scaleIO_volume_id': self.vol['provider_id'],
'sdc_guid': 'fake_guid',
}
self.connector.connect_volume(connection_properties)
@@ -245,11 +246,12 @@ class ScaleIOConnectorTestCase(test_connector.ConnectorTestCase):
self.get_guid_mock.assert_called_once_with(
self.connector.GET_GUID_OP_CODE)
def test_disconnect_volume_with_no_secret(self):
"""Successful disconnect from volume with no secret"""
def test_disconnect_volume_with_sdc_guid(self):
"""Successful disconnect from volume with sdc guid"""
connection_properties = {
'scaleIO_volname': self.vol['name'],
'scaleIO_volume_id': self.vol['provider_id'],
'sdc_guid': 'fake_guid',
}
self.connector.disconnect_volume(connection_properties, None)
self.get_guid_mock.assert_not_called()
@@ -0,0 +1,19 @@
---
upgrade:
- |
With the fix for `Bug #2138280
<https://bugs.launchpad.net/cinder/+bug/2138280>`_, starting from
os-brick version 6.15.0 or later, users must retain the
`/opt/emc/scaleio/openstack/connector.conf` file for volumes that were
attached using the legacy flow prior to the 6.13.0 release, until all
such legacy volumes are detached. For volumes attached using the new
attachment flow, the `/opt/emc/scaleio/openstack/connector.conf` file is
no longer required.
fixes:
- |
PowerFlex Driver `Bug #2138280
<https://bugs.launchpad.net/cinder/+bug/2138280>`_: Fixed an issue where
detach operations failed for volumes attached before the 6.13.0
release that did not include an `sdc_guid` in the connector information.
From os-brick version 6.15.0 or later, detach operations for these legacy
volumes are handled by os-brick to ensure backward compatibility.