Page MenuHomePhabricator

Decom cookbook fails with powered down / not in puppetdb host
Closed, ResolvedPublic

Description

I'm decommissioning ms-be1034 in T276522, the host has been down long enough that it isn't in puppetdb anymore (and won't be coming back)

root@cumin1001:~# cookbook sre.hosts.decommission ms-be1034.eqiad.wmnet -t T276522
>>> ATTENTION: the query does not match any host in PuppetDB or failed
Hostname expansion matches 1 hosts: ms-be1034.eqiad.wmnet
Do you want to proceed anyway?
Type "go" to proceed or "abort" to interrupt the execution
> go              
Exception raised while initializing the Cookbook sre.hosts.decommission:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/spicerack/_menu.py", line 211, in run
    runner = self.instance.get_runner(args)
  File "/srv/deployment/spicerack/cookbooks/sre/hosts/decommission.py", line 197, in get_runner
    return DecommissionHostRunner(args, self.spicerack)
  File "/srv/deployment/spicerack/cookbooks/sre/hosts/decommission.py", line 218, in __init__
    if len(self.decom_hosts) > 20:
AttributeError: 'DecommissionHostRunner' object has no attribute 'decom_hosts'

Event Timeline

Change 668650 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/cookbooks@master] sre.hosts.decommission: fix use of self

https://gerrit.wikimedia.org/r/668650

Change 668650 abandoned by Elukey:
[operations/cookbooks@master] sre.hosts.decommission: fix use of self

Reason:
https://gerrit.wikimedia.org/r/c/operations/cookbooks/ /668572

https://gerrit.wikimedia.org/r/668650

fgiunchedi claimed this task.

Can confirm this is fixed, thanks folks!