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

Vault api code panics (called from nomad 0.8.4) #5241

Closed
groggemans opened this issue Aug 31, 2018 · 1 comment
Closed

Vault api code panics (called from nomad 0.8.4) #5241

groggemans opened this issue Aug 31, 2018 · 1 comment

Comments

@groggemans
Copy link

Describe the bug
Nomad panics on vault api code.

To Reproduce
Run a nomad 0.8.4 server connected to a vault 0.11.0 cluster/server.

Additional context

WARNING: keyring exists but -encrypt given, using keyring
==> Loaded configuration from /etc/nomad.d/base.hcl, /etc/nomad.d/client.hcl, /etc/nomad.d/server.hcl
==> Starting Nomad agent...
panic: interface conversion: interface {} is nil, not []interface {}

goroutine 67 [running]:
github.com/hashicorp/nomad/vendor/github.com/hashicorp/vault/api.(*Sys).Capabilities(0x13bd8dc8, 0x13b20181, 0x24, 0x13bfd17, 0x15, 0x0, 0x0, 0x0, 0x0, 0x0)
        /opt/gopath/src/github.com/hashicorp/nomad/vendor/github.com/hashicorp/vault/api/sys_capabilities.go:38 +0x4c4
github.com/hashicorp/nomad/vendor/github.com/hashicorp/vault/api.(*Sys).CapabilitiesSelf(0x13bd8dc8, 0x13bfd17, 0x15, 0x0, 0x13784780, 0x76d6a6c8, 0x0, 0x0)
        /opt/gopath/src/github.com/hashicorp/nomad/vendor/github.com/hashicorp/vault/api/sys_capabilities.go:6 +0x3c
github.com/hashicorp/nomad/nomad.(*vaultClient).hasCapability(0x13b821b0, 0x13bfd17, 0x15, 0x1f0d668, 0x2, 0x2, 0x22ac4, 0x13ac0320, 0x10, 0x10, ...)
        /opt/gopath/src/github.com/hashicorp/nomad/nomad/vault.go:753 +0x38
github.com/hashicorp/nomad/nomad.(*vaultClient).validateCapabilities(0x13b821b0, 0x13b1c8a1, 0xd, 0x139c4100, 0x0, 0x0)
        /opt/gopath/src/github.com/hashicorp/nomad/nomad/vault.go:696 +0x68
github.com/hashicorp/nomad/nomad.(*vaultClient).parseSelfToken(0x13b821b0, 0x1, 0x0)
        /opt/gopath/src/github.com/hashicorp/nomad/nomad/vault.go:668 +0x1a0
github.com/hashicorp/nomad/nomad.(*vaultClient).establishConnection(0x13b821b0)
        /opt/gopath/src/github.com/hashicorp/nomad/nomad/vault.go:428 +0x11c
github.com/hashicorp/nomad/nomad.(*vaultClient).(github.com/hashicorp/nomad/nomad.establishConnection)-fm()
        /opt/gopath/src/github.com/hashicorp/nomad/nomad/vault.go:247 +0x1c
github.com/hashicorp/nomad/nomad.wrapNilError.func1(0x0, 0x1399d040)
        /opt/gopath/src/github.com/hashicorp/nomad/nomad/vault.go:1186 +0x1c
github.com/hashicorp/nomad/vendor/gopkg.in/tomb%2ev2.(*Tomb).run(0x139a8e40, 0x1370f718)
        /opt/gopath/src/github.com/hashicorp/nomad/vendor/gopkg.in/tomb.v2/tomb.go:153 +0x1c
created by github.com/hashicorp/nomad/vendor/gopkg.in/tomb%2ev2.(*Tomb).Go
        /opt/gopath/src/github.com/hashicorp/nomad/vendor/gopkg.in/tomb.v2/tomb.go:149 +0xa4

The bug seems to be in the vault code, so reporting the issue here.

Also reported at the nomad project (hashicorp/nomad#4633)

@jefferai jefferai added this to the 0.11.1 milestone Sep 1, 2018
@jefferai
Copy link
Member

jefferai commented Sep 5, 2018

Fixed by #5244

@jefferai jefferai closed this as completed Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants