Whamcloud - gitweb
LU-18680 ptlrpc: Improve yaml output for nodemap offset
Nodemap offset presents loose values on lctl get_param:
$ lctl get_param -n nodemap.t0.offset
start_uid: 100000
limit_uid: 200000
start_gid: 100000
limit_gid: 200000
start_projid: 100000
limit_projid: 200000
This is technically valid YAML syntax, but not contextually bound as a
unit or to its key "offset". In the future, we want to save/restore
entire nodemap configurations. This means that the key "offset" is
necessary to relate the values to. This can be done via indenting or
more explicitly with {}, as done in this patch to be consistent with
other nodemap properties like ranges or idmap and to not necessarily
rely on indentation:
$ lctl get_param -n nodemap.t0.offset
{
start_uid: 100000,
limit_uid: 200000,
start_gid: 100000,
limit_gid: 200000,
start_projid: 100000,
limit_projid: 200000
}
Note, offsets are always shown even for zero, thus {} is not
shown when no offsets are defined.
Test-Parameters: trivial testlist=sanity-sec env=ONLY=27ab
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: I9b9a5411c3adcd39d45f29c8fc1d8c51163ba9b5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58085
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>