avinetworks / avi-helm-charts

Avi Networks Helm Charts
14 stars 26 forks source link

Helm uninstall leaves dangling assets. Additionally I can't delete certain assets #108

Open rlewkowicz-rcd opened 3 years ago

rlewkowicz-rcd commented 3 years ago

To reproduce:

Install 1.3.1 via helm. Then remove it via helm uninstall. There will be varying dangling assets.

From here, try to delete the name space of avi-system In particular it seems that ako-config hard hangs on removal

ku get akoconfig.ako.vmware.com
NAME         AGE
ako-config   14h

This has been hung for 14 hours now

hemantavi commented 3 years ago

I think you need to remove the finalizer from the AKOConfig object. This is missing from the docs. Will update the docs. Thanks!

rlewkowicz commented 3 years ago

@hemantavi I tried that, but then the assets don't clean up properly. I don't think that's a healthy way for a controller to function. You shouldn't have to edit the object directly in Kubernetes

rlewkowicz commented 3 years ago

@sudswasavi @hemantavi Any thoughts on this? I think deleting the finalizer is an extremely bad practice.

hemantavi commented 3 years ago

@rlewkowicz regarding interacting with AKOConfig object to either create/edit or delete the ako controller's manifests, I didn't understand why it would be a bad practice. The AKOConfig object is a way for a user to interact with the ako operator to manage the ako controller resources.

However, I do think that this solution of deleting the finalizer may not be very elegant. We are looking into this to either automate this step or avoid this altogether. Thanks!

rlewkowicz-rcd commented 3 years ago

@hemantavi Lets say I have 30 clusters. I manage my fleet with flux and the garbage collection is enabled. I want to remove avi from the cluster. It is un reasonable to have me go manually clean up 30 clusters. Also, if you simply remove the finalize, it leaves garbage everywhere

hemantavi commented 3 years ago

@rlewkowicz I think there was some confusion at my end. I checked the code and it does seem like we cleanup the finalizer via the ako operator itself whenever the AKOConfig object is deleted (no manual steps are involved). I tried that today on my setup and it works fine (the AKOConfig object also gets cleaned up. You may be hitting a bug. Do you mind sharing the logs or error messages (if any)? Also, the finalizer string that you have in your AKOConfig object.

sudswasavi commented 3 years ago

If you'd still like someone to take a look at this issue, can you pls file this issue here: https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes ? We would be retiring this repo soon in favour of the source code repo.