oracle-cne / ocne

The Oracle Cloud Native Environment CLI
Universal Permissive License v1.0
1 stars 0 forks source link

Regression in 2.0.2 when deleting clusters #45

Closed dkrasins closed 3 weeks ago

dkrasins commented 3 weeks ago

https://github.com/oracle-cne/ocne/pull/8 introduced a regression in cluster delete where the cluster provider was ignored unless it was specified on the command line. Invocations of the form "ocne cluster delete -c mycluster.yaml" with non-libvirt provider would be deleted as though it were a libvirt cluster regardless of what was in the cluster config.

$ cat capi.yaml  | grep provider
provider: oci

$ ./out/linux_amd64/ocne cluster delete -c capi.yaml 
INFO[2024-09-30T18:36:59Z] Deleting file /home/opc/.kube/kubeconfig.ocne.local 
INFO[2024-09-30T18:36:59Z] Deleting file /home/opc/.kube/kubeconfig.ocne.vm 

$ ./out/linux_amd64/ocne cluster delete -c capi.yaml --log-level debug
DEBU[2024-09-30T18:37:11Z] Connecting to qemu:///session                
DEBU[2024-09-30T18:37:11Z] Deleting cluster ocne                        
INFO[2024-09-30T18:37:11Z] Deleting file /home/opc/.kube/kubeconfig.ocne.local 
INFO[2024-09-30T18:37:11Z] Deleting file /home/opc/.kube/kubeconfig.ocne.vm