iscsi LUN greater than 255 are not detected

Bug #1915196 reported by Christophe Drevet-Droguet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Invalid
Undecided
Unassigned

Bug Description

Due to the way SCSCI present the LUN ID [1], linux introduce a gap after LUN 255. The presented LUN 256 is seen as LUN 16640 by linux. We have to take this into account when probing for the new volume.

So when cinder tells the volume has iSCSI LUN 256, we should check if we see LUN 16640 on the host.

I saw some logic about LUN ID being "< 256" in "os_brick/initiator/linuxscsi.py" but it doesn't seem to help on RHEL8 nodes.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1072706

Tags: iscsi
tags: added: iscsi
Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :

As far as I know os-brick handles the situation you are describing [1]

[1] https://opendev.org/openstack/os-brick/src/branch/master/os_brick/initiator/linuxscsi.py#L635

Changed in os-brick:
status: New → Invalid
Revision history for this message
Christophe Drevet-Droguet (aa-cdr) wrote :

Yes, I saw the `_format_lun_id` function that seem to address this kind of issues, although I don't really understand how it works.

The fact is that we still can't use iSCSI LUNs greater than 255, with nova. Since the only thing nova does is calling `os_brick.initiator.connect_volume()` I suppose the problem lies in os-brick.

In the ISCSIConnector class, there's the `_connect_vol` function that's in charge of scanning new devices to detect the LUN. Walking down the code, I think the issue is in the `get_hctl` function from class `LinuxSCSI`. In this function, we are looking for the provided LUN ID in the `/sys/class/scsi_host` filesystem, which is the ID provisioned by the array, instead of the actual linux LUN ID.

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.