[Bug]: ClusterPolicy reconcile panics when a DaemonSet has no annotations
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- go, kubernetes
- Ambito
- backend, distributed-systems
Direzione di ricerca
Read controllers/object_controls.go and run go test -count=1 -run TestIsDaemonsetSpecChanged/nil_live_annotations ./controllers/ to reproduce the panic. The issue says the desired DaemonSet must have allocated annotations, while a nil live annotation map should be treated like a missing hash. Done means the test passes and reconciliation updates the live DaemonSet; a pull request is already open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
isDaemonsetSpecChanged panics when the live DaemonSet object has a nil annotation map. controller-runtime recovers the panic, so the operator process stays up, but that ClusterPolicy reconcile does not converge.
This was found by reading controllers/object_controls.go on main (operator v26.7.2). It is not a live cluster repro. The panic was added in 7843bcbfa, which assumed both DaemonSets already had an annotation map. Issue #499 was a different nil-map panic, in applyCommonDaemonsetMetadata, and that one was fixed.
To reproduce
From the code path:
- Call
isDaemonsetSpecChangedwith a live DaemonSet whosemetadata.annotationsis nil. - A real
apps/v1read does not produce that nil map. etcd stores the internal DaemonSet, and conversion toapps/v1always writesdeprecated.daemonset.template.generation. Removingnvidia.com/last-applied-hashleaves that annotation, so the map stays non-nil. - A unit test or a fake client can still pass a nil map. On main, that panics before the missing-hash branch runs.
Unit test, on current main:
go test -count=1 -run TestIsDaemonsetSpecChanged/nil_live_annotations ./controllers/
That case panics with appsv1.DaemonSet.Annotations must be allocated prior to calling isDaemonsetSpecChanged().
Expected behavior
Treat a nil live annotation map like a missing hash: set nvidia.com/last-applied-hash on the desired DaemonSet and update it. The NVIDIADriver path in internal/state/state_skel.go already does this with GetAnnotations().
The desired object should still be required to have an allocated annotation map. The caller allocates that before the compare.
I will open a pull request with that change. This does not implement #3071 (detecting spec drift beyond the stored hash).
- Lingua principale
- Go
- Stelle
- 2.9k
- Fork
- 582
- Merge medio
- 2g 2h
- PR unite (30g)
- 57
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/gpu-operator
-
[Bug]: dcgm-exporter no longer gets hostNetwork when a host DCGM is set through dcgmExporter.envForse già presa @blacksoxx l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
NVIDIA/gpu-operator#3091 ·
I maintainer di solito rispondono entro 1 giorno
-
feature lifecycle/frozen needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
NVIDIA/gpu-operator#3074 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: GPUCluster common name label breaks DRA validator selectorForse già presa @ajavanma l’ha presa 30 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NVIDIA/gpu-operator#2955 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Precompiled node pools drop kernels that sanitize to the same nameForse già presa @SebTardif l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 20/100
NVIDIA/gpu-operator#3098 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: driver-validation hides why a pre-installed driver failed and loops without a reasonForse già presa @fjvbn2003 l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
NVIDIA/gpu-operator#3085 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NVIDIA/gpu-operator
Issue simili
-
feature suggestion
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
openvibely/openvibely#1526 ·
I maintainer di solito rispondono entro 1 giorno
-
docs good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Usenova-Labs/usenova-backend#36 ·
I maintainer di solito rispondono entro 1 giorno
-
bug raised-by:verifier
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
medici-finance/assay#4177 ·
I maintainer di solito rispondono entro 1 giorno
-
bug: admin user creation silently ignores roleForse già presa @bfs2021 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
eugenioenko/autentico#553 ·
I maintainer di solito rispondono entro 1 giorno
-
sidecar: --moriio-parallel-dispatch omits remote_request_id, so a vLLM NixlPushConnector decode dies with KeyErrorForse già presa @xintin l’ha presa oggi. Apertakind/bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
llm-d/llm-d-router#3607 ·
I maintainer di solito rispondono entro 1 giorno