Page MenuHomePhabricator

clean up old cloud-ns0.wikimedia.org and cloud-ns1.wikimedia.org ns records in designate zones
Closed, ResolvedPublic

Description

When we renamed our nameservers, designate seems to have not cleaned up the old ones. We can probably just remove the records by hand from the database.

My first attempt at this is with traffic.wmflabs.org; if that goes well we can do this elsewhere.

Event Timeline

No ill effects (and some good ones) in traffic. Going to do this everywhere.

Backed up designate to /home/andrew/designate_backup-2020-06-10.sql

And then...

mysql:root@localhost [designate]> delete  from records where data='cloud-ns0.wikimedia.org.';
Query OK, 153 rows affected (0.03 sec)

mysql:root@localhost [designate]> delete  from records where data='cloud-ns1.wikimedia.org.';
Query OK, 153 rows affected (0.03 sec)

Mentioned in SAL (#wikimedia-cloud) [2020-06-10T16:09:36Z] <andrewbogott> deleting all old cloud-ns0.wikimedia.org and cloud-ns1.wikimedia.org ns records in designate database T254496

Change 604640 had a related patch set uploaded (by Arturo Borrero Gonzalez; owner: Arturo Borrero Gonzalez):
[operations/dns@master] cloud: cleanup unused records for old DNS servers

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

Change 604640 merged by Arturo Borrero Gonzalez:
[operations/dns@master] cloud: cleanup unused records for old DNS servers

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

aborrero subscribed.

Reopening given wmcloud.org seems to publish old NS records:

arturo@endurance:~$ dig NS @ns0.openstack.eqiad1.wikimediacloud.org. wmcloud.org +short
ns0.openstack.eqiad1.wikimediacloud.org.
cloud-ns1.wikimedia.org.
cloud-ns0.wikimedia.org.
ns1.openstack.eqiad1.wikimediacloud.org.

Designate doesn't refresh ns records until there is otherwise activity on the zone. So the actual 'dig' results will update for domains gradually as they're nudged. I created and deleted a dummy under wmcloud.org and now I see:

$ dig NS @ns0.openstack.eqiad1.wikimediacloud.org. wmcloud.org +short
ns1.openstack.eqiad1.wikimediacloud.org.
ns0.openstack.eqiad1.wikimediacloud.org.