This issue appeared after updating an existing OPNsense installation from version 18.7.4 to 18.7.5. As a consequence, attempted changes to DHCPv4 server configurations in any way will no longer be saved at all.
I did not restart the firewall as the updater did not suggest it is necessary.
So far I have been able to produce the errors - each shown below - when attempting to...
...add custom options to DHCP server
Fatal error: Uncaught OPNsense\Core\ConfigException: no valid config loaded in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:240
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(182): OPNsense\Core\Config->checkvalid()
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(221): OPNsense\Core\Config->fromArray(Array, Object(SimpleXMLElement), 'winsserver')
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(221): OPNsense\Core\Config->fromArray(Array, Object(SimpleXMLElement), 'opt1')
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(221): OPNsense\Core\Config->fromArray(Array, Object(SimpleXMLElement), 'dhcpd')
#4 /usr/local/etc/inc/config.inc(156): OPNsense\Core\Config->fromArray(Array)
#5 /usr/local/www/services_dhcp.php(458): write_config()
#6 {main}
thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 240
...create a static lease (from a dynamic lease) and save it:
Fatal error: Uncaught OPNsense\Core\ConfigException: no valid config loaded in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:240
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(182): OPNsense\Core\Config->checkvalid()
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(221): OPNsense\Core\Config->fromArray(Array, Object(SimpleXMLElement), 'winsserver')
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(221): OPNsense\Core\Config->fromArray(Array, Object(SimpleXMLElement), 0)
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(221): OPNsense\Core\Config->fromArray(Array, Object(SimpleXMLElement), 'staticmap')
#4 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(221): OPNsense\Core\Config->fromArray(Array, Object(SimpleXMLElement), 'opt1')
#5 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(221): OPNsense\Core\Config->fromArray(Array, Object(SimpleXMLElement), 'dhcpd')
#6 /usr/local/etc/inc/config.inc(156): OPNsense\Core\ in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 240
We're already working on it via 66f348cc5 and hotfix is not far away. In the meantime:
# opnsense-patch 66f348cc5
Cheers,
Franco
Awesome! And thanks for the awesomely quick response. :D
Online update to 18.7.5_1 should be visible on the mirrors now minus sync time. Everybody not affected can directly upgrade from 18.7.4 -> 18.7.5_1 :)
PS: many thanks for the quick report 鉂わ笍
Most helpful comment
We're already working on it via 66f348cc5 and hotfix is not far away. In the meantime:
Cheers,
Franco