* [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency
@ 2025-06-26 13:12 Gabriel Goller
2025-06-26 13:12 ` [pve-devel] [RFC PATCH 2/2] debian: bump version Gabriel Goller
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gabriel Goller @ 2025-06-26 13:12 UTC (permalink / raw)
To: pve-devel
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@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@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@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@proxmox.com>
+---
+ tools/frr.service.in | 2 +-
+ tools/frr@.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@.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
+
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
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [RFC PATCH 2/2] debian: bump version
2025-06-26 13:12 [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency Gabriel Goller
@ 2025-06-26 13:12 ` Gabriel Goller
2025-07-24 15:07 ` [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency Gabriel Goller
2025-07-29 12:26 ` [pve-devel] applied: " Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Gabriel Goller @ 2025-06-26 13:12 UTC (permalink / raw)
To: pve-devel
Bump to 10.3.1-1+pve2. Add patch that adds networking.service to
frr.service dependencies.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
debian/changelog | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2f19f309424a..ec46e0a7c221 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+frr (10.3.1-1+pve2) UNRELEASED; urgency=medium
+
+ * add dependency on networking.service for frr.service to fix race
+ conditions where frr fails to configure interfaces that are not yet up.
+
+ -- Proxmox Support Team <support@proxmox.com> Thu, 26 Jun 2025 14:45:23 +0200
+
frr (10.3.1-1+pve1) trixie; urgency=medium
* update upstream source to 10.3.1
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency
2025-06-26 13:12 [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency Gabriel Goller
2025-06-26 13:12 ` [pve-devel] [RFC PATCH 2/2] debian: bump version Gabriel Goller
@ 2025-07-24 15:07 ` Gabriel Goller
2025-07-29 12:26 ` [pve-devel] applied: " Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Gabriel Goller @ 2025-07-24 15:07 UTC (permalink / raw)
To: pve-devel
ping
Hannes and I tried to fix the errors that appear when starting FRR
10.3.1 (even on a blank config). The errors look similar to these:
Jul 22 08:36:09 pve1 zebra[845]: libyang Invalid boolean value "". (/frr-vrf:lib/vrf/state/active)
Jul 22 08:36:09 pve1 zebra[845]: libyang Invalid type uint32 empty value. (/frr-vrf:lib/vrf/state/id)
(and some other ones).
For us this is partially fixed with this patch (which we obviously can't
upstream because frr doesn't rely on systemd) and the following PR:
https://github.com/FRRouting/frr/pull/19248.
This patch can be applied already, it also fixes some other errors like
frr starting before the dummy interfaces are created.
I'd like to wait a bit for some feedback from the maintainers before
backporting the PR though, as that's quite a tricky change and I don't
know if it is correct.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [RFC PATCH 1/2] frr: add networking.service as systemd dependency
2025-06-26 13:12 [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency Gabriel Goller
2025-06-26 13:12 ` [pve-devel] [RFC PATCH 2/2] debian: bump version Gabriel Goller
2025-07-24 15:07 ` [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency Gabriel Goller
@ 2025-07-29 12:26 ` Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-07-29 12:26 UTC (permalink / raw)
To: pve-devel, Gabriel Goller
On Thu, 26 Jun 2025 15:12:12 +0200, Gabriel Goller wrote:
> 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.
>
> [...]
Applied, thanks!
[1/2] frr: add networking.service as systemd dependency
commit: 84509be6283fb93c638bab0e958f275cd57a7171
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-29 12:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-26 13:12 [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency Gabriel Goller
2025-06-26 13:12 ` [pve-devel] [RFC PATCH 2/2] debian: bump version Gabriel Goller
2025-07-24 15:07 ` [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency Gabriel Goller
2025-07-29 12:26 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox