Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
For composite files lfs getstripe --yaml uses a key for each component rather than an array:
$ lfs getstripe --yaml f0 lcm_layout_gen: 1 lcm_mirror_count: 2 lcm_entry_count: 2 component0: lcme_id: 65537 lcme_mirror_id: 1 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: EOF sub_layout: lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 2 lmm_objects: - l_ost_idx: 2 l_fid: 0x100020000:0xd1:0x0 component1: lcme_id: 131073 lcme_mirror_id: 2 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: EOF sub_layout: lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 3 lmm_objects: - l_ost_idx: 3 l_fid: 0x100030000:0xd1:0x0
Using "components0..." instead of any array is poor YAML style and hinders the use of the output with common YAML tooling. If an array ("components") was used instead of numbered keys then we could do things like:
lfs getstripe --yaml f0 | yq '.components[] | select(.lcme_flags == "init,stale")'
Attachments
Issue Links
Activity
Fix Version/s | New: Lustre 2.16.0 [ 15190 ] | |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Attachment | Original: no_pfl.txt [ 54889 ] |
The main reason to keep any of the existing output formats is compatibility with existing usage.
You are of course welcome to add a "--yaml2" output option that formats the layout differently, or a whole new llapi_* function that reads the file layout and parses directly into a c-yaml data structure, but those shouldn't break the existing usage.