[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 <simon@purestorage.com>
This commit is contained in:
Simon Dodsley
2025-08-26 12:12:56 -04:00
committed by Rajat Dhasmana
parent 7ee3678b16
commit 75469ffcb0
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -0,0 +1,7 @@
---
fixes:
- |
Pure Storage `bug #2121464
<https://bugs.launchpad.net/cinder/+bug/2121464>`_: Fixed
``AttributeError`` when trying to connect a volume to a host when
the volume is already connected to the host.