public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Friedrich Weber <f.weber@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Hannes Duerr <h.duerr@proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-network 1/2] dhcp: make plugin types query from Dhcp.pm possible
Date: Wed, 16 Jul 2025 09:43:38 +0200	[thread overview]
Message-ID: <503e7b2f-4f3c-42b0-bf2f-32dc723b57e4@proxmox.com> (raw)
In-Reply-To: <20250711095206.30852-1-h.duerr@proxmox.com>

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.ebner@proxmox.com/
> 
> Signed-off-by: Hannes Duerr <h.duerr@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.weber@proxmox.com>



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-07-16  7:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11  9:52 Hannes Duerr
2025-07-11  9:52 ` [pve-devel] [PATCH pve-network 2/2] dhcp: remove unused SubnetPlugin import Hannes Duerr
2025-07-16  7:43 ` Friedrich Weber [this message]
2025-07-16 22:40 ` [pve-devel] applied: [PATCH pve-network 1/2] dhcp: make plugin types query from Dhcp.pm possible Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=503e7b2f-4f3c-42b0-bf2f-32dc723b57e4@proxmox.com \
    --to=f.weber@proxmox.com \
    --cc=h.duerr@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal