Whamcloud - gitweb
LU-18715 utils: Extend lctl nodemap_info with property values 52/58052/8
authorMarc Vef <mvef@whamcloud.com>
Wed, 12 Feb 2025 16:16:38 +0000 (17:16 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 May 2025 04:05:04 +0000 (04:05 +0000)
commitb8e3b427f47876ffa65b4198e096219aaa9798d4
tree3d308274441d07b7fe0a3f9fa23f72f97cd9e939
parent9492aeb743153345d546998da41ebad6987b1626
LU-18715 utils: Extend lctl nodemap_info with property values

The command "lctl nodemap_info" only presents information about which
property names exist for a given nodemap. It does not show the values
for each property, and the command's usefulness is therefore limited.
Further, nodemap property values are generally retrieved via the "lctl
get_param" interface which is inconsistent with how nodemap properties
are set, i.e., by using the "lctl nodemap_*" interface rather than the
"lctl set_param" interface.

This patch extends the "lctl nodemap_info" command to improve
usability, presenting in-depth information, including the global
nodemap state (active/inactive), property availability and
descriptions, all defined nodemaps, and the values for all nodemap
properties.

Extended options:
lctl nodemap_info [-l/--list] [-n/--name NODEMAP_NAME]
[-p/--property PROPERTY_NAME]

List the values of all properties for all nodemaps:
"lctl nodemap_info"

List the value of the specific "ranges" property for the "remote"
nodemap: "lctl nodemap_info --name remote --property ranges"

"--name" and "--property" can be used individually to show the
properties of all nodemaps or all properties of a specific nodemap.
Note the previous positional arguments [all,list,<nodemap>] are
retained for backward-compatibility.

Added sanity-sec 25a to test these modifications.

Test-Parameters: trivial testlist=sanity-sec env=ONLY="25 25a"
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: Ic09710233de490d8eb2f50a74e2b7e4765ca4f3d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58052
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/Makefile.am
lustre/doc/lctl-nodemap-info.8 [new file with mode: 0644]
lustre/doc/lctl-nodemap_info.8 [new file with mode: 0644]
lustre/tests/sanity-sec.sh
lustre/utils/lctl.c
lustre/utils/lustre_cfg.c
lustre/utils/obd.c