Closed acmenezes closed 1 year ago
We are relying on the deletion of the Namespace to cleanup the lingering Operator CSV and associated Operator controller Deployment. This can often result in Namespace stuck in Terminating status when Namespace controller attempts resource cleanup.
Per discussion with @acmenezes and @bcrochet, let's add an explicit deletion of the Operator CSV immediately after options.client.DeleteSubscription
in the operator_cleanup.go.
We are relying on the deletion of the Namespace to cleanup the lingering Operator CSV and associated Operator controller Deployment. This can often result in Namespace stuck in Terminating status when Namespace controller attempts resource cleanup.
Per discussion with @acmenezes and @bcrochet, let's add an explicit deletion of the Operator CSV immediately after
options.client.DeleteSubscription
in the operator_cleanup.go.
Right @madorn I'll investigate that option. Although it looks like an intermittent problem. I was able to run it in full this afternoon with all namespaces being cleared correctly and all resources cleaned up well.
Should also check that operands are being deleted. Currently, the deletion is fire and forget. Could implement a goroutine to fire off for each custom resource, and wait for completion or a time out.
Opened up #337 per @bcrochet's suggestion.
Bug Description
opcap fails to delete namespaces between individual operator audits
Version and Command Invocation
v0.2.0
opcap check
Steps to Reproduce:
1) Running against a full size cluster
opcap check
Expected Result
All resources created by opcap to be deleted after each operator audit.
Actual Result
Multiple audits for individual operators throw the following error:
Additional Context
The cause can be related to timing issues like trying to delete or create resources too fast and/or related to finalizers that are not being removed for an unknown reason and preventing the cluster to finish the delete operation.