all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC PATCH 1/2] frr: add networking.service as systemd dependency
Date: Thu, 26 Jun 2025 15:12:12 +0200	[thread overview]
Message-ID: <20250626131213.602226-1-g.goller@proxmox.com> (raw)

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


             reply	other threads:[~2025-06-26 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-26 13:12 Gabriel Goller [this message]
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

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=20250626131213.602226-1-g.goller@proxmox.com \
    --to=g.goller@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal