Skip to content

CKS: nothing detects drift between a cluster's VM map, its VMs and its Kubernetes nodes #14665

Open

Description

@bhouse-nexthop

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

  1. Create a CKS cluster and wait for it to be Running.
  2. 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).
  3. 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.

Activity

  1. added this to the 4.22.3 milestone on Nov 11, 2026
  2. github-actions commented on Nov 11, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    CKS does not check its kubernetes_cluster_vm_map against the cluster's VMs or its Kubernetes nodes. When they drift (for example a row removed by hand, or a node replaced outside CKS), the cluster can sit in Alert with no explanation, or a VM can be invisible to CloudStack. The request is detection only: the status scanner compares the three sources and raises an alert and event for each mismatch, without changing the map.

    📊 Assessment

    Dimension Value Reasoning
    Type type:enhancement New detection and alerting; no data change requested
    Component component:cks CKS status scanner and VM map
    Severity n/a Not a bug report
    Labels type:enhancement, component:cks
    Coding agent Suitable Requirements are clear and limited to detection and events

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction: remove a row from kubernetes_cluster_vm_map for a running cluster, then check the scanner output and the alerts.
    • Alerts should be raised once per mismatch, as the reporter asks, to avoid flooding on every scan.

    Generated by Daily Issue Triage · copilot · haiku55 · ~6 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions