[Bug]: dcgm-exporter no longer gets hostNetwork when a host DCGM is set through dcgmExporter.env
维护者通常 1 天内回复
评估
调研方向
阅读 controllers/object_controls.go 中的 TransformDCGMExporter,以及现有测试用例“transform dcgm exporter with dcgm running on the host itself(DGX BaseOS).”。检查 dcgmExporter.env 相对于 host 网络决策的应用方式,然后为报告的容器环境变量为空的情况添加一个单元测试。完成标准是该情况设置 hostNetwork 和预期的 DNS 策略,并且测试通过。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
For DCGM running on the host (DGX BaseOS), TransformDCGMExporter enables hostNetwork and ClusterFirstWithHostNet when dcgm.enabled is false and DCGM_REMOTE_HOSTENGINE_INFO starts with localhost, so the exporter can reach nv-hostengine on localhost:5555.
The check reads the variable from the container (controllers/object_controls.go, the else branch after config.DCGM.IsEnabled()), but dcgmExporter.env is only applied at the end of the function. The shipped assets/state-dcgm-exporter/0800_daemonset.yaml does not set the variable, so the check always sees an empty value and the exporter stays on the pod network, where localhost:5555 is not reachable.
The order changed in 54c270cf3 ("Ensured user-supplied envvars take precedence"), first released in v25.10.0. The existing test case "transform dcgm exporter with dcgm running on the host itself(DGX BaseOS)" still passes because it puts the variable on the input DaemonSet container as well as in dcgmExporter.env.
To Reproduce
Found by reading the code and confirmed with a unit test on main (dbb11e851): TransformDCGMExporter with dcgm.enabled: false, dcgmExporter.env: [{name: DCGM_REMOTE_HOSTENGINE_INFO, value: "localhost:5555"}] and the container env empty returns a DaemonSet with the variable set but hostNetwork: false.
Expected on a cluster (not run):
- Install with
--set dcgm.enabled=false --set dcgmExporter.env[0].name=DCGM_REMOTE_HOSTENGINE_INFO --set dcgmExporter.env[0].value=localhost:5555on a node runningnv-hostengine. - The
nvidia-dcgm-exporterpod runs withouthostNetworkand cannot connect to the host engine.
Setting dcgmExporter.hostNetwork: true works around it.
Expected behavior
A localhost value from dcgmExporter.env enables hostNetwork as it did before v25.10.0. A fix that runs the check after the user env is applied is in #3092.
Environment (please provide the following information):
- GPU Operator Version: main at dbb11e851; the same code is in v26.7.2, and the order changed in v25.10.0
- OS, kernel, container runtime, Kubernetes distro: not run on a cluster; reproduced with a unit test (Go 1.27.2, macOS arm64)
- 主要语言
- Go
- 星标
- 2.9k
- 派生
- 576
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 65
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/gpu-operator 的其他 Issue
-
feature lifecycle/frozen needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
NVIDIA/gpu-operator#3074 · 2 条评论 ·
维护者通常 1 天内回复
-
[Bug]: nvidia-validator waits the full timeout on a failed validation pod; loadPodSpec panics可能已有人在做 @kvalliyurnatt 于 2 天前认领。 未关闭bug needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
NVIDIA/gpu-operator#3065 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug]: ClusterPolicy isDaemonSetReady can report Ready from a DaemonSet status of an older generation可能已有人在做 @kvalliyurnatt 于 2 天前认领。 未关闭bug needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
NVIDIA/gpu-operator#3060 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug]: GPUCluster common name label breaks DRA validator selector可能已有人在做 @ajavanma 于 28 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
NVIDIA/gpu-operator#2955 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: Precompiled node pools drop kernels that sanitize to the same name可能已有人在做 @SebTardif 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 20/100
NVIDIA/gpu-operator#3098 ·
维护者通常 1 天内回复
查看 NVIDIA/gpu-operator 的全部 Issue
相似的 Issue
-
usage: a custom provider's balance meters ("…%" in the balance path) ignore the Left/Used switch未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug iam-service
难度 2/5 1-3 小时 新手友好度 76/100
platform-mesh/platform-mesh#425 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
grafana/tempo-operator#1691 ·
维护者通常 1 天内回复
-
fix: presentation.go with mcp-table.go: the message for each MCP server comes back可能已有人在做 @mge1512 今天认领。 未关闭bug
难度 1/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
slavakurilyak/awesome-ai-agents#827 ·
维护者通常 1 天内回复