On 11/07/2025 11:52, Hannes Duerr wrote: > At the moment it is possible to query the Dhcp plugin types from the > `use PVE::Network::SDN::Dhcp::Plugin` without importing > `PVE::Network::SDN::Dhcp`. In consequence the section config is not > created although one would have been expected it to be created. > > Importing `use pve::network::sdn::Dhcp` would solve the issue, but since > this is not a nice pattern and in order to avoid such problems in the > future, we are now making it possible to query the plugin type from > DHCP. If you then import DHCP, the section config will be built > correctly. > > The problem was noticed/introduced after the ordering of the two imports > `use PVE::Network::SDN::Vnets` and `use PVE::Network::SDN::Vnets` were > swapped in pve-bridge [0], resulting in the error: > > file /etc/pve/sdn/zones.cfg line 2 (section 'simple') - unable to parse > value of 'dhcp': value 'dnsmasq' does not have a value in the enumeration '' > > The Zones Section Config no longer returned correct values for dhcp > because the Section Config was not yet built correctly at that time. > Swapping the entries back also solves the issue, because Vnets.pm is > importing `PVE::Network::SDN::Dhcp`, but that is also not really a nice > solution > > [0] > https://lore.proxmox.com/pve-devel/20250625155751.268047-6-f.eb...@proxmox.com/ > > Signed-off-by: Hannes Duerr <h.du...@proxmox.com> > ---
Tested that - currently, on trixie, a VM in a Simple zone with automatic DHCP doesn't get a DHCP lease, and the 'dnsmasq does not have a value in the enumeration' warning appears in the qmstart task log (but is not marked as a task log warning) - after applying these two patches, the VM gets a DHCP lease again Though I haven't really tested much other SDN functionality, consider this Tested-by: Friedrich Weber <f.we...@proxmox.com> _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel