worker: expose --heartbeat through hq alloc add#1117
Open
MauriceDHanisch wants to merge 1 commit into
Open
Conversation
heartbeat lived only on WorkerStartOpts (plain 'hq worker start'), not on SharedWorkerStartOpts, which alloc add slurm/pbs reuses for pilot worker args. Autoalloc-managed campaigns (100% of production usage) had no way to raise the default 8s heartbeat interval, which is too tight under the single-threaded executor's scheduling/registration load (see It4innovations#7). Move heartbeat onto SharedWorkerStartOpts as Option<Duration> with the 8s default applied at WorkerConfiguration construction instead of via clap's default_value, so plain worker start behavior is unchanged and alloc add can now pass --heartbeat through to the generated worker start command.
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
hq worker startalready accepted--heartbeat, buthq alloc add slurm/hq alloc add pbshad no way to set it — the field lived onWorkerStartOpts, not theSharedWorkerStartOptsthat autoalloc's generated worker command reuses.heartbeatontoSharedWorkerStartOpts(Option<Duration>, no default so we can detect "not set") and forwards it into the generatedhq worker start ...invocation inautoalloc.rsonly when explicitly provided, preserving the existing 8s default otherwise.Motivation
On a busy server (e.g. mid MILP scheduler solve, or handling a burst of other workers registering), the single-threaded executor can go long enough without polling that an already-connected worker's heartbeat looks lost even though nothing is actually wrong. Autoalloc-managed workers had no way to raise their heartbeat interval to ride this out, since the flag was never wired through
hq alloc add. Plainhq worker startwas unaffected — this only closes the gap for the autoalloc path.Test plan
cargo check -p hyperqueue -p takocargo test -p tako(no regressions)hq alloc add slurm --heartbeat 45srenders--heartbeat "45s"in the generated sbatch worker command