ISCSI target validation fails when target name includes a ':'
Bug #1679222 reported by
Blake Rouse
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
High
|
Unassigned | ||
MAAS RSD |
Invalid
|
High
|
Unassigned | ||
curtin |
Fix Released
|
High
|
Nish Aravamudan | ||
curtin (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Yakkety |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Passes validation:
'user-mXTuYJ:
Fails validation:
'user-mXTuYJ:
Error:
"invalid literal for int() with base 10: 'iqn.maas.io'"
For some reason it thinks iqn.maas.io is the lun, but '2' is the lun. Using this defined format in the documentation.
[user:password[
Related branches
lp://staging/~nacc/curtin/iscsi-lp1679222
- Server Team CI bot: Approve (continuous-integration)
- Blake Rouse (community): Approve
-
Diff: 189 lines (+69/-21)4 files modifiedcurtin/block/iscsi.py (+1/-1)
tests/unittests/test_block_iscsi.py (+48/-6)
tests/vmtests/__init__.py (+2/-2)
tools/launch (+18/-12)
Changed in curtin: | |
assignee: | nobody → Nish Aravamudan (nacc) |
Changed in curtin: | |
status: | Triaged → In Progress |
Changed in curtin (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in curtin: | |
status: | In Progress → Fix Committed |
Changed in maasrsd: | |
status: | Triaged → Fix Committed |
status: | Fix Committed → Invalid |
Changed in maas: | |
status: | Triaged → Invalid |
Changed in maas: | |
milestone: | 2.2.0rc2 → none |
Changed in curtin: | |
status: | Fix Committed → Fix Released |
Changed in curtin (Ubuntu Xenial): | |
status: | Confirmed → Fix Released |
Changed in curtin (Ubuntu Yakkety): | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
This patch fixes the issue with IPv4:
=== modified file 'curtin/ block/iscsi. py' block/iscsi. py 2017-02-18 00:33:38 +0000 block/iscsi. py 2017-04-03 15:54:03 +0000
--- curtin/
+++ curtin/
@@ -37,7 +37,7 @@
''', re.VERBOSE)
RFC4173_ TARGET_ REGEX = re.compile(r'''^ P<proto> [^:]*): P<port> [^:]*): P<lun>[ ^:]*):
- (?P<host>[^@]*): # greedy so ipv6 IPs are matched
+ (?P<host>[^@:]*): # greedy so ipv6 IPs are matched
(?
(?
(?
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.