Skip to content

k8s: Fix data race when setting node address#11851

Merged
tgraf merged 1 commit intomasterfrom
pr/tgraf/fix-node-data-race
Jun 3, 2020
Merged

k8s: Fix data race when setting node address#11851
tgraf merged 1 commit intomasterfrom
pr/tgraf/fix-node-data-race

Conversation

@tgraf
Copy link
Copy Markdown
Contributor

@tgraf tgraf commented Jun 3, 2020

The k8s cache handlers will depend on node addressing information so the
retrieval of own node information must complete before caches are being
synchronized.

Also re-add a bootstrap start sequence that was removed accidentally by
05163ed.

Fixes: 05163ed ("endpoint: Ensure restored endpoint is validated before regenerating it")
Fixes: #11836

The k8s cache handlers will depend on node addressing information so the
retrieval of own node information must complete before caches are being
synchronized.

Also re-add a bootstrap start sequence that was removed accidentally by
05163ed.

Fixes: 05163ed ("endpoint: Ensure restored endpoint is validated before regenerating it")
Fixes: #11836

Signed-off-by: Thomas Graf <thomas@cilium.io>
@tgraf tgraf 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 3, 2020
@tgraf tgraf requested a review from a team June 3, 2020 08:45
@tgraf
Copy link
Copy Markdown
Contributor Author

tgraf commented Jun 3, 2020

test-me-please

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.009%) to 36.906% when pulling 0890392 on pr/tgraf/fix-node-data-race into 40b6f58 on master.

Copy link
Copy Markdown
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

I've ran a CI with the race detector and it seems the issue was fixed

@maintainer-s-little-helper maintainer-s-little-helper Bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 3, 2020
@tgraf tgraf merged commit bdf98cb into master Jun 3, 2020
@tgraf tgraf deleted the pr/tgraf/fix-node-data-race branch June 3, 2020 13:38
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. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. 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: pkg/node potentially caused by premature initialization of k8s watchers

5 participants