Whamcloud - gitweb
LU-14590 utils: merge similar list_param params 24/55724/31
authorFrederick Dilger <fdilger@whamcloud.com>
Wed, 10 Jul 2024 06:24:01 +0000 (00:24 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 2 May 2025 02:17:31 +0000 (02:17 +0000)
commita2e3a2f5a3a891fc3fed391023b3cdb65af2d427
tree3dd94a4550110db5e704c616f1a3e747ed642849
parent33e6c43e4c8739885bd6329f350148d8324563bd
LU-14590 utils: merge similar list_param params

New [--merge|-m], [--no-merge|-M] and [--dshbak|-b] options have
been added to be able to collapse repeated parameters.
[--merge|-m] will collapse any parameters with the same parameter
name, if used with get_param, matching params that have differing
values will have the differences be printed in red.

New [--color|-c auto|always|never] option to selected whether to
print parameters in color or not.

--merge is enabled by default when using list_param or --dshbak.
If --merge is disabled, duplicate parameters will be printed in
yellow (duplicates with different values will still be highlighted).

--dshbak will replace any instance of MDT|OST|QMT[0-9]* with
MDT|OST|QMT* meaning that for any system with more than one
OST|MDT this will greatly reduce the number of parameters being
printed.

sanity.sh test_0d was failing due to 'mgs.MGS.*' returning
'mgs.MGS.clear', and 'mgs.MGS.clear.uuid' is not a valid parameter
path, so the new param pattern is 'mgs.MGS.*.uuid' to avoid this from
happening. "uuid" is then removed to obtain the appropriate
directory.

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I03c85eb42160d90ce7435ce7fa5524b292fd55a7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55724
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/doc/lctl-get_param.8
lustre/doc/lctl-list_param.8
lustre/tests/sanity.sh
lustre/utils/lctl.c
lustre/utils/lctl_thread.h
lustre/utils/lustre_param.c
lustre/utils/obdctl.h