Page MenuHomePhabricator

decommission cloudlb2001-dev.codfw.wmnet
Closed, ResolvedPublicRequest

Description

This task will track the decommission-hardware of server decommission cloudlb2001-dev.codfw.wmnet.

It has been replaced by cloudlb2004-dev.

With the launch of updates to the decom cookbook, the majority of these steps can be handled by the service owners directly. The DC Ops team only gets involved once the system has been fully removed from service and powered down by the decommission cookbook.

cloudlb2001-dev.codfw.wmnet
Steps for service owner:

  • - all system services confirmed offline from production use
  • - set all icinga checks to maint mode/disabled while reclaim/decommmission takes place. (likely done by script)
  • - remove system from all lvs/pybal active configuration
  • - any service group puppet/hiera/dsh config removed
  • - remove site.pp, replace with role(spare::system) recommended to ensure services offline but not 100% required as long as the decom script is IMMEDIATELY run below.
  • - login to cumin host and run the decom cookbook: cookbook sre.hosts.decommission <host fqdn> -t <phab task>. This does: bootloader wipe, host power down, netbox update to decommissioning status, puppet node clean, puppet node deactivate, debmonitor removal, and run homer.
  • - remove all remaining puppet references and all host entries in the puppet repo
  • - reassign task from service owner to no owner and ensure the site project (ops-sitename depending on site of server) is assigned.

End service owner steps / Begin DC-Ops team steps:

  • - system disks removed (by onsite)
  • - determine system age, under 5 years are reclaimed to spare, over 5 years are decommissioned.
  • - IF DECOM: system unracked and decommissioned (by onsite), update netbox with result and set state to offline
  • - IF DECOM: mgmt dns entries removed.
  • - IF RECLAIM: set netbox state to 'inventory' and hostname to asset tag

Details

Related Changes in Gerrit:

Related Objects

Event Timeline

cookbooks.sre.hosts.decommission executed by andrew@cumin1002 for hosts: cloudlb2001-dev.codfw.wmnet

  • cloudlb2001-dev.codfw.wmnet (PASS)
    • Downtimed host on Icinga/Alertmanager
    • Found physical host
    • Downtimed management interface on Alertmanager
    • Wiped all swraid, partition-table and filesystem signatures
    • Powered off
    • [Netbox] Set status to Decommissioning, deleted all non-mgmt IPs, updated switch interfaces (disabled, removed vlans, etc)
    • Configured the linked switch interface(s)
    • Removed from DebMonitor
    • Removed from Puppet master and PuppetDB

Change #1139052 had a related patch set uploaded (by Andrew Bogott; author: Andrew Bogott):

[operations/puppet@production] Remove refs to cloudlb2001-dev.

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

Change #1139052 merged by Andrew Bogott:

[operations/puppet@production] Remove refs to cloudlb2001-dev.

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

Andrew updated the task description. (Show Details)
Andrew added a project: ops-codfw.

@Andrew i can't use the offline script in netbox. looks like some of the interfaces are a little too complicated for it. can you take care of this one for me? the script should handle the rest.

django.db.models.deletion.RestrictedError: ("Cannot delete some instances of model 'Interface' because they are referenced through restricted foreign keys: 'Interface.parent'.", {<Interface: vlan2151>})

+ @cmooney because I bet he can fix this in 5 seconds

Jhancock.wm claimed this task.
Jhancock.wm updated the task description. (Show Details)

+ @cmooney because I bet he can fix this in 5 seconds

Yeah manually deleted there. I'll need to take a closer look at the script to ensure it deletes things in the correct order. The problem here is it tried to delete a "parent" interface before a "child", which fails. It should delete the sub-interfaces first, then the parent/physical.