From 75469ffcb05e9082c8b5e18cf446528851533921 Mon Sep 17 00:00:00 2001 From: Simon Dodsley Date: Tue, 26 Aug 2025 12:12:56 -0400 Subject: [PATCH] [Pure Storage] Fix volume reconnect error When trying to connect a volume to a host when it is already connected will result in an AttributeError. This patch resolves that issue. Closes-Bug: #2121464 Change-Id: Ia251f9fa808a77e046da5726bb225ac66bacfc61 Signed-off-by: Simon Dodsley --- cinder/volume/drivers/pure.py | 2 +- .../notes/pure_reconnect_failure-7bbc135eecc77695.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/pure_reconnect_failure-7bbc135eecc77695.yaml diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 4a524ea245e..e4b63195577 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -3637,7 +3637,7 @@ class PureISCSIDriver(PureBaseVolumeDriver, san.SanISCSIDriver): for array in target_arrays: connection = self._connect(array, pure_vol_name, connector, chap_username, chap_password) - if not connection[0].lun: + if not connection[0]['lun']: # Swallow any exception, just warn and continue LOG.warning("self._connect failed.") continue diff --git a/releasenotes/notes/pure_reconnect_failure-7bbc135eecc77695.yaml b/releasenotes/notes/pure_reconnect_failure-7bbc135eecc77695.yaml new file mode 100644 index 00000000000..f010d197e05 --- /dev/null +++ b/releasenotes/notes/pure_reconnect_failure-7bbc135eecc77695.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Pure Storage `bug #2121464 + `_: Fixed + ``AttributeError`` when trying to connect a volume to a host when + the volume is already connected to the host.