Bug 1170447 - [RFE][nova]: hw-iscsi-device-name-support
Summary: [RFE][nova]: hw-iscsi-device-name-support
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: Upstream M2
: 7.0 (Kilo)
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/nova...
Whiteboard: upstream_milestone_kilo-2 upstream_de...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-04 05:03 UTC by RHOS Integration
Modified: 2019-09-09 15:48 UTC (History)
11 users (show)

Fixed In Version: openstack-nova-2015.1.0-10.el7ost
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-05 13:19:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:1548 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2015-08-05 17:07:06 UTC

Description RHOS Integration 2014-12-04 05:03:15 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/hw-iscsi-device-name-support.

Description:

LibvirtISCSIVolumeDriver of nova.virt.libvirt.volume.py is hardcoding to use /dev/disk/by-path/ip-%s-iscsi-%s-lun-%s (in self._get_host_device, and disconnect_volume). But when we use h/w iscsi initiators, the filename starts with pci-<hwaddr>-ip-<targetportal>-iscsi-<target>-lun-<lun id>. We would like to modify the code so that pci-<hwaddr> files are also searched to determine if the device exists.

The following algorithm can be used: 

- Perform "ls" of /dev/disk/by-path directory
- Look for a file that contains the ip-<targetportal>-iscsi-<target>-lun-<lun id> in it. Get the complete filename and use this 
to determine if the device exists.

For e.g:
"ls" gives the following output

ip-192.168.2.126:3260-iscsi-iqn.2010-10.org.openstack:volume-0289c43f-7b32-490c-97a2-6385feb1480f-lun-1
ip-192.168.2.126:3260-iscsi-iqn.2010-10.org.openstack:volume-5fdf6167-ec09-4b0b-acff-b179b415ee4d-lun-1
pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0
pci-0000:00:1a.0-usb-0:1.2:1.1-scsi-0:0:0:0
pci-0000:00:1a.0-usb-0:1.2:1.1-scsi-0:0:0:1
pci-0000:01:00.2-ip-192.168.10.26:3260-iscsi-iqn.2010-10.org.openstack:volume-0289c43f-7b32-490c-97a2-6385feb1480f-lun-1
pci-0000:01:00.2-ip-192.168.10.26:3260-iscsi-iqn.2010-10.org.openstack:volume-5fdf6167-ec09-4b0b-acff-b179b415ee4d-lun-1
pci-0000:01:00.3-ip-192.168.11.26:3260-iscsi-iqn.2010-10.org.openstack:volume-0289c43f-7b32-490c-97a2-6385feb1480f-lun-1
pci-0000:01:00.3-ip-192.168.11.26:3260-iscsi-iqn.2010-10.org.openstack:volume-5fdf6167-ec09-4b0b-acff-b179b415ee4d-lun-1

We will be able to search for 192.168.10.26:3260-iscsi-iqn.2010-10.org.openstack:volume-0289c43f-7b32-490c-97a2-6385feb1480f-lun-1 in the list of filenames, and we will find pci-0000:01:00.2-ip-192.168.10.26:3260-iscsi-iqn.2010-10.org.openstack:volume-0289c43f-7b32-490c-97a2-6385feb1480f-lun-1 that contains the search string.

We will then use this filename pci-0000:01:00.2-ip-192.168.10.26:3260-iscsi-iqn.2010-10.org.openstack:volume-0289c43f-7b32-490c-97a2-6385feb1480f-lun-1 to determine whether the device exists (via os.path.exists). In the current code, because of hardcoding "ip-" as the beginning, the code is searching for ip-192.168.10.26:3260-iscsi-iqn.2010-10.org.openstack:volume-0289c43f-7b32-490c-97a2-6385feb1480f-lun-1 which will not be there.

The same logic will also be used in disconnect_volume to determine the device_prefix.

Specification URL (additional information):

None

Comment 7 errata-xmlrpc 2015-08-05 13:19:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2015:1548


Note You need to log in before you can comment on or make changes to this bug.