From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 6/6] network reload: fix UPID parsing
Date: Thu, 20 Apr 2023 23:36:22 +0200 [thread overview]
Message-ID: <20230420213622.685809-7-aderumier@odiso.com> (raw)
In-Reply-To: <20230420213622.685809-1-aderumier@odiso.com>
When warning or error from ifreload are logged,
They are received in 1 line in result of pvesh,
so the UPID is not at the begin, and not correctly parse
and throw a warning:
Use of uninitialized value $upid in pattern match (m//) at /usr/share/perl5/PVE/Tools.pm line 1106.
Use of uninitialized value $upid in concatenation (.) or string at /usr/share/perl5/PVE/Tools.pm line 1120.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
PVE/API2/Network/SDN.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/API2/Network/SDN.pm b/PVE/API2/Network/SDN.pm
index f129d60..33ecfb7 100644
--- a/PVE/API2/Network/SDN.pm
+++ b/PVE/API2/Network/SDN.pm
@@ -86,9 +86,10 @@ my $create_reload_network_worker = sub {
# FIXME: how to proxy to final node ?
my $upid;
+ print "$nodename: reloading network config\n";
run_command(['pvesh', 'set', "/nodes/$nodename/network"], outfunc => sub {
my $line = shift;
- if ($line =~ /^["']?(UPID:[^\s"']+)["']?$/) {
+ if ($line =~ /["']?(UPID:[^\s"']+)["']?$/) {
$upid = $1;
}
});
--
2.30.2
next prev parent reply other threads:[~2023-04-20 21:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 21:36 [pve-devel] [PATCH pve-network 0/6] sdn multiples fixes Alexandre Derumier
2023-04-20 21:36 ` [pve-devel] [PATCH pve-network 1/6] fix #4657 : evpn: fix exit-node with multiple vrf Alexandre Derumier
2023-04-20 21:36 ` [pve-devel] [PATCH pve-network 2/6] fix #4425: vxlan|evpn: add vxlan-port option Alexandre Derumier
2023-04-20 21:36 ` [pve-devel] [PATCH pve-network 3/6] fix #4662 : frr: fix config generation ordering Alexandre Derumier
2023-04-20 21:36 ` [pve-devel] [PATCH pve-network 4/6] fix #4389 : evpn: exit nodes : null routes subnets from other zones Alexandre Derumier
2023-04-20 21:36 ` [pve-devel] [PATCH pve-network 5/6] fix #4683 : zones: qinq: fix vlan-protocol with bridge vlan aware Alexandre Derumier
2023-04-20 21:36 ` Alexandre Derumier [this message]
2023-06-06 8:42 ` [pve-devel] applied: [PATCH pve-network 0/6] sdn multiples fixes 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=20230420213622.685809-7-aderumier@odiso.com \
--to=aderumier@odiso.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