Whamcloud - gitweb
LU-15565 utils: updated lfs getstripe yaml format 11/55311/6
authorFrederick Dilger <fdilger@whamcloud.com>
Fri, 31 May 2024 04:28:27 +0000 (00:28 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jun 2024 01:14:29 +0000 (01:14 +0000)
commit109b5499d3fdc42614497a70a67764f90f00f223
tree68b4da87270e991d28af1b116474dc6f90f96898
parent192c395d01062f2e1178ec8ce437f5eea42011c1
LU-15565 utils: updated lfs getstripe yaml format

For composite files 'lfs getstripe --yaml' used a key for each
component rather than an array. This hindered the use of the
output with common YAML tooling. The leading spaces meant users
needed to pre-process the output for seemingly no reason. Each
component also had the id harcoded into the name rather than
using a more flexible list ('components:').

'lfs setstripe --yaml YAML_FILE file|dir' is still compatible
with the previous YAML format incase there were stored files
being used.

The new YAML formatting has been check with results from
"https://zhwt.github.io/yaml-to-go/".

Modified the argument parsing in 'lfs_migrate' to be more
robust as it was failing tests 56[w[a-c],x[b,c]].

Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I50ff4ebd9413fb66f05647c11542f7ce9f1ba879
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55311
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/scripts/lfs_migrate
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c