From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 1/1] pvereport: fix sdn output
Date: Fri, 18 Apr 2025 14:39:34 +0200 [thread overview]
Message-ID: <20250418123934.2840407-1-s.hanreich@proxmox.com> (raw)
The SDN subfolder on pmxcfs can contain subfolders (fabrics,
firewall). The existing regex matched every element contained in the
sdn subfolder, which caused dir2text to trip up, since it fails when
trying to open directories.
Handle cfg, json and the running-config files separately, so they
are nicely grouped together in the pve report. Add the SDN firewall
subdirectory to the firewall section, since it fits better there than
in the SDN section.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
PVE/Report.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/PVE/Report.pm b/PVE/Report.pm
index 8f53823e6..31ddadf39 100644
--- a/PVE/Report.pm
+++ b/PVE/Report.pm
@@ -80,7 +80,9 @@ my $init_report_cmds = sub {
'ip -details -6 route show',
'cat /etc/network/interfaces',
sub { dir2text('/etc/network/interfaces.d/', '.*') },
- sub { dir2text('/etc/pve/sdn/', '.*') },
+ 'cat /etc/pve/sdn/.running-config',
+ sub { dir2text('/etc/pve/sdn/', '.+\.cfg') },
+ sub { dir2text('/etc/pve/sdn/', '.+\.json') },
],
},
firewall => {
@@ -88,6 +90,7 @@ my $init_report_cmds = sub {
cmds => [
sub { dir2text('/etc/pve/firewall/', '.+\.fw') },
'cat /etc/pve/local/host.fw',
+ sub { dir2text('/etc/pve/sdn/firewall/', '.+\.fw') },
'iptables-save -c | column -t -l4 -o" "',
],
},
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-04-18 12:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 12:39 Stefan Hanreich [this message]
2025-04-22 8:12 ` [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=20250418123934.2840407-1-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