da732e5998cfd0dcc9d371f3b99336c93779fad1
[mirror/dsa-wiki.git] / input / howto / decomission.mdwn
1 # Decomissioning hosts
2
3  * Get rid of any services running on the host.
4  * Optional, shut down the machine, then wait a month
5  * Zero disks
6
7     badblocks -v -s -p 5 -w -f DEVICE_GOES_HERE
8
9  * Revoke puppet certificate
10
11    * on handel: puppet node clean $HOST
12    * reinit samhain on handel
13
14  * Remove from LDAP
15    * including references such as subgroup: foo@hostname or supplementarygid: foo@hostname
16    * rerun puppet on backuphost / the backup host
17    * reinit samhain on backuphost
18  * Remove from Nagios
19  * Remove any references from puppet configuration
20  * Remove references to the host from DNS files, including reverse DNS
21  * Get rid of the HW (tell the hoster to get rid of it or other as appropriate)
22  * Update password file information for the $HOST
23  * Remove MQ queues related to machine (see [[doc/mq]] for details)
24
25     for queue in $(rabbitmqadmin -N rainier list queues name | \
26     grep unger.debian.org | \
27     awk '{print $2}') ; do
28     rabbitmqadmin -N rainier -V dsa delete queue name=$queue
29     done
30
31  * Remove disks from the MSA 
32    * run multipath -ll on the KVM host and find all disks on that multipath
33
34 ```
35     finzi-srv (3600c0ff00027786c874edd5701000000) dm-52 HP,MSA 2040 SAN
36     size=75G features='2 queue_if_no_path retain_attached_hw_handler' hwhandler='0' wp=rw
37     |-+- policy='service-time 0' prio=50 status=active
38     | |- 1:0:2:4  sdeu 129:96  active ready running
39     | |- 1:0:3:4  sdhu 134:64  active ready running
40     | |- 2:0:0:4  sdaa 65:160  active ready running
41     | `- 2:0:2:4  sdfz 131:80  active ready running
42     `-+- policy='service-time 0' prio=10 status=enabled
43       |- 1:0:0:4  sdf  8:80    active ready running
44       |- 1:0:1:4  sdbu 68:128  active ready running
45       |- 2:0:1:4  sdcz 70:112  active ready running
46       `- 2:0:3:4  sdja 8:320   active ready running
47    
48 ```
49    * for each disk in those multipath run
50
51      echo 1 > /sys/block/sdX/device/delete
52
53    * once done, remove that multpath-device from multipath
54
55      multipath -f finzi-srv
56
57    * remove the paths in the MSA
58
59 Three months after decomissioning:
60  * Remove backups