bhouse-nexthop opened a new pull request, #14790: URL: https://github.com/apache/cloudstack/pull/14790
### Description `removeNodesFromKubernetesCluster` used the VM display name as the Kubernetes node name. A VM with no display name (NULL in the DB) threw an NPE. This PR uses the host name instead, which is the name the kubelet registers and the one the scale and upgrade workers already use. | File | Change | |---|---| | `KubernetesClusterActionWorker` | new `getKubernetesNodeName()`: lower-cased host name, or null if blank / VM missing | | `KubernetesClusterRemoveWorker` | use it; a node with no host name is logged and skipped and the call fails, instead of running the remove script with an empty or `null` name | | `KubernetesClusterActionWorker.taintControlNodes` | same display-name lookup, now uses the helper; fails with a clear message instead of an NPE | | `KubernetesClusterActionWorkerTest` | host name lower-cased, display name not read, blank host name and missing VM give null | Fixes: #14789 ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Bug Severity - [ ] BLOCKER - [ ] Critical - [x] Major - [ ] Minor - [ ] Trivial ### How Has This Been Tested? - `mvn -pl plugins/integrations/kubernetes-service test -Dtest='KubernetesCluster*Test'`: 59 tests, all pass. - Checkstyle passes on the module. #### How did you try to break this feature and the system with this change? - CKS-created nodes: display name and host name are the same, so behaviour doesn't change. - Blank or missing host name: the destructive remove script is not run. -- 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]
