Avi LB - Remove Orphaned Pools and Policysets
In my home lab I am continuosly tearing stuff up and down which might leave resources in an orphaned state. The other day after removing Workload Management in vSphere which I had enabled with the NSX Advanced Loadbalancer (a.k.a Avi) I noticed that the Virtual Services was left in the Load Balancer.
Previously these have been removed as well when disabling Workload Management, but this time my Supervisor Cluster was in an unhealty state before disabling so I suspect this messed up the removal of the Avi services.
While I could delete the Virtual Services, the LB Pools where left even though I selected to remove related resources when deleting the services.
When trying to remove those I got the following error
The L4Policysets are not found in the UI (at least I couldn't locate it), and the Avi documentation instructs to use the CLI (or API) for interacting with them
So, let's head over to the Avi shell to see if we can find our L4 Policy sets with the
show l4policyset command
We find three policysets. Note that this might not correspond with the number of Pools, a Pool can use multiple Policy Sets.
We can also examine a Policy set with the
show l4policyset <policy-name> command. Use TAB for navigating the commands and available resources
To delete a Policy set we use the
delete l4policyset <policy-name> command
Now we can head over to the Avi UI and delete our pool
And the Pool should be deleted
Now let's delete the remaining L4Policysets, and since we're already in the shell we can also delete the pools from there
This post showed how we can clean up orphaned L4 policy sets and LB Pools after removing Workload Management from vSphere.