Whamcloud - gitweb
LU-16574 udsp: lnetctl udsp improvements 87/51087/2
authorChris Horn <chris.horn@hpe.com>
Tue, 9 May 2023 15:58:15 +0000 (09:58 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 20 Jun 2023 03:47:54 +0000 (03:47 +0000)
commit9e6c0915bb73a04e288d85e4ceb22869ed48359c
tree5777e9412c425c7a4f3f6ac5cd7a43e8ae99770e
parent8d09b3e77744973d10d2029028d7e6f14591bc6d
LU-16574 udsp: lnetctl udsp improvements

lnet_udsp_del_policy() did not previously return non-zero, but its
single caller would check for a non-zero and call
lnet_udsp_apply_policies(). This code is removed.
lnet_udsp_del_policy() will now return non-zero but only in the case
where there is no matching policy index. In this case the policies
are not modified and thus we needn't re-apply them.

Modify some error checking for lnetctl udsp commands to provide better
error messages.

Correct typos in lustre_lnet_add_udsp() error messages.

Correct lustre_lnet_del_udsp()'s handling of errno.

Update help text of udsp commands.

Use parse_long() in jt_show_udsp() to parse the idx argument.

Sanity check priority and idx arguments for udsp add/del rather than
silently modifying them when the user passes in bad values.

Implement 'lnetctl udsp del --all' to provide easy way for admin to
delete all configured policies (this is equivalent to
'lnetctl udsp del --idx -1', but it is more user friendly). The
udsp del command now requires either --all or --idx be specified.

Test-Parameters: trivial
HPE-bug-id: LUS-11490
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ie5e91d8ac1c810473768566593e993e47070e14c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51087
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c
lnet/lnet/udsp.c
lnet/utils/lnetconfig/liblnetconfig_udsp.c
lnet/utils/lnetctl.c