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

   ### problem
   
   Three gaps in how CKS handles CNI configurations (`registerCniConfiguration` 
/ `cniconfigurationid`):
   
   | API | problem |
   |---|---|
   | `listKubernetesClusters` | fails with an NPE when a cluster's CNI 
configuration has been deleted |
   | `deleteCniConfiguration` / `deleteUserData` | not refused while a 
Kubernetes cluster references the configuration. Only a cluster whose control 
VM still exists blocks it, and the message says "used by some instances" 
without naming the cluster. A cluster with no control VM (e.g. Created, or 
Error before deploy) doesn't block it. |
   | `createKubernetesCluster` | `cniconfigurationid` is not checked for 
existence or caller access, unlike `userdataid` on other APIs |
   
   ### versions
   
   4.21.0 onwards (CNI configuration support), seen on 4.22.
   
   ### The steps to reproduce the bug
   
   1. Register a CNI configuration and create a CKS cluster with it, without 
starting it.
   2. Delete the CNI configuration: it succeeds.
   3. `listKubernetesClusters`: fails with an NPE in 
`createKubernetesClusterResponse`.
   
   ### What to do about it?
   
   - Build the cluster response from the configuration including removed rows, 
and skip it if the row is gone.
   - Refuse the delete while a non-removed cluster references the 
configuration, naming the cluster.
   - On cluster create, require the configuration to exist and the caller to 
have access to it.
   


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