[pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency

Gabriel Goller g.goller at proxmox.com
Thu Jun 26 15:12:12 CEST 2025


Add networking.service to the 'After' dependency directive. Guarantees that
the frr.service will start after the networking.service is done.

We had some issues with data races between FRR and ifupdown [0], mostly
around the dummy interface. At startup, FRR and by extension fabricd is
up faster than the dummy interface which means that the interface won't
be configured properly. This does not happen with 10.3.1 anymore due to
this patch [1], which fixes the problem in the fabricd daemon.

This is a cleaner solution which will hopefully fix similar issues in
the future.

[0]: https://lore.proxmox.com/pve-devel/575dc158-c628-4343-ab8e-c3ea75da1507@proxmox.com/
[1]: https://github.com/FRRouting/frr/pull/17083

Suggested-by: Stefan Hanreich <s.hanreich at proxmox.com>
Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---

Sending this as an RFC as this could have some implications that I'm not
yet aware of. Feedback is welcome! This won't be merged upstream as FRR
doesn't require ifupdown2.

 ...add-dependancy-to-networking.service.patch | 51 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 debian/patches/pve/0007-systemd-add-dependancy-to-networking.service.patch

diff --git a/debian/patches/pve/0007-systemd-add-dependancy-to-networking.service.patch b/debian/patches/pve/0007-systemd-add-dependancy-to-networking.service.patch
new file mode 100644
index 000000000000..e547b0374caa
--- /dev/null
+++ b/debian/patches/pve/0007-systemd-add-dependancy-to-networking.service.patch
@@ -0,0 +1,51 @@
+From 570265b39158cd7f72e69116ddeedd25fd91db6b Mon Sep 17 00:00:00 2001
+From: Gabriel Goller <g.goller at proxmox.com>
+Date: Thu, 26 Jun 2025 13:42:43 +0200
+Subject: [PATCH] systemd: add dependancy to networking.service
+
+Add networking.service to the 'After' dependency directive. Guarantees that
+the frr.service will start after the networking.service is done.
+
+We had some issues with data races between FRR and ifupdown, mostly around the
+dummy interface. At startup, FRR and by extension fabricd is up faster than the
+dummy interface, which means that the interface won't be configured properly.
+This does not happen with 10.3.1 anymore due to this patch [0], which fixes the
+problem in the fabricd daemon.
+
+This is a cleaner solution which will also fix errors appearing in the
+journal.
+
+[0]: https://github.com/FRRouting/frr/pull/17083
+
+Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
+---
+ tools/frr.service.in  | 2 +-
+ tools/frr at .service.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: b/tools/frr.service.in
+===================================================================
+--- a/tools/frr.service.in	2025-06-26 13:42:43.835424384 +0100
++++ b/tools/frr.service.in	2025-06-26 13:42:43.833424382 +0100
+@@ -2,7 +2,7 @@
+ Description=FRRouting
+ Documentation=https://frrouting.readthedocs.io/en/latest/setup.html
+ Wants=network.target
+-After=network-pre.target systemd-sysctl.service
++After=network-pre.target systemd-sysctl.service networking.service
+ Before=network.target
+ OnFailure=heartbeat-failed@%n
+ 
+Index: b/tools/frr at .service.in
+===================================================================
+--- a/tools/frr at .service.in	2025-06-26 13:42:43.835424384 +0100
++++ b/tools/frr at .service.in	2025-06-26 13:42:43.833424382 +0100
+@@ -2,7 +2,7 @@
+ Description=FRRouting
+ Documentation=https://frrouting.readthedocs.io/en/latest/setup.html
+ Wants=network.target
+-After=network-pre.target systemd-sysctl.service
++After=network-pre.target systemd-sysctl.service networking.service
+ Before=network.target
+ OnFailure=heartbeat-failed@%n
+ 
diff --git a/debian/patches/series b/debian/patches/series
index c59ef31dfe6c..dd5b97af3086 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ pve/0003-tests-add-bgp-evpn-autort-test.patch
 pve/0004-zebra-add-ZEBRA_IF_DUMMY-flag-for-dummy-interfaces.patch
 pve/0005-fabricd-add-option-to-treat-dummy-interfaces-as-loop.patch
 pve/0006-fabricd-enable-dummy_as_loopback-option-per-default.patch
+pve/0007-systemd-add-dependancy-to-networking.service.patch
-- 
2.39.5





More information about the pve-devel mailing list