Bug: Error deleting Input Manifests if the infra fails to build
Despire opened this issue · 0 comments
Despire commented
Current Behaviour
If the infrastructure fails to be build or is only partially build (i.e. k8s cluster builds ok but loadbalancers fail) On deletion of the Input Manifest the deletion will be executed (the infra will be build) but if will fail on the part which originally failed. Thus the input manifest never truly gets removed and stays dangling.
Expected Behaviour
On deletion If we don't find the respective statefiles, locks it should assume that the were not created or deleted and simply log a WARN message about this state.
Steps To Reproduce
- Use an invalid key for a provider to spawn a k8s cluster
- After all the retries, try to delete the infra.
- See the logs in the terraformer pod that repeatedly try to delete the non-existant state
- If you check MongoDB after all the retries the InputManifest is still there.
Additional information
These errors
Should be logged (rather then returning on the first error encountered which as described above will result in the InputManifest not being deleted)