Static IP cannot be assigned to the host after the DNS record was created with the same IP

Bug #1918106 reported by Vladimir Grevtsev
14
This bug affects 2 people
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=landscapeha-1 cores=2 memory=1024 storage=10.0 zone=1 'interfaces=eth0:space=oam-space,ip=172.27.84.101,type=bridge,mode=static'
Success.
Machine-readable output follows:
{
    "system_id": "fbmgqc",
    "resource_uri": "/MAAS/api/2.0/machines/fbmgqc/"
}

$ maas admin dnsresources create fqdn=test1.maas ip_addresses=172.27.84.101
Success.
Machine-readable output follows:
<omitted>

(How it doesn't)

$ maas admin dnsresources create fqdn=test.maas ip_addresses=172.27.84.100
Success.
Machine-readable output follows:
<omitted>

$ maas admin pod compose 1 hostname=landscapeha-1 cores=2 memory=1024 storage=10.0 zone=1 'interfaces=eth0:space=oam-space,ip=172.27.84.100,type=bridge,mode=static'
The IP address 172.27.84.100 is already in use.

== Env ==
Ubuntu 20.04, snapped MAAS 2.9.2-9164-g.ac176b5c4 (rev 11851).

description: updated
description: updated
description: updated
Changed in maas:
assignee: nobody → Christian Grabowski (cgrabowski)
Revision history for this message
Christian Grabowski (cgrabowski) wrote :

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.

Changed in maas:
status: New → Triaged
Changed in maas:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.