Skip to content

Fail the job when a --qpu resource is not in the config - #209

Merged
ohtanim merged 1 commit into
mainfrom
aw/fail-unknown-resource
Sep 30, 2026
Merged

ohtanim merged 1 commit into
mainfrom
aw/fail-unknown-resource

Conversation

@awennersteen

@awennersteen awennersteen commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description of Change

Follow-up to #205;

With --qpu=A,B and B missing from qrmi_config.json, the job still ran with A only, which is what #205 stopped for a failed acquire. The not-found path now records the error and stops the same way, and slurm_spank_task_init()` cancels the job.

Note that this does not handle services or dynamic resources. But, I don't think the current spank_plugins do that anyways? By adding this, we also ensure that we must correctly implement those cases later on.

This is a documented behaviour change: the README used to say unknown resource names are ignored. Its line is rewritten here.

With --qpu=A,B and B missing from qrmi_config.json, the job still ran
with A only, as a failed acquire used to. Treat it the same way: record
the error, stop, and let slurm_spank_task_init() cancel the job.
@awennersteen
awennersteen marked this pull request as ready for review September 30, 2026 12:19

@ohtanim ohtanim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. This was already on my TODO list as well. I agree that this is a reasonable behavior.

@ohtanim
ohtanim merged commit c3d5679 into main Sep 30, 2026
2 checks passed
@ohtanim
ohtanim deleted the aw/fail-unknown-resource branch September 30, 2026 12:23
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

Successfully merging this pull request may close these issues.

2 participants