Open tcdowney opened 2 years ago
Hmmm, the DuplicateValidator
seems to be quite thread safe, it is making use of the optimistic locking idiom. However, in order that validator to kick in and handle org delete and delete the lease, korifi controllers should have been running when the CFOrg has been being deleted. Can we confirm whether this has been the case?
What happened?
@dsboulder ran into this why trying to apply
CFOrg
resources. Presumably there was an org that had the display name"development"
at one time in the past, but it no longer existed. The lease for it remained, however, so a new org with that name could not be created.He used
kapp
to declaratively apply the orgs so the output looks a little different than normal, but the error should be unrelated to that.What you expected to happen
I expected there not to be an orphaned lease.
Acceptance Criteria
GIVEN a resource with a given
displayName
not exist on the cluster WHEN I try to create a resource with thatdisplayName
THEN I see the creation succeeds and I do not see anyDuplicateNameError
errors claiming the resource existsHow to reproduce it (as minimally and precisely as possible)
Unclear how this happened. It's possible there is a race condition in the DuplicateValidator webhook or that updating the lease failed somehow during deletion.
Anything else we need to know?
If we pick up this bug we need to make sure that the fix isn't worse than the bug. Sometimes failures to update the lease are acceptable during deletion (such as when the lease does not exist) and we don't want to break uninstallation somehow.
Environment
Revision of codebase: 2286a62f2ebcb58e103d0a2efeed1c6d2beda0c4 Kubernetes version (use
kubectl version
): Unknown Cloud provider or hardware configuration: Unknown Others: