We use CAPI for MaaS to manage kubernetes clusters. When a machine resource is deleted by CAPI, the machine enters into a disk erase state and if success transitions to Ready. (In our setup we enabled disk erase to ensure machines don’t boot to OS accidentally, there by causing IP conflict).
What happens to the IP address of the machine during this process? Does MaaS immediately reclaims the IP? Or does it wait for the machine to finish Disk erase and enter into Ready state?
What happens to the IP address of the machine during this process?
Nothing changes during this process. The machine will PXE and will get an IP from the DHCP server; if the IP was AUTO/Static, the DHCP server is instructed to provide a static lease with these.
Does MAAS immediately reclaims the IP
Nope
Or does it wait for the machine to finish Disk erase and enter into Ready state?
Is there any way to get details around previous allocations of an IP? During node replacements, the IP addresses gets reused if its not allocated to any machine. I am trying to trace the machines with which an IP was associated with in the past.
It would be so good if MaaS provides a graphical topology around the different state changes for Machine and also IP address history I can see some big gain during troubleshooting issues with this feature.
Machine logs in MaaS UI shows only generic description. I also checked Installation output, which shows curtin logs. However I am looking for previous installation logs for a machine for some troubleshooting purpose.
Thanks for the reply. I managed to get some references to IP from maas-regiod jounral logs.
The netplan config that was applied to the machine should be in the curtin logs, so you should be able to get it
What I have seen is curtin logs gets overwritten during every deployment. And my attempt to find the old curtin-log for the machine from MaaS CLI didn’t succeed.
Something that I noticed for one of our machine is, after some unsuccessful Disk erase attempts on a machine, it was transitioned to RELEASE and eventually READY. This made the IP address of the machine to be added back to pool, and eventually getting used up by a fresh machine that was selected to be deployed by CAPI. This created IP duplication leading to chaos. Attaching a snapshot of events.
We run MaaS 3.5.8 on Jammy, and we have enable_disk_erasing_on_release and disk_erase_with_secure_erase both set to true. So, ideally any release attempt should go through a Disk erase cycle before moving to Ready. I am not sure if this is some kind of known bug. Trying to find the root cause, to prevent such issues in the future.