os-brick/releasenotes/notes
Gorka Eguileor 2e46deeaa1 Fix FC scan too broad
After some changes to the FC connector we have introduced a regression
on the way we do the scans, and we end up scanning using wildcards even
though we shouldn't.

The targets in the "initiator_target_map" don't mean that they are all
connected, so we must take that into account.

With the current code, if we have the following connections:

HBA host7 ---- SWITCH ---- port W (channel 0, target 2)
          \--- SWITCH ---- port X (channel 0, target 3)

HBA host8 ---- SWITCH ---- port Y (channel 0, target 2)
          \--- SWITCH ---- port Z (channel 0, target 3)

We will end up with the following scans 8 scans for LUN L:

  - - L > host7
  - - L > host7
  0 2 L > host7
  0 3 L > host7

  0 2 L > host8
  0 3 L > host8
  - - L > host8
  - - L > host8

Which correspond to the responses from _get_hba_channel_scsi_target like
this:

               port Y          port Z          port W          port X
  host7 ... ['-','-',L]     ['-','-',L]     ['0','2',L]     ['0','3',L]
  host8 ... ['0','2',L]     ['0','3',L]     ['-','-',L]     ['-','-',L]

And we should only be doing 4 scans:

  0 2 L > host7
  0 3 L > host7
  0 2 L > host8
  0 3 L > host8

Most storage arrays get their target ports automatically detected by the
Linux FC initiator and sysfs gets populated with that information, but
there are some that don't.

We'll do a narrow scan using the channel, target, and LUN for the former
and a wider scan for the latter.

If all paths to a former type of array were down on the system boot the
array could look like it's of the latter type and make us bring us
unwanted volumes into the system by doing a broad scan.

To prevent this from happening Cinder drivers can use the
"enable_wildcard_scan" key in the connection information to let us know
they don't want us to do broad scans even if no target ports are found
(because they know the cause is there's no connection).

Close-Bug: #1849504
Related-Bug: #1765000
Related-Bug: #1828440
Change-Id: I5dbefaff43fb902b15117b443fc92f7b6a6ad8c9
(cherry picked from commit 708733e495)
(cherry picked from commit c76b6dc514)
(cherry picked from commit 8933503041)
2019-11-27 19:32:09 +01:00
..
add-vstorage-protocol-b536f4e21d764801.yaml Add missing release notes 2016-02-14 10:32:06 -06:00
add-windows-fibre-channel-030c095c149da321.yaml Add Windows Fibre Channel connector 2016-08-04 23:12:09 +03:00
add-windows-iscsi-15d6b1392695f978.yaml release note for windows iSCSI 2016-07-05 15:23:05 -07:00
add-windows-smbfs-d86edaa003130a31.yaml Add Windows SMBFS connector 2016-08-04 23:07:01 +03:00
add_custom_keyring_for_rbd_connection-eccbaae9ee5f3491.yaml RBD: consider a custom keyring in connection info 2017-03-28 15:51:44 +00:00
bug-1722432-2408dab55c903c5b.yaml Update supported transports for iscsi connector 2018-01-16 15:01:53 +08:00
delay-legacy-encryption-provider-name-deprecation-c0d07be3f0d92afd.yaml encryptors: Delay removal of legacy provider names 2017-05-16 08:27:12 +00:00
fc-always-check-single-wwnn-1595689da0eb673b.yaml FC: Ignore some HBAs from map for single WWNN 2019-07-02 00:58:42 +00:00
fix-fc-scan-too-broad-3c576e1846b7f05f.yaml Fix FC scan too broad 2019-11-27 19:32:09 +01:00
fix-multipath-disconnect-819d01e6e981883e.yaml Fix multipath disconnect with path failure 2018-08-21 11:46:42 -05:00
introduce-encryption-provider-constants-a7cd0ce58da2bae8.yaml encryptors: Introduce encryption provider constants 2017-01-10 12:11:35 +00:00
iscsi_manual_scan_support-d64a1c3c8e1986b4.yaml Add open-iscsi manual scan support 2017-06-16 16:09:35 +02:00
local-attach-in-rbd-connector-c06347fb164b084a.yaml Local attach feature in RBD connector 2016-07-26 18:37:14 +00:00
multipath-improvements-596c2c6eadfba6ea.yaml Add missing release notes 2016-02-14 10:32:06 -06:00
refactor_iscsi_connect-dfbb24305a954783.yaml Refactor iSCSI connect 2017-06-16 16:09:35 +02:00
refactor_iscsi_disconnect-557f4173bc1ae4ed.yaml Refactor iSCSI disconnect 2017-05-31 15:31:20 +02:00
remove-old-constants-20021f5b30bde890.yaml Fix a typographical error in a release notes entry. 2017-11-27 14:36:49 +02:00
start-using-reno-23e8d5f1a30851a1.yaml Add reno for release notes management 2016-01-20 19:19:36 -06:00
veritas-hyperscale-connector-fe56cec68b1947cd.yaml os-brick connector for Veritas HyperScale 2017-04-11 17:45:34 +05:30
vmware-vmdk-connector-19e6999e6cae43cd.yaml Add connector for vmdk volumes 2016-08-09 17:23:30 +05:30