-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/k8s: fix race condition #13471
pkg/k8s: fix race condition #13471
Conversation
Commit d69407ce5cfbc5e3e1e7254f391dab77140957db does not contain "Signed-off-by". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
This reverts commit c1814ba. Signed-off-by: André Martins <andre@cilium.io>
If both Spec and Specs are considered the same we don't need to re-add the CNP into the policy repository. The commit 134fdb5 should have added the Specs.DeepEqual and not remove the Spec.DeepEqual. Fixes: 134fdb5 ("k8s/watchers: fix missing missing CNP/CCNP updates") Signed-off-by: André Martins <andre@cilium.io>
8d17b61
to
82a1b6f
Compare
test-me-please |
retest-gke |
retest-4.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. How does this fix a race condition? From what I can tell, it reverts a potential fix, but I can't tell how there was a race condition from the fix in the second commit.
} | ||
k.updateCiliumNetworkPolicyV2AnnotationsOnly(ciliumNPClient, ciliumV2Store, newRuleCpy) | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christarazi This return, that was previously done, prevented the newRuleCpy
from being concurrently accessed by the controller inside updateCiliumNetworkPolicyV2AnnotationsOnly
and the addCiliumNetworkPolicyV2
below. The addCiliumNetworkPolicyV2
will then execute a Parse
which will overwrite the fields concurrently.
Fix #13434