Failure to mount volumes with LUN ID > 255

Bug #2006960 reported by Simon Dodsley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Unassigned
os-brick
Fix Released
Medium
Unassigned

Bug Description

Description of problem:

Pure Storage by default uses peripheral addressing for LUN ID < 256 while it uses flat addressing for LUN >= 256 .

When peripheral addressing is used then LUN IDs presented in iscsi portals on the storage equipment look exactly same as LUN IDs.
 0x0001 > LUN 1
 0x000a > LUN 10
 0x0021 > LUN 33

On the other hand, when flat addressing is used, LUN IDs look like having additional 0x400. This is based on the SAM-4 01b method of LUN addressing that Pure Storage uses that adds 0x4000 as a flag to indicate that it is using flat addressing.
 0x4100 > LUN 256
 0x4104 > LUN 260
 0x4110 > LUN 272

However a problem is that RHEL doesn't treat that 0x4000 separately but it mixes up it with the raw LUN ID.
This means that if RHEL scans a volume with ID >= 256, it can't use the raw LUN ID but need to increase it by 16384 so that device can be detected as expected.

$ echo '0 0 220' | sudo tee -a /sys/class/scsi_host/host<host>/scan
 -> This works because LUN ID < 256

$ echo '0 0 261' | sudo tee -a /sys/class/scsi_host/host<host>/scan
 -> This doesn't work because LUN ID >= 256

$ echo '0 0 16645' | sudo tee -a /sys/class/scsi_host/host<host>/scan
 -> This works because 261 + 16384 = 16645

Currently os-brick is not aware of this behavior.
The pure storage driver returns a raw lun id (like 261) even when lun id is greater than 255, and os-brick uses that raw lun id, and RHEL can't detect the scsi device properly.

How reproducible:
Always

Steps to Reproduce:
1. Create a volume with LUN ID > 255
2. Attach a volume to an instance

Actual results:
At some point, we stop discovering new volumes. It looks like /sys/class/scsi_host/host13/device/session7/target13:0:0/ targets goes from 13:0:0:1 to 13:0:0:255 and after that, no new luns can be mapped to the compute server. If we run "iscsiadm -m session --rescan", these LUNS will show up but instead of the expected 13:0:0:256 or 13:0:0:386, we'll have something like 13:0:0:16640.
Note that manually mounitng the volume with large LUN ID, outsode of os-brick, on the compute server succeeds, so RHEL can handle the 0x400 (bit-14) flag.

Expected results:
Volume attachment succeeds even if LUN ID > 255 and flat addressing is used.

Log files showing failure in os-brick:

cinder volume:
2023-02-03 18:16:53.740 86 DEBUG cinder.volume.drivers.pure [req-b4b278be-7356-469e-bd39-e5966cbc17a4 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Response for HTTP request [9594d706fe3c41419c99ff658e251e35]: '{'name': 'volume-0e402c43-9643-48bc-a99f-c4c11780ce38-cinder', 'created': '2023-02-03T18:01:38Z', 'source': None, 'serial': '39ACC4A0B3D148F10001E4B3', 'size': 107374182400}' wrapper /usr/lib/python3.6/site-packages/cinder/volume/drivers/pure.py:1484
2023-02-03 18:16:53.740 86 DEBUG cinder.volume.drivers.pure [req-b4b278be-7356-469e-bd39-e5966cbc17a4 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] [VAN3-A-C010-ST-P10] Leave PureISCSIDriver.initialize_connection, ret={'driver_volume_type': 'iscsi', 'data': {'target_discovered': False, 'discard': True, 'target_luns': [356, 356, 356, 356], 'target_iqns': ['iqn.2010-06.com.purestorage:flasharray.41be720d4041897f', 'iqn.2010-06.com.purestorage:flasharray.41be720d4041897f', 'iqn.2010-06.com.purestorage:flasharray.41be720d4041897f', 'iqn.2010-06.com.purestorage:flasharray.41be720d4041897f'], 'target_portals': ['10.250.50.237:3260', '10.250.50.238:3260', '10.250.50.239:3260', '10.250.50.240:3260'], 'wwn': '3624a937039acc4a0b3d148f10001e4b3'}} wrapper /usr/lib/python3.6/site-packages/cinder/volume/drivers/pure.py:181
2023-02-03 18:16:53.924 86 INFO cinder.volume.manager [req-b4b278be-7356-469e-bd39-e5966cbc17a4 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] attachment_update completed successfully.

nvoa compute:

2023-02-03 18:00:39.385 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Scanning host 11 c: 0, t: 0, l: 356) scan_iscsi /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:706
2023-02-03 18:00:39.397 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] iscsiadm ('-m', 'session'): stdout=tcp: [5] 10.250.50.237:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [6] 10.250.50.238:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [7] 10.250.50.240:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [8] 10.250.50.239:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
 stderr= _run_iscsiadm_bare /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:1144
