maas-enlist doesn't work when provided with serverurl with IPv6 address
Bug #1717287 reported by
Witold Krecicki
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Unassigned | ||
2.2 |
Fix Released
|
High
|
Andres Rodriguez | ||
maas-enlist (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
There is a bug in parsing URLs that contain IPv6 addresses:
$ bash -x ./maas-enlist --serverurl http://[2001:db8:
(...)
+ wget -q -O/dev/null 'http://[2001:db8::1]:5240/http://[2001:db8:
Related branches
~wpk/maas:IPXE-Boot
Rejected
for merging
into
maas:master
- MAAS Lander: Needs Fixing
- Blake Rouse (community): Needs Fixing
-
Diff: 363 lines (+136/-7)18 files modifiedsrc/maasserver/models/node.py (+1/-1)
src/provisioningserver/boot/__init__.py (+15/-0)
src/provisioningserver/boot/ipxe.py (+83/-0)
src/provisioningserver/boot/open_firmware_ppc64el.py (+1/-0)
src/provisioningserver/boot/powernv.py (+1/-0)
src/provisioningserver/boot/pxe.py (+1/-0)
src/provisioningserver/boot/uefi_amd64.py (+1/-0)
src/provisioningserver/boot/uefi_arm64.py (+1/-0)
src/provisioningserver/boot/windows.py (+1/-0)
src/provisioningserver/dhcp/config.py (+15/-4)
src/provisioningserver/templates/dhcp/dhcpd6.conf.template (+1/-0)
src/provisioningserver/templates/ipxe/config.commissioning.template (+1/-0)
src/provisioningserver/templates/ipxe/config.enlist.template (+1/-0)
src/provisioningserver/templates/ipxe/config.install.template (+5/-0)
src/provisioningserver/templates/ipxe/config.local.template (+2/-0)
src/provisioningserver/templates/ipxe/config.poweroff.template (+3/-0)
src/provisioningserver/templates/ipxe/config.xinstall.template (+1/-0)
src/provisioningserver/utils/registry.py (+2/-2)
~andreserl/maas:2.2_lp1717287
- Andres Rodriguez (community): Approve
-
Diff: 26 lines (+3/-1)2 files modifieddocs/changelog.rst (+2/-0)
src/metadataserver/user_data/templates/snippets/maas_enlist.sh (+1/-1)
~wpk/maas:master
Merged
into
maas:master
- Mike Pontillo (community): Approve
-
Diff: 13 lines (+1/-1)1 file modifiedsrc/metadataserver/user_data/templates/snippets/maas_enlist.sh (+1/-1)
Changed in maas: | |
milestone: | none → 2.3.0 |
tags: | added: internal |
Changed in maas: | |
status: | New → Fix Committed |
Changed in maas: | |
importance: | Undecided → High |
Changed in maas: | |
milestone: | 2.3.0 → 2.3.0beta1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The fix is a proper api_url regex:
--- maas-enlist~ 2017-09-14 17:24:38.000000000 +0200 +://|^) [a-z0-9\ .]+($|/ $)'; then "MAAS/api/ 1.0/nodes/ " |[a-z]\ +://\)[ a-zA-Z0- 9\.]\+\ (\|\:[0- 9]\+\)/ ##'` |[a-z]\ +://\)\ ([a-zA- Z0-9\.] \+\|\(\ [[0-9a- fA-F:]\ +\]\)\) \(\|\:[ 0-9]\+\ )/##'`
+++ maas-enlist 2017-09-14 23:16:38.574202964 +0200
@@ -185,7 +185,7 @@
if echo "$serverurl" | egrep -q '(^[a-z]
api_url=
else
- api_url=`echo $serverurl | sed 's#^\(\
+ api_url=`echo $serverurl | sed 's#^\(\
fi
#TODO: Auto-detect hostname?