spurious dns entries for dhdcp leases in interface set with same mac address; entry won't cleanup when lease expired

Bug #2017147 reported by Gerd Jakobovitsch
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Confirmed
Undecided
Unassigned

Bug Description

I'm running an environment which uses several vlans over one bonding interface; the untagged VLAN is defined for provisioning, but configured to not keep the address after deployment.
When machine is deployed, an IP address is configured for the untagged VLAN, and this IP is configured as a DNS registry, related to all interfaces that have the same MAC address. When, shortly after, the lease expires, the IP field at the ip-address object is zeroed, but the registry is kept.
Bug was identified when retrieving the existing entries via API: http://<MAAS>:5240/MAAS/api/2.0/dnsresources/. Besides the large number of unnecessary entries, the request took a long time, several minutes.

Revision history for this message
Gerd Jakobovitsch (gerd-jakobovitsch) wrote :

Proposed patch, tested successfully in our deployment

Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

Hi,

when you remove a machine, does the related registries disappear? If so, this is the intended behaviour.

The time to get the a response from the API does seem excessive. How many entries do you have and how many have empty address? (or can you give us a sample of the output?)

Changed in maas:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
Changed in maas:
status: Expired → Confirmed
Revision history for this message
Alan Baghumian (alanbach) wrote :

Hello Everyone!

I understand MAAS is not designed to do this automatically at the moment but I believe it would be a nice feature to have. My client is also having this exact same issue.

What happens is, machines are turned off after the deployment is completed and often that "turned off" period exceeds the DHCP lease time, causing them to lose the originally allocated IP addresses. However the DNS records still points to the old IP.

Best,
Alan

Revision history for this message
Alan Baghumian (alanbach) wrote :

Just to clarify, what I was referring to was an automatic DNS record update or creation (if pruned) when the machine comes back online and pings MAAS.

Revision history for this message
Eline Maaike De Weerd (emdw) wrote :

Hi, thanks for bringing this to our attention. To me, this sounds like a feature request rather than a bug. You're very welcome to open a feature request on Discourse, there is information about how to do this can be found here:
https://maas.io/docs/requesting-features-and-enhancements
Thank you!

Changed in maas:
status: Confirmed → Invalid
Revision history for this message
Ante Karamatić (ivoks) wrote :

I fail to see how is this a feature request? MAAS keeps the same data in multiple locations and obviously that data gets out of sync. DNS points to an IP that moves between machines; if the IP is not assigned (and therefore free to be allocated to a different machine), its DNS entry should be deleted.

Performance impact is dramatical. A 5min allocation of a machine (which is already too long) becomes a 60+min exercise. We are working around this issue by extending nginx timeouts and letting juju to deploy for days, instead of hours. Surely, this can't be expected behaviour.

Ante Karamatić (ivoks)
Changed in maas:
status: Invalid → Confirmed
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

Hi Ante,
I agree that automatic resource pruning on lease expiration is probably a behaviour we should expect MAAS to already have, so that would be a bug, but I think the further interactions when a machine returns to a MAAS that was mentioned is probably what falls under a feature request.
ie: if we expect a machine to come back with the same IP, that would fall under sticky leasing, which isn't something MAAS currently supports.

The performance degradation should be addressed though, we wouldn't expect to see a 12x increase in allocation time. Out of interest, how many resources do you have already? (ie: IP Addresses in use in MAAS)

Revision history for this message
Jacopo Rota (r00ta) wrote :

This should have been fixed with https://bugs.launchpad.net/maas/+bug/2049508

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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