daemon: fix panic when starting Cilium#12101
Merged
joestringer merged 1 commit intocilium:masterfrom Jun 16, 2020
Merged
Conversation
It seems the we try to validate an endpoint without setting its
allocator which causes Cilium to panic while restoring old endpoints:
```
goroutine 259 [running]:
github.com/cilium/cilium/pkg/endpoint.(*Endpoint).identityLabelsChanged(0xc000b122c0, 0x280e920, 0xc0009d2840, 0x1, 0x0, 0x0, 0x0)
/go/src/github.com/cilium/cilium/pkg/endpoint/endpoint.go:1818 +0x45c
github.com/cilium/cilium/pkg/endpoint.(*Endpoint).runIdentityResolver(0xc000b122c0, 0x280e920, 0xc0009d2840, 0x1, 0x1, 0xc000cb2d80)
/go/src/github.com/cilium/cilium/pkg/endpoint/endpoint.go:1748 +0x3db
github.com/cilium/cilium/pkg/endpoint.(*Endpoint).UpdateLabels(0xc000b122c0, 0x280e920, 0xc0009d2840, 0xc000d2ca50, 0xc000d2cab0, 0x1, 0x6)
/go/src/github.com/cilium/cilium/pkg/endpoint/endpoint.go:1709 +0x3d0
github.com/cilium/cilium/pkg/endpoint.(*Endpoint).RunMetadataResolver.func2(0x280e920, 0xc0009d2840, 0x3b4b200, 0xc000ce31b8)
/go/src/github.com/cilium/cilium/pkg/endpoint/endpoint.go:1621 +0x46a
github.com/cilium/cilium/pkg/controller.(*Controller).runController(0xc0000d6800)
/go/src/github.com/cilium/cilium/pkg/controller/controller.go:205 +0xa2a
created by github.com/cilium/cilium/pkg/controller.(*Manager).updateController
/go/src/github.com/cilium/cilium/pkg/controller/manager.go:120 +0xb09
```
With this change we set the allocator in the endpoint before we validate
the endpoint, avoiding it to panic.
Signed-off-by: André Martins <andre@cilium.io>
Member
Author
|
test-me-please |
20 tasks
tgraf
approved these changes
Jun 16, 2020
Member
Author
|
retest-4.19 |
joestringer
approved these changes
Jun 16, 2020
Member
joestringer
left a comment
There was a problem hiding this comment.
Is this a reliable failure? Just wondering when we broke it and whether it could affect earlier releases.
Member
Author
|
@joestringer I hit this by running #11903 (comment) and restarting Cilium pod. Not sure if it affects older versions. I have a feeling that #11714 might have introduced this regression. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems the we try to validate an endpoint without setting its
allocator which causes Cilium to panic while restoring old endpoints:
With this change we set the allocator in the endpoint before we validate
the endpoint, avoiding it to panic.
Signed-off-by: André Martins andre@cilium.io