From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id C31911FF0B3 for ; Wed, 09 Sep 2026 12:44:13 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 09D00217CE; Wed, 09 Sep 2026 12:42:21 +0200 (CEST) From: Hannes Laimer To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v2 15/16] sdn: bring the dhcp backends up at boot before the guests start Date: Wed, 9 Sep 2026 12:41:43 +0200 Message-ID: <20260909104144.1110031-16-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260909104144.1110031-1-h.laimer@proxmox.com> References: <20260909104144.1110031-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: 1788950517432 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.536 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: 2Y4ZUMC3YNYQEK7Q57KDOWHBBRQHWDY7 X-Message-ID-Hash: 2Y4ZUMC3YNYQEK7Q57KDOWHBBRQHWDY7 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 state in bpffs and under /run, both gone after a reboot. Without pending SDN changes nothing loaded it again until the first guest plugged an interface. Every guest starting alongside then queued on that first plug's full pass, and one waiting longer than the lock bound started without the responder. The SDN commit runs on every boot, so it brings the backends up first, whether SDN changes are pending or not. Its unit is ordered after the cluster filesystem it reads, and the guests and the HA local resource manager are ordered behind it. A node without quorum at boot holds them until it has one, the guests waited for that anyway. The commit's own work holds them as well, so the resource manager now waits with the guests. Signed-off-by: Hannes Laimer --- bin/pve-sdn-commit | 3 +++ services/pve-sdn-commit.service | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/pve-sdn-commit b/bin/pve-sdn-commit index aa7e9b29..ed2d6935 100644 --- a/bin/pve-sdn-commit +++ b/bin/pve-sdn-commit @@ -96,6 +96,9 @@ sub sdn_changed { return fabrics_changed(); } +# the dhcp backends bring back what a reboot took, pending changes or not +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..c96a4b55 100644 --- a/services/pve-sdn-commit.service +++ b/services/pve-sdn-commit.service @@ -2,7 +2,8 @@ Description=Commit Proxmox VE SDN changes DefaultDependencies=no Wants=pve-cluster.service network.target -After=frr.service network.target corosync.service +After=frr.service network.target corosync.service pve-cluster.service +Before=pve-guests.service pve-ha-lrm.service [Service] ExecStart=/usr/share/pve-manager/helpers/pve-sdn-commit -- 2.47.3