Repository navigation
ci: check the plugin against a live Slurm cluster - #74
Merged
Merged
Conversation
slurmrestd's jobs endpoint also lists completed, failed, and cancelled jobs that slurmctld still keeps, while squeue --json lists only unfinished ones, so a REST cluster counted ended jobs under "other" that a client command cluster did not. The parser now drops jobs whose base state is a finished one (unless still completing), so both transports count the same jobs. Adds output recorded from a live six-node cluster (slurm-docker-cluster 3.0.2 with 26.05.5 and 25.11.8) for both transports at data parser v0.0.43, and v0.0.45 on 26.05.5, with a unit test that checks the node states (including down and drained together, and a reason with a pipe), the maintenance reservation, task-weighted pending arrays, held jobs, and that both transports give identical job counts. The captures hold no token. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The slurm-live job starts slurm-docker-cluster (pinned by commit, MariaDB by digest) with six nodes, creates allocated, mixed, drained, down, down and drained, and maintenance nodes, a maintenance reservation, and running, pending, held, and array jobs, captures the client commands and slurmrestd paths the plugin reads for every data parser the release serves, and checks the raw JSON and the plugin's parser on it. The slurmrestd token goes from scontrol into a header file and is masked; it never reaches a command line or the log. 26.05.5 uses the published image pinned by digest and runs on every change. 25.11.8 has no published image and builds from source, which takes about eight minutes, so it runs on pushes to main, on a weekly schedule, and on request. 25.05 has no matching cluster configuration and stays on synthetic fixtures. ci-ok now needs the job. Release differences the checks allow for: 25.11.8 sets a node's maintenance flags minutes after the reservation starts, so the check waits with a bound and otherwise accepts the active MAINT reservation; the pending reason of jobs not pinned to a down node depends on the scheduler pass; and slurmrestd may serve fewer data parsers than the client lists, in which case only the client output is checked. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The client output research gains the results of the live cluster runs: sinfo's %T hides DOWN plus DRAIN, a pipe in a reason breaks delimited output, pending arrays arrive as one record, slurmrestd lists finished jobs, DYNAMIC_NORM on every dynamic node, the late maintenance flags on 25.11.8, and the data parsers each release serves. The plan's testing section and the README describe the CI job and what it does not cover. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The slurm-live job checked what the parser makes of captured output, but never ran the plugin's own transports against the cluster. A new step builds a cluster record for each data parser the release serves, gets the transport from Transports::for() as the reader does, and collects a snapshot through SlurmBackend: - the command transport runs squeue, scontrol, and sshare through a wrapper that runs them with docker exec in the slurmctld container, which has the cluster's slurm.conf and munge. prlimit is off there, since it would limit docker and not the client; - the slurmrestd transport reads the loopback daemon with the token in a token file that only the runner user can read, for each data parser the daemon serves. Each snapshot must complete every section and match the parse of the output fetch.sh captured just before: the job counts, each node's state, flags, reason, and partitions, and the partition and reservation names. Slurm 25.11 adds the maintenance reservation's flags to a node a few seconds late, so the snapshot may carry those flags, and only those, beyond the capture. The reader's database write is not part of the job; the Cacti replays cover it. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 38 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Milestone 3, part 2 of 2: a live Slurm cluster in CI. It follows #72.
docker execinto slurmctld, and REST uses a token file that only the runner user can read. The job asserts that each section completed and that the snapshot matches the parsed capture./jobs/also returns completed, failed and cancelled jobs that are still in memory, whilesqueue --jsonreturns only pending and running ones. The REST transport now filters to the same states, so both transports give identical counts. A test runs both fixture sets.ci-okneeds the live job.sinfo %Tprints "drained" for DOWN+DRAIN, and%Ereasons can contain|, so both come from JSON;DYNAMIC_NORMappears on every node;Testing
Not done here
Closes #40.