Blob Blame History Raw
# Infra/node decommissioning

## High overview

This is an overview of the needed tasks to perform when we want to remove a node from our infra : 

  * Delete/reinstall the (virtual) machine (cleaning up)
    * If hosted within Red Hat DC, update [internal ip inventory](https://docs.google.com/spreadsheets/d/1K-aewLJ17z3pRC6K5qyBRJYtNXy1WcxRSVwPkGf4NXQ) (Obviously need RH SSO and permission)
  * Remove from [DNS](/infra/dns/) (public of internal, depending on the case)
  * Remove it from Ansible inventory (and search for references for that node in case of)
  * Remove it from Zabbix monitoring

Worth knowing that if node is used in one of the following roles, it needs to be also removed from the sqlite DB used to generate the dynamic powerdns setup.

```
host="centost8.centos.org"
pushd /var/lib/centos-infra/
echo "delete from nodes where fqdn='${host}';" | sqlite3 nodes.db
./gen_backend
popd
```