Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: flux resource status is incorrectly merging drain messages with specific field formatting options #6625

Open
kkier opened this issue Feb 11, 2025 · 1 comment

Comments

@kkier
Copy link
Contributor

kkier commented Feb 11, 2025

Reference:

[status.formats.long]
description = "Long flux-resource status format string"
format = "{state:>12} {color_up}{up:>2}{color_off} {nnodes:>6} +:{reason:<30.30+} {nodelist}"

Flux resource status is incorrectly merging drain messages in the {reason} field, apparently due to an interaction between the +: (do not truncate) and the + (display a plus sign if field is truncated) format options.

Sample output:

[root@ahwahnee1:6.1.0-82]# flux resource drain -f ahwahnee[1002-1003] "123456789012345678901234567890123"
[root@ahwahnee1:6.1.0-82]# flux resource status -o long -i ahwahnee[1002-1003]
       STATE UP NNODES REASON                            NODELIST
     drained  ✔      2 123456789012345678901234567890123 ahwahnee[1002-1003]
[root@ahwahnee1:6.1.0-82]# flux resource drain -f ahwahnee1002 "123456789012345678901234567890123456789"
[root@ahwahnee1:6.1.0-82]# flux resource status -o long -i ahwahnee[1002-1003]
       STATE UP NNODES REASON                                  NODELIST
     drained  ✔      2 123456789012345678901234567890123456789 ahwahnee[1002-1003]
@grondo
Copy link
Contributor

grondo commented Feb 12, 2025

I think Py was correct and the expand field +: should not be allowed with show truncation (+ suffix). For now a fix would be to remove the + from 30.30+ in the custom format.

Meanwhile I'll get a fix to silently ignore the truncation character if it is provided with +: (and hopefully that's not too difficult)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants