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-network 1/1] sdn: api: rename parameter from skip-frr to regenerate-frr
Date: Mon,  4 Aug 2025 15:47:04 +0200	[thread overview]
Message-ID: <20250804134706.408039-3-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250804134706.408039-1-s.hanreich@proxmox.com>

Parameter has moved from skip_frr to regenerate-frr in pve-manager.
Also invert the check for generating the boolean, since the logic is
inverted now.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 src/PVE/API2/Network/SDN.pm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/PVE/API2/Network/SDN.pm b/src/PVE/API2/Network/SDN.pm
index 6645f28..d3b15f1 100644
--- a/src/PVE/API2/Network/SDN.pm
+++ b/src/PVE/API2/Network/SDN.pm
@@ -90,12 +90,10 @@ __PACKAGE__->register_method({
 });
 
 my $create_reload_network_worker = sub {
-    my ($nodename, $skip_frr) = @_;
+    my ($nodename, $regenerate_frr) = @_;
 
     my @command = ('pvesh', 'set', "/nodes/$nodename/network");
-    if ($skip_frr) {
-        push(@command, '--skip_frr');
-    }
+    push(@command, '--regenerate-frr') if $regenerate_frr;
 
     # FIXME: how to proxy to final node ?
     my $upid;
@@ -140,14 +138,14 @@ __PACKAGE__->register_method({
         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;
 
         my $code = sub {
             $rpcenv->{type} = 'priv'; # to start tasks in background
             PVE::Cluster::check_cfs_quorum();
             my $nodelist = PVE::Cluster::get_nodelist();
             for my $node (@$nodelist) {
-                my $pid = eval { $create_reload_network_worker->($node, $skip_frr) };
+                my $pid = eval { $create_reload_network_worker->($node, $regenerate_frr) };
                 warn $@ if $@;
             }
 
-- 
2.47.2


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


      parent reply	other threads:[~2025-08-04 13:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-04 13:47 [pve-devel] [PATCH manager/network 0/2] do not apply FRR configuration when reloading host network configuration Stefan Hanreich
2025-08-04 13:47 ` [pve-devel] [PATCH pve-manager 1/1] api: network: default to not regenerating the frr configuration Stefan Hanreich
2025-08-04 14:07   ` Thomas Lamprecht
2025-08-04 14:11     ` Stefan Hanreich
2025-08-04 14:13       ` Stefan Hanreich
2025-08-04 13:47 ` 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=20250804134706.408039-3-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