#1647 Write a script to cleanup Duffy DB after retiring a pool
Opened 24 days ago by gwmngilfen. Modified 21 days ago

When we retire a Duffy pool, the information about that pool persists in the database. This means Zabbix never stops monitoring old pools, because we connect to the DB to retrieve pool info.

We should write a small SQL script we can run against the DB when retiring a pool to clean up the data. Chatting with @nphilipp that would seem to be simply deleting from the sessions_nodes join-table, and then from sessions and nodes, all where pool = 'thing-we-are-removing.

We can add this to the Duffy Ansible role and have it available on-disk for use.


Metadata Update from @gwmngilfen:
- Issue assigned to gwmngilfen

24 days ago

Metadata Update from @arrfab:
- Issue tagged with: centos-ci-infra

24 days ago

https://github.com/CentOS/ansible-role-duffy/pull/17 creates and deploys the required script. I can't see a good way to automate it - we'd have to:

  • get Ansible to register output for the pools in the DB
  • remove from that list the pools in 70_nodepools
  • run the script for any remaining entries

That feels brittle, so I'm leaving it as manual, since we'd manually have to delete entries from 70_nodepools anyway...

Log in to comment on this ticket.

Metadata