Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: dcgm-exporter no longer gets hostNetwork when a host DCGM is set through dcgmExporter.env

Aperta Adatta ai principianti
#3,091 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@blacksoxx ci sta già lavorando.

Dal 19/10/2026.

  • #3092 di @blacksoxx — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
64/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, kubernetes
Ambito
backend, devops

Direzione di ricerca

Leggi TransformDCGMExporter in controllers/object_controls.go e il caso di test esistente “transform dcgm exporter with dcgm running on the host itself(DGX BaseOS).” Verifica come viene applicato dcgmExporter.env rispetto alla decisione sulla rete dell’host, quindi aggiungi un test unitario per il caso segnalato con l’ambiente del container vuoto. Il lavoro è completato quando quel caso imposta hostNetwork e la policy DNS prevista e il test passa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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):

  1. Install with --set dcgm.enabled=false --set dcgmExporter.env[0].name=DCGM_REMOTE_HOSTENGINE_INFO --set dcgmExporter.env[0].value=localhost:5555 on a node running nv-hostengine.
  2. The nvidia-dcgm-exporter pod runs without hostNetwork and 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)
Lingua principale
Go
Stelle
2.9k
Fork
576
Merge medio
1g 5h
PR unite (30g)
65

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/gpu-operator

Tutte le issue di NVIDIA/gpu-operator

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.