bhouse-nexthop opened a new issue, #14791: URL: https://github.com/apache/cloudstack/issues/14791
### problem Deleting a CKS cluster fails with a NullPointerException when one of its node VMs was destroyed and expunged on its own first (for example a node added with `addNodesToKubernetesCluster`). | Step | What happens | |---|---| | VM expunged | its `kubernetes_cluster_vm_map` row is left behind | | `deleteKubernetesCluster` | `KubernetesClusterDestroyWorker.destroy()` looks the VM up, gets null, and `checkIfVmsAssociatedWithBackupOffering` calls `getBackupOfferingId()` on it: NPE | | even past that | the stale row still counts as an external node and blocks the delete | The only way out is to delete the stale `kubernetes_cluster_vm_map` row by hand. ### versions 4.22 (code is the same on main). ### The steps to reproduce the bug 1. Create a CKS cluster. 2. Add a VM with `addNodesToKubernetesCluster`. 3. Destroy and expunge that VM. 4. Delete the cluster: the job fails with an NPE. ### What to do about it? - Ignore map rows whose VM no longer exists in the pre-delete checks. - Expunge those rows (with a WARN) during the delete, so a retry does not hit them again. - Make `checkIfVmsAssociatedWithBackupOffering` skip missing VMs (also used by the ExternalManaged delete path). -- 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]
