1
General Discussion / Re: BIND PLUGIN - zone updates not stored in config.xml
« on: May 28, 2020, 03:10:53 pm »
I have some idea about this, and it need some work but it could be done.
The worst is that Bind is caching data in journal and store into db on stop daemon.
what i tested today and it could be done:
- generate zone and db files into config in bind plugin ( its fast and easy)
- turn off domain.db generation in +TARGETS
(i try scenario that it remove journal and regenerate files but i've done something wrong and journal was not deleted - that solve half of problem it generate clean zone with static defined records, and should work on ddns to next restart,after restart jnl would be deleted and zone need to be repopulated - but dhcp should do that, but its not )
- do not use current zone config (if domain.db in +target not specified it is not working even if changed but data are stored in config)
- what im plan to do:
first solution:
action for read zone from db files after stop bind daemon and store data into config.xml and regenerate it on start bind daemon. could be done with rndc freeze and rndc thaw or rndc sync command and then run some interface to read and store to xml.
It need to be synced befor edit zone by GUI or using other way of edit zone on working bind (ddns.pl or similar)
second solution:
leave as it is (GUI zone management without changes, regeneration on start of bind) and remove jnl files after stop bind deamon ( it regenerate only static records, and dhcp need to repopulate hosts).
I am think about first solution because it allow to change zone from dhcp and other way (not only by GUI), it not delete data on restart daemon. But it need to change GUI zone management (Bind doesn't like change zone database when is working, because of journal problems) and some changes into start and stop scripts to make store of data into config.xml file.
The worst is that Bind is caching data in journal and store into db on stop daemon.
what i tested today and it could be done:
- generate zone and db files into config in bind plugin ( its fast and easy)
- turn off domain.db generation in +TARGETS
(i try scenario that it remove journal and regenerate files but i've done something wrong and journal was not deleted - that solve half of problem it generate clean zone with static defined records, and should work on ddns to next restart,after restart jnl would be deleted and zone need to be repopulated - but dhcp should do that, but its not )
- do not use current zone config (if domain.db in +target not specified it is not working even if changed but data are stored in config)
- what im plan to do:
first solution:
action for read zone from db files after stop bind daemon and store data into config.xml and regenerate it on start bind daemon. could be done with rndc freeze and rndc thaw or rndc sync command and then run some interface to read and store to xml.
It need to be synced befor edit zone by GUI or using other way of edit zone on working bind (ddns.pl or similar)
second solution:
leave as it is (GUI zone management without changes, regeneration on start of bind) and remove jnl files after stop bind deamon ( it regenerate only static records, and dhcp need to repopulate hosts).
I am think about first solution because it allow to change zone from dhcp and other way (not only by GUI), it not delete data on restart daemon. But it need to change GUI zone management (Bind doesn't like change zone database when is working, because of journal problems) and some changes into start and stop scripts to make store of data into config.xml file.