Expose node RealMemory without controller RPC#2774
Merged
Conversation
This was referenced Jul 23, 2026
fabrizio2210
force-pushed
the
agent/rpc-free-node-real-memory
branch
from
July 23, 2026 08:52
c22ed45 to
8ba59e7
Compare
fabrizio2210
force-pushed
the
agent/rpc-free-node-real-memory
branch
from
July 23, 2026 10:12
8ba59e7 to
137f04e
Compare
fabrizio2210
marked this pull request as ready for review
July 23, 2026 10:12
rdjjke
approved these changes
Jul 23, 2026
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
RealMemoryvalue into an authoritative container environment variable/run/soperator/node_metadata.envCHECKS_NODE_REAL_MEM_BYTESprefer the local metadata instead of querying the Slurm controllerWhy
Periodic health checks need the node's allocatable Slurm memory without issuing
scontrol show nodeon every run. The value must come from the same worker resource configuration used to render SlurmRealMemory, so it cannot drift from the node's scheduling configuration.This is a prerequisite for #2773 and is related to SCHED-1897, but it is kept in a separate PR because local node metadata is an independently useful feature.
Dependency
This PR is based directly on
main. The dependent idle-memory health check is stacked separately in #2773 and should be merged after this PR.#2742 was accidentally merged into #2743. The branch history was rebuilt to restore the independent RPC-free RealMemory scope, but GitHub retained #2743's old pull ref and would not reopen it after the force-push. This PR therefore replaces #2743, while #2773 carries the replacement idle-memory feature diff.
Impact
Workers publish the MiB-rounded Slurm
RealMemoryvalue in bytes through a root-owned, atomically replaced metadata file on the existing ephemeral/runvolume. Existing checks continue to requestCHECKS_NODE_REAL_MEM_BYTESunchanged. Workers that have not yet published the file use the existing Slurm controller lookup, preserving rolling-upgrade compatibility.Validation
Local validation after rebuilding the branch on current
main:go test ./internal/render/worker ./internal/render/commonbash -n images/worker/write_soperator_metadata.sh images/worker/slurmd_entrypoint.shgit diff --check main...HEADTested previously on a dev cluster:
/run/soperator/node_metadata.envwith the same value, permissions0644, owned byroot:rootslurmd_entrypoint.shcheck_runner.pycontained both the local metadata lookup and controller fallbackNode RealMemory from /run/soperator/node_metadata.envand returned119185342464, confirming the controller fallback was not usedscontrol show nodes -oreportedRealMemory=113664MiB for both nodes;113664 × 1048576 = 119185342464bytes, an exact match