From: Stefan Sterz <s.sterz@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Fiona Ebner <f.ebner@proxmox.com>,
Mira Limbeck <m.limbeck@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager] report: filter comments in VM/CT configs
Date: Wed, 28 Dec 2022 15:18:20 +0100 [thread overview]
Message-ID: <e3a71252-2aca-0e89-a68c-cd98a5b05fb9@proxmox.com> (raw)
In-Reply-To: <e93d44a1-806f-82d8-0820-e4a5fb19c778@proxmox.com>
On 12/16/22 13:15, Fiona Ebner wrote:
> Am 15.12.22 um 17:57 schrieb Mira Limbeck:
>> diff --git a/PVE/Report.pm b/PVE/Report.pm
>> index 90b7cb1c..7ebe98f7 100644
>> --- a/PVE/Report.pm
>> +++ b/PVE/Report.pm
>> @@ -5,16 +5,34 @@ use warnings;
>>
>> use PVE::Tools;
>>
>> +my sub file2text {
>> + my ($file, $filter) = @_;
>> + my $text = "\n# cat $file\n";
>> +
>> + my $contents = PVE::Tools::file_get_contents($file);
>> + if ($filter) {
>> + foreach my $line (split('\n', $contents)) {
>> + next if $line =~ m/^\s*#/;
>> + next if $line =~ m/^cipassword/;
>> +
> Should we rather mask the value instead of dropping the whole line, so
> that we can see that /some/ cipassword is set? Might be more relevant
> for future filtered options.
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
maybe somewhat off-topic for the patch at hand, but it might be nice to
modularize the pve report. so that `pvereport` gives you a default set
of information, but you could also use `pvereport ha` to give you more
information specifically about the state of the ha manager or `pvereport
ceph` for information about ceph etc.
maybe paired with a verbose flag so that you could request more detailed
info. e.g. `pvereport zfs` gives the zfs information currently in the
report, but `pvereport zfs -v` could also include `arc_summary` and `cat
/sys/module/zfs/parameters/zfs_arc_max` and other less often needed but
sometimes useful information.
this might be handy especially in cases where you need information that
spans several files/commands that aren't always needed. it might make
the `pvereport` more useful in the forum too, where we currently can't
use it at all because it discloses too much information.
next prev parent reply other threads:[~2022-12-28 14:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 16:57 Mira Limbeck
2022-12-16 9:01 ` Stefan Sterz
2022-12-16 10:31 ` Thomas Lamprecht
2022-12-16 11:14 ` Mira Limbeck
2022-12-16 12:15 ` Fiona Ebner
2022-12-28 14:18 ` Stefan Sterz [this message]
2022-12-30 14:34 ` 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=e3a71252-2aca-0e89-a68c-cd98a5b05fb9@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=f.ebner@proxmox.com \
--cc=m.limbeck@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.