Static IP cannot be assigned to the host after the DNS record was created with the same IP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Won't Fix
|
Undecided
|
Christian Grabowski |
Bug Description
Hi,
== Problem statement ==
There's no possibility to use PXE network for the node access in the env I'm currently working with - so each host has two NICs - for PXE and OAM purposes. MAAS is creating the FQDN for the host automatically, but since there's no way to specify the space or subnet to pick the IP addr from, it's almost useless (MAAS grabs the PXE IP address for this FQDN, and because LXD containers don't have the interface with PXE IP addr - they can't reach out the hosts using the auto-created FQDN).
So, I thought that I can just create a DNS entry manually with the static and pre-allocated IP address to be used later, and here's where the problem starts. When the MAAS operator creates the manual dns record, the IP address used as a value of A rec is being marked as "Reserved" in MAAS, therefore it can't be used later.
However, if I will create the host with the static IP addr first, and create a DNS record for that IP later, everything will work as expected.
== Steps to reproduce ==
(How it works)
$ maas admin pod compose 1 hostname=
Success.
Machine-readable output follows:
{
"system_id": "fbmgqc",
"resource_uri": "/MAAS/
}
$ maas admin dnsresources create fqdn=test1.maas ip_addresses=
Success.
Machine-readable output follows:
<omitted>
(How it doesn't)
$ maas admin dnsresources create fqdn=test.maas ip_addresses=
Success.
Machine-readable output follows:
<omitted>
$ maas admin pod compose 1 hostname=
The IP address 172.27.84.100 is already in use.
== Env ==
Ubuntu 20.04, snapped MAAS 2.9.2-9164-
description: | updated |
description: | updated |
description: | updated |
Changed in maas: | |
assignee: | nobody → Christian Grabowski (cgrabowski) |
Changed in maas: | |
status: | Triaged → Won't Fix |
This is purposely done in the event the IP address is within a subnet configure, but not necessarily managed by MAAS. This is an issue of order of operations as the DNS record creation assumes the IP is assigned to something, so when not already created in MAAS, it's created a a user reserved IP. This can be avoided by creating the machine or IP address first.