MAAS metadata_url contains a domain name even when DNS resolution is disallowed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Jacopo Rota |
Bug Description
[MAAS Version]
Tested on MAAS snap 3.4/edge (v:3.4.
Ubuntu 22.04
[Description]
Installing MAAS 3.4/edge and enabling DHCP will cause machines to fail commissioning with the following error:
cloudinit.
After further investigation, it turns out that the metadata URL being shared by MAAS to the machines contained a domain name instead of the MAAS server IP address.
Expected URL (for my setup):
http://
Actual (bad) URL:
http://
The option "Allow DNS resolution" in MAAS is disabled and no DNS servers are specified in MAAS. This means that even when using an external DNS server MAAS will keep sending the URL with the domain name which will fail to resolve and cause the commissioning to fail.
All testing was done in libvirt/KVM VMs
[Work Around]
I was able to work around the issue by adding a DNS entry to my home DNS pointing to the MAAS server and modifying the libvirt network to use that DNS instead.
Related branches
- MAAS Lander: Approve
- Ghadi Rahme (community): Approve
- Christian Grabowski: Approve
-
Diff: 34 lines (+12/-0)2 files modifiedsrc/maasserver/compose_preseed.py (+1/-0)
src/maasserver/tests/test_compose_preseed.py (+11/-0)
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 3.5.0 → 3.5.0-beta1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
we use domain name if uses_dns( subnet) : vlan.dhcp_ on or subnet. vlan.relay_ vlan_id is not None)
```
def _subnet_
return (
subnet is not None
and not subnet.dns_servers
and (subnet.
)
```
and this is why in your case we don't return the rack IP directly. We should add a check on the `allow_dns`. I'll fix this