public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 3/3] pve-sdn-commit: add ifreload
Date: Thu, 17 Jul 2025 17:28:56 +0200	[thread overview]
Message-ID: <20250717152856.398267-4-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250717152856.398267-1-s.hanreich@proxmox.com>

After generating the ifupdown2 configuration in SDN and before
generating the FRR configuration in SDN, we need to apply the changes
in ifupdown2, since the FRR generation logic relies on the network
configuration being applied in order to generate a correct FRR
configuration file.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 bin/pve-sdn-commit | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/bin/pve-sdn-commit b/bin/pve-sdn-commit
index 2654e17ed..69f93584e 100644
--- a/bin/pve-sdn-commit
+++ b/bin/pve-sdn-commit
@@ -4,11 +4,22 @@ use strict;
 use warnings;
 
 use PVE::Network::SDN;
+use PVE::Tools;
 
 PVE::Network::SDN::commit_config();
 
 PVE::Network::SDN::generate_zone_config();
 PVE::Network::SDN::generate_dhcp_config();
+
+my $err = sub {
+    my $line = shift;
+    if ($line =~ /(warning|error): (\S+):/) {
+        print "$2 : $line \n";
+    }
+};
+
+PVE::Tools::run_command(['ifreload', '-a'], errfunc => $err);
+
 PVE::Network::SDN::generate_controller_config(1);
 
 exit 0;
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


      parent reply	other threads:[~2025-07-17 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 15:28 [pve-devel] [PATCH manager 0/3] backport 'proxmox-network-interface-pinning fixes' Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 1/3] proxmox-network-interface-pinning: die on failing to write interfaces Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 2/3] proxmox-network-interface-pinning: fix pinning after reboot Stefan Hanreich
2025-07-17 15:28 ` Stefan Hanreich [this message]

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=20250717152856.398267-4-s.hanreich@proxmox.com \
    --to=s.hanreich@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal