Syncing crashed DNS db

Discussion in 'ISPConfig 3 Priority Support' started by kobuki, Oct 27, 2016.

  1. kobuki

    kobuki Member HowtoForge Supporter

    I can't seem to be able to cleanly solve this without possibly spending many hours of coding a new import script. My dns_rr and dns_soa tables got out of sync and since Tools/Resync function practically does nothing I copied over and loaded a dump of these 2 tables on the dns node. Now with a simple remoting script I deactivated/activated all zones so the powerdns schemas get filled up with records again. It fills up but many records are missing. I can't seem to find the reason why.

    So, in short, with an unusably damaged dns node DB, how can I force a full resync of dns data? Should I just uninstall/install ISPC again on the node and stuff gets synced anew?
     
  2. kobuki

    kobuki Member HowtoForge Supporter

    Well, I managed to find a workaround, by re-importing the old dns database I moved to ISPC. I imported the bind records into a powerdns-compatible schema, and that was (almost) perfectly imported via the Tupa import feature. Then used a php script and the remoting API to put things in the right state on the right server.

    One catch is that zone/soa records must go on the right server first before adding the resource records. Otherwise RRs will have a NULL zone id and the pdns server will ignore all such records.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The dns resync feature does the same than clicking save in the dns zone. If it does not work then you shuld use the debug mode to see why. But it might be that the problem is in the pdns plugin, if it rejety to reimport a record that has not be changes, then a resync can not work with it.
     
  4. kobuki

    kobuki Member HowtoForge Supporter

    Well, clicking on save several hundred times isn't a solution, IMO. It would really be nice if a more comprehensive resync op would take place to uncover syncable differences.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The resync is working fine, the bug is in the pdns plugin which is not supported and maintained anymore. Switch t BIND if you want to be able to use all features in ISPConfig DNS.
     
  6. kobuki

    kobuki Member HowtoForge Supporter

    I've switched over to pdns a long, long time ago. The ability of replicating deletions of zones is a must which Bind 9 still doesn't support (maybe Bind 10 with a db backend does, but you're not suppotrting Bind 10 either). I understand that running a slave ISPC installation would fix that but that's just another workaround for the lacking native dns replication protocol. Generating a second layer of config files for bind to load works and I've seen several such implementations but all of them are just quirks to work around the lack of proper support for db backends. OTOH, your proposed solution wouldn't fix zones not syncing between nodes after a crash. And I'm talking about the dns_soa and dns_rr tables in dbispconfig, not the pdns ones. But even if you pull the plug, one can adapt pdns queries to use the dbispconfig schema for lookups. No real need to replicate data within the node from db to db.

    Why is pdns deprecated? It's much better performing and is easily integrated to the mysql db. DNSSEC is also fully supported natively.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The resnc function works fine in ispconfig mirrors and it works fine as well when it is used to sync data to slaves, tested that just with a BIND server here. It does the exact same as if you would press save on a DNS record in the interface.

    The pdns plugin developer stopped supporting his code and until we find someone who wants to maintain this plugin we do not recommend to use it as it will net be tested with new ISPConfig releases nor will any bugfixes nor improvements added to this plugin.
     
  8. kobuki

    kobuki Member HowtoForge Supporter

    OK, I can understand that. I'm not using mirror setup so it prolly won't work. Well, I've written my helper/fixup scripts so it's not a problem any more.
     

Share This Page