Skip to content
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

v1.8 backports 2020-10-15 #13594

Merged
merged 2 commits into from
Oct 16, 2020
Merged

v1.8 backports 2020-10-15 #13594

merged 2 commits into from
Oct 16, 2020

Conversation

christarazi
Copy link
Member

Once this PR is merged, you can update the PR labels via:

$ for pr in 13576 13514; do contrib/backporting/set-labels.py $pr done 1.8; done

hzhou8 and others added 2 commits October 15, 2020 15:41
[ upstream commit b34e5d8 ]

When rolling over, it should use initNextID instead of FirstFreeServiceID,
which doesn't belong to the IDAllocator. This would create problems if
FirstFreeServiceID and FirstFreeBackendID have different values although now
they happen to be the same.

Fixes: ab9cf4b ("service: Make local ID allocator more service agnostic")
Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
[ upstream commit 005291c ]

Because the identity allocator is initialized asychronously via
`InitIdentityAllocator`, the local identitiy allocator might not have
been initialized yet when the lookup functions are called. This can
cause nil pointer panics, as observed in #13479.

Before b194612, this nil pointer panic
could not occur in `LookupIdentityByID` as the function checked for
`m.IdentityAllocator != nil` which also implies `m.localIdentities != nil`.

This commit adds an explict check for `m.localIdentities` and fixes a
potential data race by checking the initialization channels before
accessing `m.localIdentities` or `m.IdentityAllocator`.

Fixes: #13479
Fixes: b194612 ("identity: Avoid kvstore lookup for local identities")

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
@christarazi christarazi requested a review from a team as a code owner October 15, 2020 22:42
@christarazi christarazi added backport/1.8 kind/backports This PR provides functionality previously merged into master. labels Oct 15, 2020
@christarazi
Copy link
Member Author

test-backport-1.8

@tklauser
Copy link
Member

test-missed-k8s

@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 Oct 16, 2020
@tklauser tklauser merged commit f5fdee1 into v1.8 Oct 16, 2020
@tklauser tklauser deleted the pr/v1.8-backport-2020-10-15 branch October 16, 2020 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants