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

Suggestion: ability to specify a node range in flux jobs #6202

Closed
kkier opened this issue Aug 8, 2024 · 1 comment
Closed

Suggestion: ability to specify a node range in flux jobs #6202

kkier opened this issue Aug 8, 2024 · 1 comment

Comments

@kkier
Copy link
Contributor

kkier commented Aug 8, 2024

Scenario:
As a sysadmin, I'm planning to do maintenance on an arbitrary set of nodes. After draining those nodes, I'd like an easy way to return a list of jobs running on them so I can contact the job owners/see when they'll expire/kill them outright/whatever. Something like flux jobs -i <hostlist> would make sense.

Design-wise, it arguably makes sense assume -A but that breaks the current paradigm.

@grondo
Copy link
Contributor

grondo commented Aug 8, 2024

Note there is sort of a solution to this proposed in #5711. It adds a query syntax to the -f, --filter option that would allow you to get this result with flux jobs -f host:<hostlist> -f running. That PR has never been merged because there isn't good consensus on the interface.

Perhaps filtering flux jobs by hostlist would be common enough that it should get its own option. I like your idea of using the -i, --include=hosts|ranks from the flux resource utilities, though I also wonder if that could be confusing in flux jobs which isn't listing resources (and not all jobs even have had resources assigned).

Anyway, we could support this option and and it with other filter options including any result of an advanced filter from -f, --filter= in the future.

grondo added a commit to grondo/flux-core that referenced this issue Aug 9, 2024
Problem: There is no easy way to restrict the output of flux-jobs(1)
based on a set of hosts or ranks, but this is basic and useful
functionality.

Add a new `-i, --include=` optiont that takes a hostlist or idset of
targets, and adds a constraint to the JobList query that restricts
matching jobs to those that were allocated the provided targets.

Fixes flux-framework#6202
@mergify mergify bot closed this as completed in fc83f32 Aug 12, 2024
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