[Pure Storage] Add check for NVMe-FC capable array

Recent arrays can handle both traditional FC and NVMe-FC ports.
The FC (scsi) driver should not be touching NVMe-FC ports because
that could create zones through FCZM that cross both FC types,
so this check makes sure the driver only uses wwns that do not
have an associated nqn.

Change-Id: I189b556e1ca643635faae5eb5382bd6caa68aa4c
This commit is contained in:
Simon Dodsley 2021-10-28 09:55:27 -04:00
parent 3680ed3284
commit 25f2e27b21
3 changed files with 18 additions and 1 deletions

View File

@ -150,11 +150,13 @@ FC_PORTS = [{"name": name,
"iqn": None,
"portal": None,
"wwn": wwn,
"nqn": None,
} for name, wwn in zip(FC_PORT_NAMES, FC_WWNS)]
AC_FC_PORTS = [{"name": name,
"iqn": None,
"portal": None,
"wwn": wwn,
"nqn": None,
} for name, wwn in zip(FC_PORT_NAMES, AC_FC_WWNS)]
NON_ISCSI_PORT = {
"name": "ct0.fc1",

View File

@ -2816,7 +2816,17 @@ class PureFCDriver(PureBaseVolumeDriver, driver.FibreChannelDriver):
def _get_array_wwns(array):
"""Return list of wwns from the array"""
ports = array.list_ports()
return [port["wwn"] for port in ports if port["wwn"]]
try:
valid_ports = [
port["wwn"]
for port in ports
if port["wwn"] and not port["nqn"]
]
except KeyError: # Older array code versions will not return nqn
valid_ports = [
port["wwn"] for port in ports if port["wwn"]
]
return valid_ports
@pure_driver_debug_trace
def initialize_connection(self, volume, connector):

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Pure Storage Driver: Add internal check to allow for FlashArray with
joint FC and NVMe-FC support