opened
tgraf
username_0
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/cilium/cilium/5738)
<!-- Reviewable:end -->
Improve reliability of CNP status update controller
issue
created
tgraf
username_0
test-me-please
comment
created
tgraf
username_0
test-me-please
comment
created
tgraf
username_0
I've factored out the fix to wait for the CNP status controller to terminate into a dedicated PR #5754
comment
created
tgraf
username_0
Factored the removal of the warning in the retry case into PR #5756
comment
created
tgraf
username_0
test-me-please
comment
created
raybejjani
username_1
Related to the topic of how a CNP can be corrupted. Is the following possible?
1- CNP #1 Is added
2- various handling occurs, we start the update controller #1
3- update controller #1  pushes up a CNP from the cache just before a, new, CNP #2 update is handled in cilium-agent
4- we handle the the CNP #2 update and a CNP update controller #2 is started and works

Would the copy of the CNP in k8s jump from #2 -> #1 -> #2 in steps 3 and 4 above?
comment
created
tgraf
username_0
No, Update() on a CNP can only succeed if the revision provided with the Update() corresponds to the latest revision. In that case, CNP #1 update will fail and retry with CNP #2.
comment
created
tgraf
username_0
FYI: This has been reverted for now as Get() did not manage to provide the latest revision consistently, it may be required to use the latest revision as returned by Update() if the update failed due to an outdated revision.
comment