CKS: nothing detects drift between a cluster's VM map, its VMs and its Kubernetes nodes
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java, kubernetes
- Ambito
- cloud, observability
Direzione di ricerca
Start by reading the CKS cluster status scanner and its handling of cluster VMs, then trace how it can access the cluster's Kubernetes nodes and raise alerts and events. Compare the VM map, actual VMs, and Kubernetes nodes for each mismatch. Done means each mismatch produces an alert and event naming the cluster and affected VM or node once, without changing the map.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
problem
CKS keeps the list of VMs of each Kubernetes cluster in kubernetes_cluster_vm_map. Scale, upgrade, stop/start and the cluster status scanner all trust that list. Nothing checks it against the VMs that actually exist or against the nodes Kubernetes knows about, so when the two drift apart nobody is told:
- a VM that is in the map but has been destroyed or expunged, or no longer exists, keeps the cluster in Alert (the scanner compares the map's size and VM states against the expected node count), and the next scale or upgrade works from a wrong list;
- a VM that runs as a node of the cluster but is not in the map is invisible to CloudStack: it is not scaled, upgraded, stopped or deleted with the cluster;
- a Kubernetes node with no VM behind it, or a mapped running VM that is not a Kubernetes node, means the cluster Kubernetes runs is not the one CloudStack thinks it manages.
The API and UI refuse to destroy a VM that belongs to a CKS cluster, so the map does not drift through normal use. It drifts when:
- a node is rebuilt or replaced by hand (a new VM joined to the cluster, the old one removed outside CKS);
- the database is edited by hand;
- a destroy or expunge fails during a scale-down, which removed the VM from the map but could leave the VM behind. That path is fixed in #14611.
A production cluster was found sitting in Alert with one of its control nodes missing from the map. The only way to find out why was to compare the map, the VMs and kubectl get nodes by hand.
versions
4.22 and main.
The steps to reproduce the bug
- Create a CKS cluster and wait for it to be Running.
- Remove one of its rows from
kubernetes_cluster_vm_map(or replace a worker node by hand with a new VM that joins the cluster). - The cluster moves to Alert, or keeps a node CloudStack does not know about, and no alert or event says which VM or node is the cause.
What to do about it?
Have the cluster status scanner compare the map with the cluster's VMs and its Kubernetes nodes, and raise an alert and an event naming the cluster and the VM or node for each mismatch, once per mismatch. Detection only, the map is not changed.
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.4k
- Merge medio
- 7g 16h
- PR unite (30g)
- 15
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 apache/cloudstack
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizeForse già presa @bhouse-nexthop l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/cloudstack#14645 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedForse già presa @bhouse-nexthop l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/cloudstack#14633 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Forse già presa @bhouse-nexthop l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/cloudstack#14631 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/cloudstack#14625 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Forse già presa @willbennett-devops l’ha presa 12 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/cloudstack#14545 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/cloudstack
Issue simili
-
[FEATURE] Expose external refresh, node-level translog and warmer statsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertauntriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
-
Good First Issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
hiero-ledger/hiero-sdk-java#3059 ·
I maintainer di solito rispondono entro 1 giorno