Cinder not working with IPv6 ISCSI

Bug #1449492 reported by Matt Grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned
os-brick
Fix Released
Wishlist
Lukas Bezdicka

Bug Description

Testing configuring Openstack completely with IPv6

Found that IP address parsing was thrown in a lot of cases because of need to have '[]' encasing the address, or not for use with URLs and the parsing of some user space 3rd party C binaries - iscsiadm for example. All the others are best left by using a name set to the IPv6 address in the /etc/hosts file, iSCSI though its not possible.

Got Cinder working by setting iscsi_ip_address (/etc/cinder/cinder.conf) to '[$my_ip]' where my ip is an IPv6 address like 2001:db08::1 (not RFC documentation address ?) and changing one line of python iin the nova virt/libvirt/volume.py code:

--- nova/virt/libvirt/volume.py.orig 2015-04-27 23:00:00.208075644 +1200
+++ nova/virt/libvirt/volume.py 2015-04-27 22:38:08.938643636 +1200
@@ -833,7 +833,7 @@
     def _get_host_device(self, transport_properties):
         """Find device path in devtemfs."""
         device = ("ip-%s-iscsi-%s-lun-%s" %
- (transport_properties['target_portal'],
+ (transport_properties['target_portal'].replace('[','').replace(']',''),
                    transport_properties['target_iqn'],
                    transport_properties.get('target_lun', 0)))
         if self._get_transport() == "default":

Nova-compute was looking for '/dev/disk/by-path/ip-[2001:db08::1]:3260-iscsi-iqn.2010-10.org.openstack:*' when there were no '[]' in the udev generated path....

This one can't be worked around by using the /etc/hosts file. iscsiadm and tgt ned the IPv6 address wrapped in '[]', and iscsadm uses it in output. The above patch could be matched with a bi ihte cinder code that puts '[]' around iscsi_ip_address if if it is not supplied.

More work is obvioulsy need on a convention for writing IPv6 addresses in the Openstack configuration files, and there will be a lot of places where code will need to be tweaked.

Lets start by fixing this blooper/lo hanging one first though as it makes it possible to get Cinder working in a pure IPv6 environment. Above may be a bit of a hack, but only one one code path needs adjustment...

Tags: cinder ipv6 iscsi
Revision history for this message
Matt Grant (mattgrant) wrote :
affects: app-catalog → nova
Tony Breeds (o-tony)
Changed in nova:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/204737

Changed in nova:
assignee: nobody → Tony Breeds (o-tony)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Tony Breeds (<email address hidden>) on branch: master
Review: https://review.openstack.org/204737
Reason: As per previous comment this is no longer need in nova. I was hoping to point to the os-brick fix in this abandon but that isn't going to happen today.

Revision history for this message
Walt Boring (walter-boring) wrote :

the os-brick patch is here:

https://review.openstack.org/#/c/234425/

Changed in os-brick:
status: New → In Progress
assignee: nobody → Lukas Bezdicka (social-b)
importance: Undecided → Medium
Changed in cinder:
status: New → In Progress
no longer affects: cinder
Changed in nova:
assignee: Tony Breeds (o-tony) → nobody
Revision history for this message
John Griffith (john-griffith) wrote :

modified to wishlist/feature, because... well that's what it is :)

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

Reviewed: https://review.openstack.org/234425
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=10924909cd81db10ac3bbf0f02496233fa94f6ea
Submitter: Jenkins
Branch: master

commit 10924909cd81db10ac3bbf0f02496233fa94f6ea
Author: Lukas Bezdicka <email address hidden>
Date: Tue Oct 13 16:26:00 2015 -0400

    Remove brackets from portal

    In case IPv6 address is present in location os_brick would fail to
    get correct path as brackets are forbidden chars in udev and are removed.

    Closes-Bug: #1449492
    Change-Id: I965ce7bb9bc2b2c3fdd240d998441f8b06b36934

Changed in os-brick:
status: In Progress → Fix Released
Changed in os-brick:
status: Fix Released → Invalid
status: Invalid → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/os-brick 0.7.0

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

Changed in nova:
status: In Progress → Confirmed
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.