interTwin-eu / interlink-slurm-plugin

MIT License
1 stars 3 forks source link

Hard-coded squeue instead of using config SqueuePath #23

Closed antoinetran closed 1 month ago

antoinetran commented 1 month ago

Short Description of the issue

When providing a squeue path different from default, interlink slurm plugin would still use squeue.

Environment

Steps to reproduce

Provides slurm config:

SqueuePath: /slurm-override/custom_squeue.sh
...

and rename squeue:

mv /usr/bin/squeue /usr/bin/squeueOld

Logs, stacktrace, or other symptoms

time="2024-09-27T16:23:18Z" level=info msg="Slurm Sidecar: received GetStatus call"
time="2024-09-27T16:23:18Z" level=error msg="unable to retrieve job status: /bin/bash: line 1: squeue: command not found\n"

Summary of proposed changes

Analyze: Hard-coded squeue: https://github.com/interTwin-eu/interlink-slurm-plugin/blob/0.3.2/pkg/slurm/Status.go#L60 It should have been using squeue from config: https://github.com/interTwin-eu/interlink-slurm-plugin/blob/0.3.2/pkg/slurm/Status.go#L81

antoinetran commented 1 month ago

For context explanation of why I need to force a different squeue, this is because I need to provide a SLURM_JWT token at each squeue/sbatch/scancel invocation. For that I wrote a wrapper to be called. Not running this wrapper but running squeue results in a munge issue because I don't mount munge for security reason.

dciangot commented 1 month ago

Merged, going to test it with the test suite during the weekend