-
Notifications
You must be signed in to change notification settings - Fork 373
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
Fix deadlock caused by acquiring priorityMutex twice #1186
Conversation
Thanks for your PR. The following commands are available:
|
Codecov Report
@@ Coverage Diff @@
## master #1186 +/- ##
==========================================
+ Coverage 56.07% 56.26% +0.19%
==========================================
Files 106 106
Lines 11539 11536 -3
==========================================
+ Hits 6470 6491 +21
+ Misses 4501 4478 -23
+ Partials 568 567 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f1bf917
to
f3be484
Compare
f3be484
to
a532ead
Compare
/test-all |
/test-hw-offload |
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, thanks @Dyanngg for the quick fix.
/test-conformance /test-e2e /test-networkpolicy |
thanks for the detailed issue report .. |
/test-conformance /test-e2e /test-networkpolicy |
1 similar comment
/test-conformance /test-e2e /test-networkpolicy |
This PR fixes #1181
In NetworkPolicy reconciler, uninstallOFRule() is called in two circumstances:
Reconcile(), L199 --> update(), L483 --> uninstallOFRule(), L589.
The priorityMutex of a CNP Table, which prevents concurrent priority updates within a single table, should be held at the Reconcile() and Forget() function level. Before this fix, the mutex is acquired at both Reconcile() and uninstallOFRule() in the second scenario mentioned above, causing a deadlock for that specific reconciler.
UT is added to test this second scenario:
1). Create a NP ingress rule on port "http" that applied to the following pods:
as a result, two ofRules should be installed based on the port name resolution.