CKS: nothing detects drift between a cluster's VM map, its VMs and its Kubernetes nodes
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- java, kubernetes
- Bereich
- cloud, observability
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.4k
- Ø Merge
- 7 T. 16 Std.
- Gemergte PRs (30 T.)
- 15
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apache/cloudstack
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizeEvtl. vergeben @bhouse-nexthop hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/cloudstack#14645 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedEvtl. vergeben @bhouse-nexthop hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/cloudstack#14633 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Evtl. vergeben @bhouse-nexthop hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/cloudstack#14631 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
apache/cloudstack#14625 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Evtl. vergeben @willbennett-devops hat das vor 12 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/cloudstack#14545 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in apache/cloudstack
Ähnliche Issues
-
[FEATURE] Expose external refresh, node-level translog and warmer statsEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenuntriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
-
Good First Issue
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
hiero-ledger/hiero-sdk-java#3059 ·
Maintainer antworten meist innerhalb von 1 Tag