Page MenuHomePhabricator

nova wmfsink not deleting dns records for proxies whose name equals to project name
Closed, ResolvedPublic

Description

wmfsink is the component responsible for cleaning up after deleted Nova instances. One step of the cleanup is deleting web proxies pointing at the deleted instance, also deleting the DNS record for the proxy. This DNS record cleanup fails in cases where the proxy name is the apex record of a designate zone (for example, when the proxy name equals to the project name). I assume we need to adjust the following zone detection code:

# operations/puppet modules/openstack/files/victoria/designate/wmf_sink/base.py
parentzone = '.'.join(proxyzone.split('.')[1:])

to account for this case.

related: T295246

Event Timeline

parentzone = '.'.join(proxyzone.split('.')[:3]) ?

That's not the complete solution since these proxies are a special case in every way... but it's a start.

Change 751963 had a related patch set uploaded (by Andrew Bogott; author: Andrew Bogott):

[operations/puppet@production] designate sink: fix proxy cleanup when proxy domain == project domain

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

parentzone = '.'.join(proxyzone.split('.')[:3]) ?

After chasing down more edge cases I have settled on

'.'.join(proxyzone.split('.')[proxyzone.split('.').index(project):])

Change 751963 merged by Andrew Bogott:

[operations/puppet@production] designate sink: fix proxy cleanup when proxy domain == project domain

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

Change 752181 had a related patch set uploaded (by Andrew Bogott; author: Andrew Bogott):

[operations/puppet@production] wmf_sink base: fix the calculation of proxy parent zone

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

Change 752181 merged by Andrew Bogott:

[operations/puppet@production] wmf_sink base: fix the calculation of proxy parent zone

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

Andrew claimed this task.