Symptoms

Some DNS records were deleted inside a DNS zone from CP, but they still remain on the PowerDNS backend nodes.

There is a mismatch of TTL values between OA Management Node DB and PowerDNS DB.

Corresponding entries for DNS record deletion in /var/log/pa/core.log:

Jun  7 17:04:07.174 : DBG [task:50102137:74250 1:9708:af6fcb70 PowerDns ]: [ DNSManagement::PowerDns::PowerDns_impl::RemoveZoneRecord] PowerDNS: remove record (name=example.com, host=example.com, type=MX, data=20 antispam.test.net., ttl=60, prio=20)

And at the same time in /var/log/pdns.log:

Jun  7 17:04:13 ns1 postgres[22705]: [20-1] 2017-06-07 17:04:13 CEST powerdns LOG:  execute : DELETE FROM records WHERE domain_id = $1 AND name = $2 AND type = $3 AND content = $4 AND (ttl = $5 OR ttl = 0) AND prio = $6
Jun  7 17:04:13 ns1 postgres[22705]: [20-2] 2017-06-07 17:04:13 CEST powerdns DETAIL:  parameters: $1 = '452506', $2 = 'example.com', $3 = 'MX', $4 = 'antispam.test.net', $5 = '60', $6 = '10'

The actual TTL value stored in PowerDNS zone is different from 0 or 60:

powerdns=> select * from records where name ilike '%example.com%';
  id | domain_id |    name     | type |     content       | ttl  | prio | change_date | disabled | ordername | auth
-----+-----------+-------------+------+-------------------+------+------+-------------+----------+-----------+------
...
 345 |    431    | example.com |  MX  | antispam.test.net | 3600 |   20 |             | f        |           | t

Cause

Such behavior is recognized as a software issue POA-93821: Manually added PowerDNS records with default TTL are not deleted from PowerDNS server

Resolution

Contact your Technical Account Manager in order to clarify the status of the product issue. In order to apply a workaround, please contact Odin Technical Support.

Internal content

Link on internal Article