Page MenuHomePhabricator

[DBA] remove nodepooldb on production-m5 and nodepool user
Closed, ResolvedPublic

Description

Nodepool has been phased out. It had multiple mysql connections to production-m5. I would like the database to be dropped as well as the user:

MySQL serverproduction-m5
Database namenodepooldb
User'nodepool'@'10.64.16.155'

thanks!

Event Timeline

hashar triaged this task as Medium priority.Dec 18 2018, 4:17 PM
hashar created this task.

Change 480661 had a related patch set uploaded (by Hashar; owner: Hashar):
[operations/puppet@production] nodepool: cleanup database related settings

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

Looks like it is indeed not in use:

root@db1073:/srv/sqldata/nodepooldb# ls -lh *.ibd
-rw-rw---- 1 mysql 1001 112K Feb 21  2018 dib_image.ibd
-rw-rw---- 1 mysql 1001 176K Nov 15 22:58 node.ibd
-rw-rw---- 1 mysql 1001 128K Nov 26 23:26 snapshot_image.ibd
-rw-rw---- 1 mysql 1001 128K Feb 21  2018 subnode.ibd

It is also empty:

root@db1073:/srv/tmp# for i in `mysql --skip-ssl nodepooldb -BN -e "show tables"`; do echo $i; mysql --skip-ssl nodepooldb -e "select count(*) from $i";done
dib_image
+----------+
| count(*) |
+----------+
|        0 |
+----------+
node
+----------+
| count(*) |
+----------+
|        0 |
+----------+
snapshot_image
+----------+
| count(*) |
+----------+
|        0 |
+----------+
subnode
+----------+
| count(*) |
+----------+
|        0 |
+----------+

Just in case I have left a backup of the empty tables at: root@db1073:/srv/tmp/nodepooldb.sql

Mentioned in SAL (#wikimedia-operations) [2018-12-19T06:44:15Z] <marostegui> Remove nodepool@10.64.16.155 user from m5 master - T212230

User removed

root@db1073.eqiad.wmnet[(none)]> drop user if exists 'nodepool'@'10.64.16.155';
Query OK, 0 rows affected (0.00 sec)

root@db1073.eqiad.wmnet[(none)]> show grants for 'nodepool'@'10.64.16.155';
ERROR 1141 (42000): There is no such grant defined for user 'nodepool' on host '10.64.16.155'

Change 480661 merged by Marostegui:
[operations/puppet@production] nodepool: cleanup database related settings

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

Mentioned in SAL (#wikimedia-operations) [2018-12-19T07:37:09Z] <marostegui> Drop nodepooldb on m5 master - T212230

Database dropped:

root@db1073.eqiad.wmnet[(none)]> drop database if exists nodepooldb;
Query OK, 4 rows affected (2.48 sec)

root@db1073.eqiad.wmnet[(none)]>