From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager v2 1/1] api: network: default to not regenerating the frr configuration
Date: Mon, 4 Aug 2025 16:01:48 +0200 [thread overview]
Message-ID: <20250804140152.423614-2-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250804140152.423614-1-s.hanreich@proxmox.com>
Default to not regenerating the FRR configuration, unless explicitly
requested. Otherwise applying the host network configuration would
reload and enable the FRR service. Invert the boolean from skip to
regenerate, since the logic is less convoluted this way.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
PVE/API2/Network.pm | 7 ++++---
bin/pve-sdn-commit | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 93f441bab..b423e19b5 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -891,10 +891,11 @@ __PACKAGE__->register_method({
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
- skip_frr => {
+ 'regenerate-frr' => {
type => 'boolean',
description => 'Whether FRR config generation should get skipped or not.',
optional => 1,
+ default => 0,
},
},
},
@@ -910,7 +911,7 @@ __PACKAGE__->register_method({
my $current_config_file = "/etc/network/interfaces";
my $new_config_file = "/etc/network/interfaces.new";
- my $skip_frr = extract_param($param, 'skip_frr');
+ my $regenerate_frr = extract_param($param, 'regenerate-frr');
assert_ifupdown2_installed();
@@ -931,7 +932,7 @@ __PACKAGE__->register_method({
};
PVE::Tools::run_command(['ifreload', '-a'], errfunc => $err);
- if ($have_sdn && !$skip_frr) {
+ if ($have_sdn && $regenerate_frr) {
PVE::Network::SDN::generate_frr_config(1);
}
};
diff --git a/bin/pve-sdn-commit b/bin/pve-sdn-commit
index 492963baf..6eeba301c 100644
--- a/bin/pve-sdn-commit
+++ b/bin/pve-sdn-commit
@@ -83,7 +83,7 @@ my $previous_config_has_frr = PVE::Network::SDN::running_config_has_frr();
PVE::Network::SDN::commit_config();
my $new_config_has_frr = PVE::Network::SDN::running_config_has_frr();
-my $skip_frr = !($previous_config_has_frr || $new_config_has_frr);
+my $regenerate_frr = ($previous_config_has_frr || $new_config_has_frr);
PVE::Network::SDN::generate_etc_network_config();
PVE::Network::SDN::generate_dhcp_config();
@@ -97,6 +97,6 @@ my $err = sub {
PVE::Tools::run_command(['ifreload', '-a'], errfunc => $err);
-PVE::Network::SDN::generate_frr_config(1) if !$skip_frr;
+PVE::Network::SDN::generate_frr_config(1) if $regenerate_frr;
exit 0;
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-08-04 14:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 14:01 [pve-devel] [PATCH manager/network v2 0/2] do not apply FRR configuration when reloading host network configuration Stefan Hanreich
2025-08-04 14:01 ` Stefan Hanreich [this message]
2025-08-04 14:01 ` [pve-devel] [PATCH pve-network v2 1/1] sdn: api: rename parameter from skip-frr to regenerate-frr Stefan Hanreich
2025-08-04 14:09 ` [pve-devel] [PATCH manager/network v2 0/2] do not apply FRR configuration when reloading host network configuration Friedrich Weber
2025-08-04 16:45 ` [pve-devel] applied-series: " 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=20250804140152.423614-2-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 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.