2023-02-03 18:00:39.398 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] iscsi session list stdout=tcp: [5] 10.250.50.237:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [6] 10.250.50.238:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [7] 10.250.50.240:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [8] 10.250.50.239:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
 stderr= _run_iscsi_session /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:1133
2023-02-03 18:00:39.398 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Connected to 10.250.50.238:3260 _connect_vol /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:651
2023-02-03 18:00:39.399 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] HCTL ('12', '0', '0', 356) found on session 6 with lun 356 get_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:678
2023-02-03 18:00:39.400 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Scanning host 12 c: 0, t: 0, l: 356) scan_iscsi /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:706
2023-02-03 18:00:39.407 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] iscsiadm ('-m', 'session'): stdout=tcp: [5] 10.250.50.237:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [6] 10.250.50.238:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [7] 10.250.50.240:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [8] 10.250.50.239:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
 stderr= _run_iscsiadm_bare /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:1144
2023-02-03 18:00:39.407 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] iscsi session list stdout=tcp: [5] 10.250.50.237:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [6] 10.250.50.238:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [7] 10.250.50.240:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [8] 10.250.50.239:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
 stderr= _run_iscsi_session /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:1133
2023-02-03 18:00:39.408 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Connected to 10.250.50.239:3260 _connect_vol /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:651
2023-02-03 18:00:39.409 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] HCTL ('14', '0', '0', 356) found on session 8 with lun 356 get_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:678
2023-02-03 18:00:39.409 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Scanning host 14 c: 0, t: 0, l: 356) scan_iscsi /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:706
2023-02-03 18:00:39.432 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 5 and hctl ('11', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:39.433 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] iscsiadm ('-m', 'session'): stdout=tcp: [5] 10.250.50.237:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [6] 10.250.50.238:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [7] 10.250.50.240:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [8] 10.250.50.239:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
 stderr= _run_iscsiadm_bare /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:1144
2023-02-03 18:00:39.434 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] iscsi session list stdout=tcp: [5] 10.250.50.237:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [6] 10.250.50.238:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [7] 10.250.50.240:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
tcp: [8] 10.250.50.239:3260,1 iqn.2010-06.com.purestorage:flasharray.41be720d4041897f (non-flash)
 stderr= _run_iscsi_session /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:1133
2023-02-03 18:00:39.434 8 DEBUG os_brick.initiator.connectors.iscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Connected to 10.250.50.240:3260 _connect_vol /usr/lib/python3.6/site-packages/os_brick/initiator/connectors/iscsi.py:651
2023-02-03 18:00:39.435 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] HCTL ('13', '0', '0', 356) found on session 7 with lun 356 get_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:678
2023-02-03 18:00:39.436 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Scanning host 13 c: 0, t: 0, l: 356) scan_iscsi /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:706

...

2023-02-03 18:00:40.439 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 6 and hctl ('12', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:40.452 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 8 and hctl ('14', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:40.457 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 7 and hctl ('13', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:41.435 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 5 and hctl ('11', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:41.441 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 6 and hctl ('12', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:41.454 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 8 and hctl ('14', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:41.458 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 7 and hctl ('13', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:42.437 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 5 and hctl ('11', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:42.443 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 6 and hctl ('12', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:42.456 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 8 and hctl ('14', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:42.460 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 7 and hctl ('13', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:43.439 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Scanning host 11 c: 0, t: 0, l: 356) scan_iscsi /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:706
2023-02-03 18:00:43.444 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Scanning host 12 c: 0, t: 0, l: 356) scan_iscsi /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:706
2023-02-03 18:00:43.457 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Scanning host 14 c: 0, t: 0, l: 356) scan_iscsi /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:706
2023-02-03 18:00:43.461 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Scanning host 13 c: 0, t: 0, l: 356) scan_iscsi /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:706
2023-02-03 18:00:43.472 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 5 and hctl ('11', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:43.475 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 6 and hctl ('12', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:43.488 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 8 and hctl ('14', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:43.494 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 7 and hctl ('13', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:44.474 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 5 and hctl ('11', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:44.476 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 6 and hctl ('12', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:44.489 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 8 and hctl ('14', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:44.497 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 7 and hctl ('13', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:45.417 8 DEBUG oslo_service.periodic_task [req-06e6acfd-4697-4bb8-9b94-e88d60cc0aef - - - - -] Running periodic task ComputeManager._sync_scheduler_instance_info run_periodic_tasks /usr/lib/python3.6/site-packages/oslo_service/periodic_task.py:217
2023-02-03 18:00:45.475 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 5 and hctl ('11', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:45.477 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 6 and hctl ('12', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:45.491 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 8 and hctl ('14', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:45.506 8 DEBUG os_brick.initiator.linuxscsi [req-2b5c8045-6845-4b92-8f13-2370cf907a8c 2e8ba97a8559475c90aeaa503964f6c0 24d555e75c6c4c8cab66fa759953b547 - default default] Searching for a device in session 7 and hctl ('13', '0', '0', 356) yield: None device_name_by_hctl /usr/lib/python3.6/site-packages/os_brick/initiator/linuxscsi.py:698
2023-02-03 18:00:46.422 8 DEBUG oslo_service.periodic_task [req-06e6acfd-4697-4bb8-9b94-e88d60cc0aef - - - - -] Running periodic task ComputeManager._run_pending_deletes run_periodic_tasks /usr/lib/python3.6/site-packages/oslo_service/periodic_task.py:217

tags: added: attach lun rhel
Changed in os-brick:
importance: Undecided → Medium
Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :

The reason of this is well explain in https://bugzilla.redhat.com/show_bug.cgi?id=1975368#c5

Revision history for this message
Simon Dodsley (simon-dodsley) wrote :

Whilst modifying the underlying behaviour of the Pure storage system to change the addressing protocol used is possible (and works in tis case), this is a fix that might not be possible for different vendor's storage systems.
The underlying os-brick issue does need to be resolved to ensure that LUNs with IDs > 255 are correctly identified.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/os-brick/+/874689

Changed in os-brick:
status: New → In Progress
Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/874690

Changed in cinder:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (master)

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/874689
Committed: https://opendev.org/openstack/os-brick/commit/59961647d3c313d4014787f43f9c638313116e88
Submitter: "Zuul (22348)"
Branch: master

commit 59961647d3c313d4014787f43f9c638313116e88
Author: Gorka Eguileor <email address hidden>
Date: Tue Feb 21 19:31:38 2023 +0100

    SCSI: Support non SAM LUN addressing

    This patch adds non SAM addressing modes for LUNs, specifically for
    SAM-2 and SAM-3 flat addressing.

    Code has been manually verified on Pure storage systems that uses SAM-2
    addressing mode, because it's unusual for CI jobs to have more than
    256 LUNs on a single target.

    Closes-Bug: #2006960
    Change-Id: If32d054e8f944f162bdc8700d842134a80049877

Changed in os-brick:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 6.4.0

This issue was fixed in the openstack/os-brick 6.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/874690
Committed: https://opendev.org/openstack/cinder/commit/dad485ea665271be66beca750025e3def2a9dc05
Submitter: "Zuul (22348)"
Branch: master

commit dad485ea665271be66beca750025e3def2a9dc05
Author: Gorka Eguileor <email address hidden>
Date: Tue Feb 21 20:17:32 2023 +0100

    Pure: Report SAM-2 addressing mode for LUNs

    Pure iSCSI and FC drivers use SCSI SAM-2 addressing mode, which means
    that LUNs < 256 use peripheral mode (unmodified values) and LUNs >= 256
    use flat mode (2 higher bits of the MSB must be 01b).

    This is not the standard behavior of os-brick, which defaults to
    SAM/transparent mode.

    In this patch the Pure storage driver reports it's addressing mode so
    that LUNs with value greater than 255 can be connected by os-brick.

    Depends-On: If32d054e8f944f162bdc8700d842134a80049877
    Closes-Bug: #2006960
    Change-Id: I4abfb6de58340c5ea70e7a796326f5d2089c80eb

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/cinder/+/895910

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/895910
Committed: https://opendev.org/openstack/cinder/commit/4373aa1240c6e025064dc537272f5912aaa8cee3
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 4373aa1240c6e025064dc537272f5912aaa8cee3
Author: Gorka Eguileor <email address hidden>
Date: Tue Feb 21 20:17:32 2023 +0100

    Pure: Report SAM-2 addressing mode for LUNs

    Pure iSCSI and FC drivers use SCSI SAM-2 addressing mode, which means
    that LUNs < 256 use peripheral mode (unmodified values) and LUNs >= 256
    use flat mode (2 higher bits of the MSB must be 01b).

    This is not the standard behavior of os-brick, which defaults to
    SAM/transparent mode.

    In this patch the Pure storage driver reports it's addressing mode so
    that LUNs with value greater than 255 can be connected by os-brick.

    Depends-On: If32d054e8f944f162bdc8700d842134a80049877
    Closes-Bug: #2006960
    Change-Id: I4abfb6de58340c5ea70e7a796326f5d2089c80eb
    (cherry picked from commit dad485ea665271be66beca750025e3def2a9dc05)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 23.0.0.0rc2

This issue was fixed in the openstack/cinder 23.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/os-brick/+/905127

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/cinder/+/905129

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/905127
Committed: https://opendev.org/openstack/os-brick/commit/f80fcd0e7ad65253e5e6e93f8cd69162e6728ff3
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit f80fcd0e7ad65253e5e6e93f8cd69162e6728ff3
Author: Gorka Eguileor <email address hidden>
Date: Tue Feb 21 19:31:38 2023 +0100

    SCSI: Support non SAM LUN addressing

    This patch adds non SAM addressing modes for LUNs, specifically for
    SAM-2 and SAM-3 flat addressing.

    Code has been manually verified on Pure storage systems that uses SAM-2
    addressing mode, because it's unusual for CI jobs to have more than
    256 LUNs on a single target.

    Closes-Bug: #2006960
    Change-Id: If32d054e8f944f162bdc8700d842134a80049877
    (cherry picked from commit 59961647d3c313d4014787f43f9c638313116e88)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/os-brick/+/908923

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/908923
Committed: https://opendev.org/openstack/os-brick/commit/c625ac5551c93cb67951106de59f66bc14481861
Submitter: "Zuul (22348)"
Branch: stable/zed

commit c625ac5551c93cb67951106de59f66bc14481861
Author: Gorka Eguileor <email address hidden>
Date: Tue Feb 21 19:31:38 2023 +0100

    SCSI: Support non SAM LUN addressing

    This patch adds non SAM addressing modes for LUNs, specifically for
    SAM-2 and SAM-3 flat addressing.

    Code has been manually verified on Pure storage systems that uses SAM-2
    addressing mode, because it's unusual for CI jobs to have more than
    256 LUNs on a single target.

    Closes-Bug: #2006960
    Change-Id: If32d054e8f944f162bdc8700d842134a80049877
    (cherry picked from commit 59961647d3c313d4014787f43f9c638313116e88)
    (cherry picked from commit f80fcd0e7ad65253e5e6e93f8cd69162e6728ff3)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 6.2.3

This issue was fixed in the openstack/os-brick 6.2.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 24.0.0.0rc1

This issue was fixed in the openstack/cinder 24.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick zed-eom

This issue was fixed in the openstack/os-brick zed-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.