b2b-migrate mydns gmysql doesn't create SOA records
- 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
- 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
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.
I suspected the same, and I also decided I wanted to fix this for migrating users.
.. actually the docs say it is NOT required! But #9191 fixes it anyway :)
.. 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 ;-)
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.
I'd argue in favor of fixing b2b-migrate as well, there may be other backends that honor the current API.
mydns SOA generation is fixed in #9191, which will be in auth 4.2.3