SCHED-138: add SOPERATOR_NODE_SETS_ON=true for static worker configuration#1638
Merged
SCHED-138: add SOPERATOR_NODE_SETS_ON=true for static worker configuration#1638
Conversation
## Problem Currently, slurmd daemon runs with dynamic node configuration using the `--conf` flag, which passes node configuration (NodeHostname, NodeAddr, RealMemory, Gres, Features) at runtime. This approach doesn't support the new structured partition configuration feature where node configuration is pre-defined in `slurm.conf` via NodeSets. ## Solution Added conditional logic to `slurmd_entrypoint.sh` that switches between two modes based on the `SOPERATOR_NODE_SETS_ON` environment variable: - When `SOPERATOR_NODE_SETS_ON=true`: runs slurmd without `--conf` flag, relying on node configuration from `slurm.conf` (generated by `AddNodeSetsToSlurmConfig` and `AddNodesToSlurmConfig`) - Otherwise: maintains backward compatibility with dynamic node configuration using `--conf` flag Refactored the script to use a bash array for slurmd arguments, eliminating code duplication and improving readability. ## Testing - Manual testing with `SOPERATOR_NODE_SETS_ON=true` to verify slurmd starts without `--conf` flag - Manual testing without the variable set to verify backward compatibility with existing dynamic node configuration - Verified slurmd logs show correct startup messages for both modes ## Release Notes Feature: Added support for structured partition configuration mode in slurmd. When `SOPERATOR_NODE_SETS_ON` environment variable is set to `true`, slurmd will use node configuration from `slurm.conf` instead of dynamic configuration, enabling NodeSet-based partition management. This change is backward compatible - existing clusters continue to work without modifications.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for structured partition configuration in slurmd by introducing the SOPERATOR_NODE_SETS_ON environment variable. When set to true, slurmd uses static node configuration from slurm.conf instead of dynamic configuration, enabling NodeSet-based partition management.
Key changes:
- Added conditional logic to switch between static and dynamic node configuration modes
- Refactored slurmd argument handling using bash arrays for better maintainability
- Maintained backward compatibility with existing dynamic configuration
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
theyoprst
reviewed
Oct 9, 2025
theyoprst
approved these changes
Oct 9, 2025
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.
Problem
Currently, slurmd daemon runs with dynamic node configuration using the
--confflag, which passes node configuration (NodeHostname, NodeAddr, RealMemory, Gres, Features) at runtime. This approach doesn't support the new structured partition configuration feature where node configuration is pre-defined inslurm.confvia NodeSets.Solution
Added conditional logic to
slurmd_entrypoint.shthat switches between two modes based on theSOPERATOR_NODE_SETS_ONenvironment variable:SOPERATOR_NODE_SETS_ON=true: runs slurmd without--confflag, relying on node configuration fromslurm.conf(generated byAddNodeSetsToSlurmConfigandAddNodesToSlurmConfig)--confflagRefactored the script to use a bash array for slurmd arguments, eliminating code duplication and improving readability.
Testing
SOPERATOR_NODE_SETS_ON=trueto verify slurmd starts without--confflagRelease Notes
Feature: Added support for structured partition configuration mode in slurmd. When
SOPERATOR_NODE_SETS_ONenvironment variable is set totrue, slurmd will use static node configuration fromslurm.confinstead of dynamic configuration, enabling NodeSet-based partition management. This change is backward compatible - existing clusters continue to work without modifications.