fix(config): respect ConfigMap values when CLI flag is not explicitly set#119
Merged
Merged
Conversation
… set LoadNvidiaConfig() loaded the ConfigMap into nvidiaConfig and then unconditionally overwrote DeviceSplitCount, DeviceCoreScaling, and GPUMemoryFactor with the corresponding CLI flag values. Because the flags carry per-flag defaults (e.g. --gpu-memory-factor=1), this silently discarded whatever the operator configured in the volcano-vgpu-device-config ConfigMap, even when the operator never passed the flag. The symptom that surfaced this is large-GPU nodes where the operator sets `gpuMemoryFactor: 1024` in the ConfigMap to keep the device-plugin ListAndWatch advertise under kubelet's 4 MiB gRPC window. The CLI default (1) overrode it, the device-plugin advertised ~92 K devices, kubelet dropped the advertise, and node Allocatable for volcano.sh/vgpu-memory was reported as 0. Gate the override on cli.Context.IsSet() so the flag wins only when the user actually passed it. Default behavior when the user supplies no flags and no ConfigMap is unchanged (zero values stay zero). Signed-off-by: Jea-Eok-Kim <je.kim@xiilab.com>
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 100milliongold, archlitchi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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
LoadNvidiaConfig()(pkg/util/util.go) loads the device-pluginConfigMap (
volcano-vgpu-device-config) intonvidiaConfig, and thenunconditionally overwrites
DeviceSplitCount,DeviceCoreScaling,and
GPUMemoryFactorwith the matching CLI flag values:Because each flag carries a per-flag default (
--gpu-memory-factor=1,--device-split-count=2, etc.), this silently discards whatever theoperator put in the ConfigMap, even when the flag is never passed on
the command line.
Symptom that surfaced this
On a node with 2 × 46 GiB GPUs, an operator sets
gpuMemoryFactor: 1024in the ConfigMap so the device-plugin advertises~88 vgpu-memory devices instead of ~92 K (so the kubelet ↔ plugin
ListAndWatch gRPC stays under the default 4 MiB receive limit). The
CLI default (1) silently overrode the ConfigMap, the plugin advertised
~92 K devices, kubelet dropped the advertise, and
kubectl describe nodereported:The Volcano scheduler's
capacityplugin then computesrealCapability = min(cluster_total, queue.capability) = 0and rejectsevery Pod with
queue resource quota insufficient: insufficient volcano.sh/vgpu-memory— even when the queue capability is setcorrectly.
The only way to make the ConfigMap-supplied value take effect today is
to also pass the same value via the DaemonSet
args:, which makes theConfigMap field useless.
Fix
Gate the CLI-flag override on
cli.Context.IsSet()so the flag winsonly when the user actually passed it on the command line.
Compatibility
The only behavior change is the second case — and that is the case the
ConfigMap fields exist for, so it's the bug-fix direction.
Test plan
go build ./pkg/util/...✓--gpu-memory-factorflag out of the DaemonSetargs, setgpuMemoryFactor: 1024only in the ConfigMap → node Allocatable correctly reportsvolcano.sh/vgpu-memory: 88and Pods withvolcano.sh/vgpu-memory: 23(chunks) schedule and run.Related
The 4 MiB ListAndWatch limit and the
gpuMemoryFactormitigation aredocumented in #118's README troubleshooting section. That PR is purely docs; this is the underlying behavior fix.