pdns icon indicating copy to clipboard operation
pdns copied to clipboard

b2b-migrate mydns gmysql doesn't create SOA records

Open zerocarbthirty opened this issue 5 years ago • 7 comments

  • Program: Authoritative
  • Issue type: Bug report

Short description

When using pdnsutil to migrate backends from MyDNS to gmysql pdnsutil does not create an SOA record in the 'records' table. MyDNS uses the 'soa' table to define domains.

Environment

  • Operating system: CentOS 8
  • Software version: 4.2.2
  • Software source: PowerDNS repository

Steps to reproduce

  1. pdnsutil b2b-migrate mydns gmysql

Expected behaviour

I would expect that an SOA record would be generated for each migrated domain.

Actual behaviour

The domain record was created and then records were created but no SOA record was ever created.

Other information

zerocarbthirty avatar Jun 01 '20 14:06 zerocarbthirty

The MyDNS backend indeed does not return the SOA record in list(), which is required according to the documentation: https://doc.powerdns.com/authoritative/appendices/backend-writers-guide.html#_CPPv4N10DNSBackend4listEib

The MyDNS backend has been removed in 4.3.0 so it would be nice to fix this in 4.2.x to make it easy to migrate to the generic MySQL backend.

rgacogne avatar Jun 02 '20 07:06 rgacogne

I suspected the same, and I also decided I wanted to fix this for migrating users.

Habbie avatar Jun 02 '20 07:06 Habbie

.. actually the docs say it is NOT required! But #9191 fixes it anyway :)

Habbie avatar Jun 02 '20 20:06 Habbie

.. actually the docs say it is NOT required! But #9191 fixes it anyway :)

Oh, indeed, I expected so much to see that requirement in the documentation that I read it the wrong way around.. Perhaps we should fix the documentation, then, as b2b-migrate clearly doesn't handle missing SOA records? Or fix b2b-migrate ;-)

rgacogne avatar Jun 03 '20 07:06 rgacogne

Hmm. Fixing it in b2b-migrate would in fact have been easier than what I did. But also I think SOA should simply be part of list(). I believe all other backends get it 'right' now so might as well hold on to that now.

Habbie avatar Jun 03 '20 07:06 Habbie

I'd argue in favor of fixing b2b-migrate as well, there may be other backends that honor the current API.

jsoref avatar Jun 03 '20 13:06 jsoref

mydns SOA generation is fixed in #9191, which will be in auth 4.2.3

Habbie avatar Jun 05 '20 13:06 Habbie