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

   ### Problem
   
   `removeNodesFromKubernetesCluster` fails with a NullPointerException when 
the node VM has no display name.
   
   | | |
   |---|---|
   | Where | `KubernetesClusterRemoveWorker.removeNodesFromCluster` |
   | Code | `vm.getDisplayName().toLowerCase(Locale.ROOT)` |
   | Trigger | VM deployed without `displayname` (NULL in the DB), then added 
with `addNodesToKubernetesCluster` |
   | Why it's confusing | the API shows the host name as a fallback display 
name, so the user sees a name |
   | Result | node is not drained or deleted, the call fails, the log shows 
only the NPE |
   
   ### Steps to reproduce
   
   1. Deploy a VM without `displayname`.
   2. Add it to a CKS cluster with `addNodesToKubernetesCluster`.
   3. Remove it with `removeNodesFromKubernetesCluster`.
   
   ### Expected
   
   The node is drained and removed.
   
   ### Also
   
   - The display name isn't the Kubernetes node name anyway. The kubelet 
registers under the guest host name, which is what the scale and upgrade 
workers use. A user-changed display name points the script at a node that 
doesn't exist.
   - `taintControlNodes` has the same `getDisplayName().toLowerCase()` lookup.
   
   ### Versions
   
   4.22 and main.
   


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