From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 662D21FF0C0 for ; Wed, 21 Oct 2026 10:47:55 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id EFC4A217FC; Wed, 21 Oct 2026 10:45:53 +0200 (CEST) From: Hannes Laimer To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v4 18/20] sdn: bring up the DHCP backends at boot before the guests start Date: Wed, 21 Oct 2026 10:44:43 +0200 Message-ID: <20261021084445.462195-19-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261021084445.462195-1-h.laimer@proxmox.com> References: <20261021084445.462195-1-h.laimer@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792572320773 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.357 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: XZ5MDZVV2OYPOYHOU6HR2NOYQQ45IAXU X-Message-ID-Hash: XZ5MDZVV2OYPOYHOU6HR2NOYQQ45IAXU X-MailFrom: h.laimer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The eBPF DHCP responder keeps its programs and maps pinned in bpffs, so they are gone after a reboot. The SDN commit helper now brings the DHCP backends back up on every boot, not only when it has changes to commit. The helper runs before the node and HA start the guests at boot. Otherwise the first guest interface plug loads the responder with a full pass, which holds the responder's lock exclusively. A guest starting meanwhile waits for that lock. One that waits too long comes up without the responder on its interface. Signed-off-by: Hannes Laimer --- Notes: v4: * log that the DHCP backends are being brought up bin/pve-sdn-commit | 4 ++++ services/pve-sdn-commit.service | 1 + 2 files changed, 5 insertions(+) diff --git a/bin/pve-sdn-commit b/bin/pve-sdn-commit index aa7e9b29..13231e4f 100644 --- a/bin/pve-sdn-commit +++ b/bin/pve-sdn-commit @@ -96,6 +96,10 @@ sub sdn_changed { return fabrics_changed(); } +# the dhcp backends bring back what a reboot took, pending changes or not +print "bringing up the DHCP backends\n"; +PVE::Network::SDN::Dhcp::boot(); + if (!sdn_changed()) { print "No changes to SDN configuration detected, skipping reload\n"; exit 0; diff --git a/services/pve-sdn-commit.service b/services/pve-sdn-commit.service index ff723725..825926be 100644 --- a/services/pve-sdn-commit.service +++ b/services/pve-sdn-commit.service @@ -3,6 +3,7 @@ Description=Commit Proxmox VE SDN changes DefaultDependencies=no Wants=pve-cluster.service network.target After=frr.service network.target corosync.service +Before=pve-guests.service pve-ha-lrm.service [Service] ExecStart=/usr/share/pve-manager/helpers/pve-sdn-commit -- 2.47.3