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

daemon: Only attempt to resolve CIDR from k8s API if client is available #608

Merged
merged 1 commit into from
Apr 26, 2017

Conversation

tgraf
Copy link
Member

@tgraf tgraf commented Apr 26, 2017

Fixes the following panic:
anic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4105b4]

goroutine 1 [running]:
panic(0x1998a80, 0xc420012050)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
main.(*Daemon).useK8sNodeCIDR(0xc4200c8b40, 0xc42000e08e, 0x8, 0x8, 0xc421d895f0)
/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/daemon.go:268 +0x54
main.NewDaemon(0xc420322000, 0x0, 0x0, 0x0)
/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/daemon.go:512 +0xf68
main.runDaemon()
/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/main.go:449 +0x88
main.glob..func1(0x2986f80, 0xc42008e050, 0x2, 0x5)
/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/main.go:91 +0x19
github.com/cilium/cilium/vendor/github.com/spf13/cobra.(*Command).execute(0x2986f80, 0xc42000c130, 0x5, 0x5, 0x2986f80, 0xc42000c130)
/tmp/cilium-net-build/src/github.com/cilium/cilium/vendor/github.com/spf13/cobra/command.go:648 +0x443
github.com/cilium/cilium/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x2986f80, 0x0, 0x1bc4d3c, 0x9)
/tmp/cilium-net-build/src/github.com/cilium/cilium/vendor/github.com/spf13/cobra/command.go:735 +0x367
github.com/cilium/cilium/vendor/github.com/spf13/cobra.(*Command).Execute(0x2986f80, 0x0, 0x0)
/tmp/cilium-net-build/src/github.com/cilium/cilium/vendor/github.com/spf13/cobra/command.go:693 +0x2b
main.main()
/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/main.go:96 +0x31

Signed-off-by: Thomas Graf thomas@cilium.io

Fixes the following panic:
anic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4105b4]

goroutine 1 [running]:
panic(0x1998a80, 0xc420012050)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
main.(*Daemon).useK8sNodeCIDR(0xc4200c8b40, 0xc42000e08e, 0x8, 0x8, 0xc421d895f0)
	/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/daemon.go:268 +0x54
main.NewDaemon(0xc420322000, 0x0, 0x0, 0x0)
	/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/daemon.go:512 +0xf68
main.runDaemon()
	/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/main.go:449 +0x88
main.glob..func1(0x2986f80, 0xc42008e050, 0x2, 0x5)
	/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/main.go:91 +0x19
github.com/cilium/cilium/vendor/github.com/spf13/cobra.(*Command).execute(0x2986f80, 0xc42000c130, 0x5, 0x5, 0x2986f80, 0xc42000c130)
	/tmp/cilium-net-build/src/github.com/cilium/cilium/vendor/github.com/spf13/cobra/command.go:648 +0x443
github.com/cilium/cilium/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x2986f80, 0x0, 0x1bc4d3c, 0x9)
	/tmp/cilium-net-build/src/github.com/cilium/cilium/vendor/github.com/spf13/cobra/command.go:735 +0x367
github.com/cilium/cilium/vendor/github.com/spf13/cobra.(*Command).Execute(0x2986f80, 0x0, 0x0)
	/tmp/cilium-net-build/src/github.com/cilium/cilium/vendor/github.com/spf13/cobra/command.go:693 +0x2b
main.main()
	/tmp/cilium-net-build/src/github.com/cilium/cilium/daemon/main.go:96 +0x31

Signed-off-by: Thomas Graf <thomas@cilium.io>
@tgraf tgraf added kind/bug This is a bug in the Cilium logic. pending-review labels Apr 26, 2017
@tgraf tgraf requested a review from aanm April 26, 2017 20:24
@tgraf tgraf merged commit c27e22e into master Apr 26, 2017
@tgraf tgraf deleted the k8s-panic branch April 26, 2017 20:57
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants