While running the rename campaign for T372878: Re-IP wikikube servers in codfw row A/B moving to per-rack subnets, we've hit a couple of race conditions concerning debmonitor and puppetdb.
The sre.hosts.rename cookbook does:
self.debmonitor.host_delete(self.old_fqdn) self.puppet_master.delete(self.old_fqdn) self.puppet_server.delete(self.old_fqdn)
through spicerack, however there is a small race window if a puppet run is in progress or starts during these steps, resulting in the hosts being re-added to puppetdb and needing to be manually cleaned up from both puppetdb and debmonitor.
Since we are supposed to reimage the host immediately with --new, I think we can safely begin the sre.hosts.rename cookbook by disabling puppet on the node, reducing the risk to hit that window.
CR coming shortly