Comment 1 for bug 1679222

Revision history for this message
Blake Rouse (blake-rouse) wrote :

This patch fixes the issue with IPv4:

=== modified file 'curtin/block/iscsi.py'
--- curtin/block/iscsi.py 2017-02-18 00:33:38 +0000
+++ curtin/block/iscsi.py 2017-04-03 15:54:03 +0000
@@ -37,7 +37,7 @@
     ''', re.VERBOSE)

 RFC4173_TARGET_REGEX = re.compile(r'''^
- (?P<host>[^@]*): # greedy so ipv6 IPs are matched
+ (?P<host>[^@:]*): # greedy so ipv6 IPs are matched
     (?P<proto>[^:]*):
     (?P<port>[^:]*):
     (?P<lun>[^:]*):

But will break it for IPv6. I think the IPv6 matching will need to be improved to require the IP address to be wrapped in '[', ']'. The target name is allowed to have ':' and its actual quite common.

Since MAAS discovers already composed machines in RSD with ISCSI, target names without ':' cannot be enforced so this must be supported.