Skip to content

pkg/ipcache: create a GetK8sMetadata for public access#11833

Merged
aanm merged 1 commit intomasterfrom
pr/fix-datarace-ipcache
Jun 3, 2020
Merged

pkg/ipcache: create a GetK8sMetadata for public access#11833
aanm merged 1 commit intomasterfrom
pr/fix-datarace-ipcache

Conversation

@aanm
Copy link
Copy Markdown
Member

@aanm aanm commented Jun 2, 2020

GetK8sMetadata was supposed to be used for internal usage of the
package, making this function public requires protection against
parallel access by its internal mutex.

Fixes: 4699840 ("ipcache: Export GetK8sMetadata")
Signed-off-by: André Martins andre@cilium.io

Fixes #11832

@aanm aanm added kind/bug This is a bug in the Cilium logic. priority/release-blocker release-note/misc This PR makes changes that have no direct user impact. labels Jun 2, 2020
@aanm aanm requested a review from a team as a code owner June 2, 2020 16:51
@aanm aanm requested a review from michi-covalent June 2, 2020 16:51
Copy link
Copy Markdown
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah good to know. thank you for the fix

Copy link
Copy Markdown
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, one concern below.

Comment thread pkg/ipcache/ipcache.go Outdated
@aanm aanm force-pushed the pr/fix-datarace-ipcache branch from 0877a6b to e3ca0cb Compare June 2, 2020 17:44
@aanm aanm requested a review from joestringer June 2, 2020 17:48
@aanm
Copy link
Copy Markdown
Member Author

aanm commented Jun 2, 2020

test-me-please

GetK8sMetadata was supposed to be used for internal usage of the
package, making this function public requires protection against
parallel access by its internal mutex.

Fixes: 4699840 ("ipcache: Export GetK8sMetadata")
Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm force-pushed the pr/fix-datarace-ipcache branch from e3ca0cb to de1e490 Compare June 2, 2020 18:27
@aanm
Copy link
Copy Markdown
Member Author

aanm commented Jun 2, 2020

test-me-please

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 2, 2020

Coverage Status

Coverage decreased (-0.02%) to 36.906% when pulling de1e490 on pr/fix-datarace-ipcache into a20dcd1 on master.

@aanm
Copy link
Copy Markdown
Member Author

aanm commented Jun 3, 2020

hit #11847

@aanm aanm merged commit fbd7653 into master Jun 3, 2020
@aanm aanm deleted the pr/fix-datarace-ipcache branch June 3, 2020 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug This is a bug in the Cilium logic. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DATA RACE in pkg/ipcache/ipcache.go

5 participants