Open guymguym opened 5 years ago
@guymguym I've tried several times to re-create this in minikube and have not been able to.
handleProvision()'s defer handles cleanup for all errors. This is where deleteResources() is called. Prior to the secret create err, Provision() was called successfully and it returned a partially filled-in ob (so the ob is not nil). We try to create a secret and that fails (for some reason). The CM (nil) and OB (not nil) are skipped and the defer block is invoked. Since the ob is not nil we try to handle it in deleteObjectBucket() and get the Update error in the log.
I'd like to add to the delete<ResourceType>
funcs where they check if the resource is nil, to also check that the name is empty, and only then return. Eg.
if ob == nil || ob.Name == "" {
return nil
}
I still don't know why the secret creation failed but this issue highlights a lib error recovery bug.
@guymguym with pr #153 merged can we close this issue?
Created a new OBC, the secret did not exist, but the provisioner failed because it got an "AlreadyExists" error on the secret. Maybe due to create retry? Then it tries to clean everything up and fails - Perhaps the name is not initialized for those resources when the creation is partially done?