Skip to content

addNodesToKubernetesCluster silently skips invalid VMs and reports success #14832

Backlog

Description

@bhouse-nexthop

problem

addNodesToKubernetesCluster checks each VM id in validateNodes, but a VM that fails a check is only logged and dropped from the list. The add worker then runs on the rest, and the job reports success. The caller is never told that some of the VMs it asked for were not added, and the UI shows nothing either.

VM passed result
removed (expunged) VM dropped silently
template not found or deleted dropped silently
template not marked for CKS dropped silently
default NIC not on the cluster network dropped silently
VM with no default NIC NullPointerException
VM already in this cluster dropped silently
valid VM added

The request fails only when every VM is dropped, and then with a generic "No valid nodes found to be added" error that names no VM and gives no reason.

versions

4.21.0 and later (4.22 branch, main)

The steps to reproduce the bug

  1. Create a CKS cluster.
  2. Deploy VM A from a CKS template on the cluster network, and VM B from a template not marked for CKS.
  3. Call addNodesToKubernetesCluster id=<cluster> nodeids=<A>,<B>.
  4. The job succeeds. A is added; B is not, and nothing in the response says so.

What to do about it?

Reject the whole request up front with an InvalidParameterValueException that names each invalid VM and why, before any node is touched.

Activity

  1. github-actions commented on Dec 1, 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

    addNodesToKubernetesCluster validates each VM, but a VM that fails a check is only logged and dropped. The job then runs on the remaining VMs and reports success. The caller and the UI are not told that some requested VMs were not added. The reporter lists several cases (expunged VM, missing or non-CKS template, wrong network, already in the cluster) and notes a NullPointerException for a VM with no default NIC. The reporter asks for the request to be rejected up front with an error that names each invalid VM.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug Invalid VMs are dropped silently and the job reports success, with reproduction steps
    Component component:cks KubernetesClusterManagerImpl.validateNodes and the add-node path
    Severity Severity:Major Requested VMs are not added while the request reports success
    Labels type:bug, component:cks, Severity:Major Based on the issue text
    Coding agent Suitable Fix is specified: reject the whole request with a per-VM InvalidParameterValueException before any node is touched

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction: deploy VM A from a CKS template and VM B from a template that is not marked for CKS, then call addNodesToKubernetesCluster with both IDs.
    • The VM-with-no-default-NIC case is a separate NullPointerException and should be covered by the same change.

    Generated by Daily Issue Triage · copilot · haiku55 · ~9 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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions