What happened:
Both flags are plain StringVars (cmd/scheduler/main.go:70-71), and IsValidNodeSchedulerPolicy / IsValidGPUSchedulerPolicy are only reached from the annotation path (score.go:155, util.go:352). Downstream each value hits a whole-string comparison with an unconditional else (NodeScoreList.Less, DeviceUsageList.Less), so an unrecognized value is not ignored, it selects the other policy. Nothing is logged.
Placing one small pod on two nodes, empty and half-reserved loaded:
--node-scheduler-policy="spread" -> empty
--node-scheduler-policy="Spread" -> loaded
--node-scheduler-policy="spraed" -> loaded
Sorting one idle and one busy GPU the way Fit walks the list from the tail:
--gpu-scheduler-policy="binpack" -> [busy idle]
--gpu-scheduler-policy="binpak" -> [idle busy]
What you expected to happen:
The scheduler refuses to start, the way #2769 refuses to act on an unrecognized annotation. The chart interpolates both values straight onto the command line (templates/scheduler/deployment.yaml:121-122) and there is no values.schema.json, so the flag is the only place left to catch this.
How to reproduce it (as minimally and precisely as possible):
Set scheduler.defaultSchedulerPolicy.nodeSchedulerPolicy: Spread in values.yaml. The scheduler binpacks.
Environment:
- HAMi version: master (
b5ec6b1)
What happened:
Both flags are plain
StringVars (cmd/scheduler/main.go:70-71), andIsValidNodeSchedulerPolicy/IsValidGPUSchedulerPolicyare only reached from the annotation path (score.go:155,util.go:352). Downstream each value hits a whole-string comparison with an unconditional else (NodeScoreList.Less,DeviceUsageList.Less), so an unrecognized value is not ignored, it selects the other policy. Nothing is logged.Placing one small pod on two nodes,
emptyand half-reservedloaded:Sorting one idle and one busy GPU the way
Fitwalks the list from the tail:What you expected to happen:
The scheduler refuses to start, the way #2769 refuses to act on an unrecognized annotation. The chart interpolates both values straight onto the command line (
templates/scheduler/deployment.yaml:121-122) and there is novalues.schema.json, so the flag is the only place left to catch this.How to reproduce it (as minimally and precisely as possible):
Set
scheduler.defaultSchedulerPolicy.nodeSchedulerPolicy: Spreadin values.yaml. The scheduler binpacks.Environment:
b5ec6b1)