[2.1 ipv6] YAML error when maas_url has an IPv6 IP
Bug #1630636 reported by
LaMont Jones
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
LaMont Jones |
Bug Description
If I set maas_url to http://[2001:67c:
Related branches
lp:~lamont/maas/bug-1630636
- Mike Pontillo (community): Approve
-
Diff: 96 lines (+54/-3)3 files modifiedcontrib/preseeds_v2/curtin_userdata (+1/-1)
src/maasserver/compose_preseed.py (+4/-2)
src/maasserver/tests/test_compose_preseed.py (+49/-0)
lp:~lamont/maas/bug-1630636b
- Gavin Panella (community): Approve
- Blake Rouse (community): Needs Information
- Andres Rodriguez (community): Needs Information
-
Diff: 156 lines (+82/-11)3 files modifiedcontrib/preseeds_v2/curtin_userdata (+1/-1)
src/maasserver/preseed.py (+3/-3)
src/maasserver/tests/test_preseed.py (+78/-7)
Changed in maas: | |
importance: | Undecided → Critical |
milestone: | none → 2.1.0 |
Changed in maas: | |
assignee: | nobody → LaMont Jones (lamont) |
Changed in maas: | |
status: | New → Fix Committed |
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.
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.