Ability to restrict auto-discovery to MAC-address whitelist before dhcpd snippet deprication

We have hundreds of production servers that are set to boot PXE, and then boot hard drive. These servers have not been discovered by MAAS, and they rarely reboot. But when one of these servers did reboot, MAAS would push the auto-discovery image to them, and then shut them down when done discovering, causing serious service interruptions. In order to fix this in the safest way possible, we created these dhcp snippets to prevent PXE booting unless whitelisted:

# global snippet
ignore booting;
class "allow-mac" 
{    
  match substring (hardware, 1, 6);      
  allow booting;
}

and then we added snippets per subnet like this to allow auto-discovery and deployment per mac address:

subclass "allow-mac" A1:B2:34:56:7C:D8;

With the upcoming removal of dhcp snippets, we urgently need this whitelisting feature implemented in a different way. We certainly appreciate your time and attention on this.

Spencer Lines
Senior Site Reliability Engineer

Off topic related to your feature request, but why do you keep these servers in the pxe network (with pxe as first boot entry) if you actually don’t want them to pxe boot with MAAS?

Do you know the IP addresses of all your servers?

In that case, you either add them as Devices, or you could add the machine as already being Deployed. For example, maas $profile machines create ... deployed=true

In either case, MAAS should let those machines boot from local disk.

We have a lab installation where some (suspected) schema corruption going from 3.4->3.7 prompted us to look into building a new controller/db. We tried adding existing hosts as “devices” with the mac, static ip, and hostname but found they were still being served discovery images. You can declare a deployed-state machine object, but not MACs and IPs (since its deployed), so no A records and MaaS will still try to discover it as well. Nor do we want a bunch of stub records forever stuck in “new” state. We figured the point of a device object was to generate a resolvable A-rec and not attempt discovery, but it seems to try and fail anyway (pictured). Meaning we have to just manually register A records and hope that none of our machines netboot :frowning:
There are definitely some circumstances where you might want to make maas aware of some other stuff on the network that you want to leave alone, I would think.