Skip to content

daemon: fix panic when starting Cilium#12101

Merged
joestringer merged 1 commit intocilium:masterfrom
aanm:pr/fix-allocator-panic
Jun 16, 2020
Merged

daemon: fix panic when starting Cilium#12101
joestringer merged 1 commit intocilium:masterfrom
aanm:pr/fix-allocator-panic

Conversation

@aanm
Copy link
Copy Markdown
Member

@aanm aanm commented Jun 16, 2020

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

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>
@aanm aanm added priority/release-blocker release-note/bug This PR fixes an issue in a previous release of Cilium. kind/regression This functionality worked fine before, but was broken in a newer release of Cilium. labels Jun 16, 2020
@aanm aanm requested a review from a team as a code owner June 16, 2020 13:09
@aanm
Copy link
Copy Markdown
Member Author

aanm commented Jun 16, 2020

test-me-please

@aanm aanm mentioned this pull request Jun 16, 2020
20 tasks
@aanm
Copy link
Copy Markdown
Member Author

aanm commented Jun 16, 2020

retest-4.19

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.

Is this a reliable failure? Just wondering when we broke it and whether it could affect earlier releases.

@aanm
Copy link
Copy Markdown
Member Author

aanm commented Jun 16, 2020

@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.

@joestringer joestringer merged commit df97ca1 into cilium:master Jun 16, 2020
@aanm aanm deleted the pr/fix-allocator-panic branch June 17, 2020 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/regression This functionality worked fine before, but was broken in a newer release of Cilium. release-note/bug This PR fixes an issue in a previous release of Cilium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants