When using wmf-auto-reimage-host today on multiple hosts there was twice an issue with an exception when it tries to set Icinga downtimes. It happened on 2 separate runs for one host each, wtp2002 and wtp2003.
Things were going just fine for the reinstall except for the downtime there is suddenly spicerack.remote.RemoteError: No hosts provided.
16:13:12 | wtp2003.codfw.wmnet | Polling until a Puppet sign request appears 16:13:16 | wtp2003.codfw.wmnet | Signed Puppet cert 16:13:18 | wtp2003.codfw.wmnet | Validated host 16:13:18 | wtp2003.codfw.wmnet | Scheduled delayed downtime on Icinga 16:13:18 | wtp2003.codfw.wmnet | Started first puppet run (sit back, relax, and enjoy the wait) START - Cookbook sre.hosts.downtime Exception raised while executing cookbook sre.hosts.downtime: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/spicerack/cookbook.py", line 410, in _run ret = self.module.run(args, self.spicerack) File "/srv/deployment/spicerack/cookbooks/sre/hosts/downtime.py", line 56, in run remote_hosts = spicerack.remote().query(args.query) File "/usr/lib/python3/dist-packages/spicerack/remote.py", line 323, in query return RemoteHosts(self._config, hosts, dry_run=self._dry_run) File "/usr/lib/python3/dist-packages/spicerack/remote.py", line 373, in __init__ raise RemoteError('No hosts provided') spicerack.remote.RemoteError: No hosts provided END (FAIL) - Cookbook sre.hosts.downtime (exit_code=99)
This resulted in Icinga alerts on IRC until I manually ran sre.hosts.downtime which worked fine.
Using wmf-auto-reimage for multiple hosts at once, which i was doing at the same time, did not show this issue.
The relevant log files are on cumin1001:
/var/log/wmf-auto-reimage/202007291532_dzahn_8935_wtp2002_codfw_wmnet_cumin.out
/var/log/wmf-auto-reimage/202007291532_dzahn_8935_wtp2002_codfw_wmnet.log
/var/log/wmf-auto-reimage/202007291533_dzahn_10043_wtp2003_codfw_wmnet_cumin.out
/var/log/wmf-auto-reimage/202007291533_dzahn_10043_wtp2003_codfw_wmnet.log
At the time of writing this the cookbooks have not ended yet and are still running.