You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
addNodesToKubernetesCluster silently skips invalid VMs and reports success #14832
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
Create a CKS cluster.
Deploy VM A from a CKS template on the cluster network, and VM B from a template not marked for CKS.
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.
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
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.
Activity
github-actions commentedon Dec 1, 2026
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
addNodesToKubernetesClustervalidates 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
KubernetesClusterManagerImpl.validateNodesand the add-node pathInvalidParameterValueExceptionbefore any node is touched🔗 Similar issues
addNodesToKubernetesClusterreports success when a node is not added; same symptom after validation💡 Notes and suggestions
addNodesToKubernetesClusterwith both IDs.Add this agentic workflow to your repo
To install this agentic workflow, run