test__dhcp_configurations_rendered fails unable to resolve localhost when in ipv6 network
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Данило Шеган |
Bug Description
On my development xenial LXD container, test maasserver.
"maasserver.
Full traceback at: http://
To ensure we test both with ipv4 and ipv6, one can apply the following patch:
http://
(this could be done without changing the factory by pre-creating the subnet with version={4,6}, but I found this nicer)
IPv6 test *always* fails for me in a container.
The problem seems to be that maas_url in get_maas_
If I hack maas_url to point to a hostname that resolves to an IPv6 address in my /etc/hosts (eg. "ip6-localhost"), the ipv4 test fails, and ipv6 test passes.
I am not sure if it makes sense to return an IPv4 nameserver (if that's the only thing we can get) to an IPv6 client? If not, we should probably only keep the ipv4 test or maybe patch resolve_hostname() to return the appropriate IP address which is either IPv4 or IPv6.
(Marking as high since it affects development)
Related branches
- Mike Pontillo (community): Approve
-
Diff: 73 lines (+25/-3)2 files modifiedsrc/maasserver/testing/factory.py (+5/-1)
src/maasserver/tests/test_preseed_network.py (+20/-2)
Changed in maas: | |
assignee: | nobody → Данило Шеган (danilo) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | none → 2.3.0 |
Changed in maas: | |
milestone: | 2.3.0 → 2.3.0alpha2 |
Changed in maas: | |
status: | Fix Committed → Fix Released |