Whamcloud - gitweb
LU-18462 nodemap: sanity checks for positional parameters 87/57087/14
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 20 Nov 2024 14:31:15 +0000 (15:31 +0100)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 03:59:45 +0000 (03:59 +0000)
commitc037373ef0cc5a00a06f30a08f6f66977d46fb4e
treec9b334e143668655009c191abc577d349ac60bc5
parentfe4b49635d85fead1efbb4f06ac2c9e68ba76dfc
LU-18462 nodemap: sanity checks for positional parameters

A number of nodemap commands just take positional parameters instead
of options:
- nodemap_activate
- nodemap_add
- nodemap_del
- nodemap_test_nid
In this case, we need to check manually that we got the correct number
of arguments, and return a proper error message otherwise.

These commands are also modified to grok named options, in addition to
positional parameters that we will have to keep for some time for
backward compatibility reasons.

Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ie515e8e03f30581c7fb84efa3f881769fc02a397
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57087
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/doc/Makefile.am
lustre/doc/lctl-nodemap-add.8
lustre/doc/lctl-nodemap-del.8
lustre/doc/lctl-nodemap-modify.8
lustre/doc/lctl-nodemap-test-nid.8 [new file with mode: 0644]
lustre/doc/lctl-nodemap_test_nid.8 [new file with mode: 0644]
lustre/utils/lctl.c
lustre/utils/obd.c