Bind plugin doesn't work properly after upgrade to 3.2.10: Call to undefined method bind_plugin::slave_zone_file_prefix()
Summary
Cron jobs don't work properly in 3.2.10 if you have slave DNS (Secondary DNS-Zones) set up.
Steps to reproduce
- Set up slave DNS (Secondary DNS-Zones)
- Configuration changes never apply after that.
- Cron jobs don't start with errors ike that:
Tue Jun 6 09:57:01 AM UTC 2023 06.06.2023-09:57 - WARNING - There is already a lockfile set, but no process running with this pid (30613). Continuing. Tue Jun 6 09:57:02 AM UTC 2023 PHP Fatal error: Uncaught Error: Call to undefined method bind_plugin::slave_zone_file_prefix() in /usr/local/ispconfig/server/plugins-available/bind_plugin. inc.php:463 Tue Jun 6 09:57:02 AM UTC 2023 Stack trace: Tue Jun 6 09:57:02 AM UTC 2023 #0 /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php(438): bind_plugin->slave_update() Tue Jun 6 09:57:02 AM UTC 2023 #1 (closed) /usr/local/ispconfig/server/lib/classes/plugins.inc.php(120): bind_plugin->slave_insert() Tue Jun 6 09:57:02 AM UTC 2023 #2 (closed) /usr/local/ispconfig/server/mods-available/dns_module.inc.php(108): plugins->raiseEvent() Tue Jun 6 09:57:02 AM UTC 2023 #3 (closed) /usr/local/ispconfig/server/lib/classes/modules.inc.php(302): dns_module->process() Tue Jun 6 09:57:02 AM UTC 2023 #4 (closed) /usr/local/ispconfig/server/lib/classes/modules.inc.php(235): modules->raiseTableHook() Tue Jun 6 09:57:02 AM UTC 2023 #5 (closed) /usr/local/ispconfig/server/server.php(180): modules->processDatalog() Tue Jun 6 09:57:02 AM UTC 2023 #6 (closed) {main} Tue Jun 6 09:57:02 AM UTC 2023 thrown in /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php on line 463
Correct behaviour
Everything should work normally.
Environment
Server OS + version: Ubuntu 22.04.2 LTS ISPConfig version: 3.2.10 PHP 7.4.33
Proposed fix
Added to /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php
function slave_zone_file_prefix() {
//TODO : change this when distribution information has been integrated into server record
return (file_exists('/etc/gentoo-release')) ? 'sec/' : 'slave/sec.';
}
Somehow it was removed since 3.2.9 but still used.