[LU-13857] jobstats output can produce invalid yaml Created: 05/Aug/20 Updated: 06/May/22 Resolved: 06/Mar/21 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.15.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Joe Grund | Assignee: | Feng Lei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
When calling lctl get_param obdfilter.*OST*.job_stats there may be values that fill all left padded space. For example:
- job_id: 56796601
snapshot_time: 1596652184
read_bytes: { samples: 62829, unit: bytes, min: 4096, max:16777216, sum: 141697982464 }
write_bytes: { samples: 2146, unit: bytes, min: 955, max: 1154584, sum: 320832894 }
getattr: { samples: 0, unit: reqs }
setattr: { samples: 0, unit: reqs }
punch: { samples: 1, unit: reqs }
sync: { samples: 0, unit: reqs }
destroy: { samples: 0, unit: reqs }
create: { samples: 0, unit: reqs }
statfs: { samples: 0, unit: reqs }
get_info: { samples: 0, unit: reqs }
set_info: { samples: 0, unit: reqs }
quotactl: { samples: 0, unit: reqs }
The max value (max:16777216) has no space between the key and value and is now considered a scalar instead of a key value mapping. |
| Comments |
| Comment by Peter Jones [ 17/Aug/20 ] |
|
Emoly Could you please investigate? Thanks Peter |
| Comment by James A Simmons [ 19/Aug/20 ] |
|
What exactly reports this as a incorrect YAML format? I wonder if this is a issue of the indentation since it generates different type of tokens. |
| Comment by Joe Grund [ 19/Aug/20 ] |
|
According to the spec max:16777216 is a scalar value and not a key / value pair. https://yaml.org/spec/1.2/spec.html
|
| Comment by James A Simmons [ 19/Aug/20 ] |
|
Ah it the lack of spacing. Another thing I noticed is the indentation in job_stats which produces a different sequence of YAML tokens. job_stats: - job_id: produces STREAM START [Block mapping] (Key token) scalar job_stats (Value token) <b>Start Block (Sequence)</b> <b>Start Block (Entry)</b> [Block mapping] (Key token) scalar job_id (Value token) scalar 56744 While ----- job_stats:
will drop the block sequence and well as the block end tokens. produces |
| Comment by Peter Jones [ 20/Feb/21 ] |
|
Feng Lei Could you please investigate this issue? Thanks Peter |
| Comment by Feng Lei [ 22/Feb/21 ] |
| Comment by Gerrit Updater [ 06/Mar/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41709/ |
| Comment by Peter Jones [ 06/Mar/21 ] |
|
Landed for 2.15 |