[pve-devel] [PATCH manager 2/3] pvereport: rework report contents

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Dec 21 17:15:16 CET 2020


On 21/12/2020 16:13, Aaron Lauterer wrote:
> @@ -76,7 +77,9 @@ my $init_report_cmds = sub {
>  
>      if (-e '/etc/ceph/ceph.conf') {
>  	# TODO: add (now working) rdb ls over all pools? really needed?
> -	push @{$report_def->{volumes}}, 'ceph status', 'ceph osd status', 'ceph df', 'pveceph status', 'pveceph pool ls';
> +	push @{$report_def->{volumes}}, 'pveceph status', 'ceph osd status',
> +		'ceph df', 'ceph osd df tree', 'cat /etc/ceph/ceph.conf',
> +		'ceph config dump', 'pveceph pool ls', 'ceph versions';
>      }

Oh, and I followed up on this one. I know, it's tempting to do "partial splits"
once a line is to long, but it's better to consequently move all atoms to different
lines once that is needed in general.

E.g.:

push @{$report_def->{volumes}},
    'pveceph status',
    'ceph osd status',
    'ceph df',
    '...',
    'ceph versions',
    ;

One could "cheat" by use multiple push operations, each adding a few commands, but it's
not that many lines here, so...
Oh, and actually, I'm not 100% sure about the push and @array being in the same line,
I treated this now as single atom as it's a perl built-in and always "push on X" with
the elements as argument. If it was a "normal" sub, the first argument would need to go
on it's line too.

In short, mirror that what rustfmt would do for similar rust code not breaking
any of our specific style rules (like indentation).

mostly just noting as we had a few style exchanges/discussion in the last days
already ^^





More information about the pve-devel mailing list