bhouse-nexthop opened a new pull request, #14802:
URL: https://github.com/apache/cloudstack/pull/14802

   ### Description
   
   Fixes #14801
   
   `removeNodesFromKubernetesCluster` now only removes nodes that were added 
with `addNodesToKubernetesCluster`.
   
   | id passed | before | after |
   |---|---|---|
   | VM in no cluster | processed, node count lowered | rejected |
   | VM of another cluster | processed, its PF rules revoked | rejected |
   | control node | drained, reset, SSH rule revoked | rejected |
   | etcd node | processed | rejected |
   | CKS-managed worker | reset, VM left running | rejected, points to 
`scaleKubernetesCluster` |
   | added node | removed | removed |
   | any id on an ExternalManaged cluster | processed | rejected, points to 
`removeVirtualMachinesFromKubernetesCluster` |
   
   - New `validateNodesRemovable()`: each id must have a 
`kubernetes_cluster_vm_map` row in this cluster with `external_node` set and 
neither `control_node` nor `etcd_node` set.
   - Errors are `InvalidParameterValueException`, naming the VM and cluster 
uuid.
   - `isCommandSupported` check added, like the other cluster commands.
   - No schema change.
   
   Related open PRs touching the same files, which merge cleanly with this one:
   - #14796 (`validateNodes` for add)
   - #14800 (remove worker firewall rule)
   
   ### Types of changes
   
   - [x] Bug fix (non-breaking change which fixes an issue)
   
   ### Bug Severity
   
   - [x] Major
   
   ### How Has This Been Tested?
   
   - `KubernetesClusterManagerImplTest`: 10 new tests cover the accepted case, 
not a member, control, etcd, external+control, external+etcd, CKS-managed 
worker, mixed list, and through `removeNodesFromKubernetesCluster` (control 
node, ExternalManaged cluster). 39/39 pass.
   - Kubernetes plugin worker tests pass.
   - Test-merged with #14796 and #14800: no conflicts.
   


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