Skip to content

slurm.conf.example: Filter out more Slurm node state flags #469

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

Merged
merged 1 commit into from
Jun 18, 2022

Conversation

kcgthb
Copy link
Contributor

@kcgthb kcgthb commented Feb 9, 2022

Slurm 21.08 introduced a new node state flag (^), and we missed a few before.
See https://slurm.schedmd.com/sinfo.html#SECTION_NODE-STATE-CODES for a complete list

@degremont
Copy link
Collaborator

Thanks for the patch. Overall looks good!

Could be nice if you try to keep a similar structure for the commit message with a title which starts with the part of code being touched. See e500d9b by example :)

@@ -18,8 +18,8 @@ reverse: sinfo -h -N -o "%R" -n $NODE
[slurmstate,st]
map: sinfo -h -o "%N" -t $GROUP
all: sinfo -h -o "%N"
list: sinfo -h -o "%T" | tr -d '*~#$@+'
reverse: sinfo -h -N -o "%T" -n $NODE | tr -d '*~#$@+'
list: sinfo -h -o "%T" | tr -d '*~#!%$@+^-'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope Slurm supports UTF-8, as it will eventually exhaust us-ascii special characters... ;)

Wondering if you should not have a different strategy, where you filter only keeping the standard characters and remove all the other ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't wait for emoji-based node states :)

But more seriously, I think the filtering should ideally not be based on what Slurm states strings could contain. but rather on what is considered acceptable characters in a group name, namely not those:

ILLEGAL_GROUP_CHARS = set("@,!&^*")

But I'm not sure we can get that illegal characters list in a group configuration file, can we?

@kcgthb kcgthb changed the title Filter more Slurm node state flags out slurm.conf.example: Filter out more Slurm node state flags Feb 9, 2022
* filter out the following characters from the node states returned by
  sinfo: *~#!%$@+^-

  Slurm 21.08 introduced a new node state flag (^), and we missed a few
  before. See https://slurm.schedmd.com/sinfo.html#SECTION_NODE-STATE-CODES
  for a complete list.
@kcgthb
Copy link
Contributor Author

kcgthb commented Feb 9, 2022

Good point about the commit message, fixed.

@degremont degremont self-requested a review March 3, 2022 13:21
Copy link
Collaborator

@degremont degremont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussion, i'm ok with the current patch

@thiell thiell added this to the 1.8.5 milestone Mar 21, 2022
@thiell thiell merged commit 2af25d8 into cea-hpc:master Jun 18, 2022
@thiell thiell modified the milestones: 1.8.5, 1.9 Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants