[2.1 ipv6] YAML error when maas_url has an IPv6 IP

Bug #1630636 reported by LaMont Jones on 2016-10-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
LaMont Jones

Bug Description

If I set maas_url to http://[2001:67c:1562:8010::2:1]:5240/MAAS, then the preseed we generate is bad.

Related branches

LaMont Jones (lamont) wrote :
summary: - YAML error when maas_url has an IPv6 IP
+ [2.1 ipv6] YAML error when maas_url has an IPv6 IP
tags: added: maas-ipv6
Changed in maas:
importance: Undecided → Critical
milestone: none → 2.1.0
Gavin Panella (allenap) wrote :

The underlying cause appears to be that contrib/preseeds_v2/curtin_userdata is generating YAML using a free-form template and trying to interpolate text using *shell* escaping rules.

While it's generally unwise to generate YAML (and many other structured data exchange formats) by interpolating into a free-form template, we can fix this particular bug by removing uses of `escape.shell` from curtin_userdata.

A proper fix would be to eliminate the use of templates for preseed generation altogether since all but 2 generate YAML, and those 2 return exactly the input given, i.e. we have no need for templates.

LaMont Jones (lamont) on 2016-10-05
Changed in maas:
assignee: nobody → LaMont Jones (lamont)
Changed in maas:
status: New → Fix Committed
Andres Rodriguez (andreserl) wrote :

@LaMont:

maas: [wget, '--no-proxy', ''http://[2001:67c:1562:8010::2:1] ...

That is telling us something very interesting:

'{{node_disable_pxe_url|escape.shell}}'

should end up like:

'http://[2001:67c:1562:8010::2:1]'

However, the bug is that the URL is returning:

''http://[2001:67c:1562:8010::2:1]''

That said, the original fix included:

31 + return compose_URL(
32 + "http://:8000/", get_maas_facing_server_host(
33 + node.get_boot_rack_controller()))

So I /think/ this will return the URL without the extra quotes ''.

Changed in maas:
status: Fix Committed → New
Andres Rodriguez (andreserl) wrote :

Note I partially reverted the fix and re-opened the bug report: https://code.launchpad.net/~andreserl/maas/partial_revert_rev5252/+merge/307778

Changed in maas:
status: New → Triaged
Changed in maas:
milestone: 2.1.0 → 2.1.1
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers