-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
identity: cache: close events channel in writer
As part of the shutdown procedure involving IPCache and the identity allocation components, it was possible to hit a 'send on closed channel' panic, caused by writes of the localIdentityCache to the events channel, which is closed as part of the shutdown of the identity allocator. Instead of directly closing the channel after shutting down the allocator, call into the localIdentityCache to do so, with proper mutual exclusion guaranteed its mutex. The offending writes happened in 'lookupOrCreate' as well as 'release', both of which take the mutex, and hence are correctly synchronised with the new 'close()' method. The other writer is the allocator, but we block on its shutdown before 'close()'. Suggested-by: André Martins <andre@cilium.io> Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
- Loading branch information
1 parent
3190d5d
commit efb6f56
Showing
4 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters