bhouse-nexthop opened a new issue, #14832:
URL: https://github.com/apache/cloudstack/issues/14832

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to