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

CLI panic in namespace status w/ quotas #10619

Closed
tgross opened this issue May 18, 2021 · 3 comments · Fixed by #10620
Closed

CLI panic in namespace status w/ quotas #10619

tgross opened this issue May 18, 2021 · 3 comments · Fixed by #10620

Comments

@tgross
Copy link
Member

tgross commented May 18, 2021

In Nomad 1.1.0, when querying the namespace status, the command line panics if the namespace has quotas. I've reproduced this on Nomad 1.1.0 and Nomad 1.1.0+ENT, but not on Nomad 1.0.6 or earlier. Most likely introduced by #10481

$ nomad --version
Nomad v1.1.0+ent (16a743460748174af378b165dc5a35b2ccd92865)

$ nomad namespace status default
Name        = default
Description = Default shared namespace
Quota       = test-quota

Quota Limits
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5fc3b2d]

goroutine 1 [running]:
github.com/hashicorp/nomad/command.formatQuotaLimits(0xc00084a000, 0xc000abee10, 0x19, 0xc000364880)
        github.com/hashicorp/nomad/command/quota_status.go:194 +0x46d
github.com/hashicorp/nomad/command.(*NamespaceStatusCommand).Run(0xc000035ef0, 0xc0001ba030, 0x1, 0x1, 0xc000549e90)
        github.com/hashicorp/nomad/command/namespace_status.go:97 +0x536
github.com/mitchellh/cli.(*CLI).Run(0xc000399b80, 0xc000399b80, 0xc00000f800, 0x3b)
        github.com/mitchellh/cli@v1.1.0/cli.go:260 +0x41a
main.RunCustom(0xc0001ba010, 0x3, 0x3, 0xc000190058)
        github.com/hashicorp/nomad/main.go:142 +0x49c
main.Run(...)
        github.com/hashicorp/nomad/main.go:87
main.main()
        github.com/hashicorp/nomad/main.go:83 +0x65
@tgross
Copy link
Member Author

tgross commented May 18, 2021

Looks like we never exercise this code path in https://github.com/hashicorp/nomad-enterprise/blob/main/e2e/quotas/quotas_ent.go, which would be nice to do as part of the fix here.

@tgross
Copy link
Member Author

tgross commented May 18, 2021

I've narrowed this down a bit: looks like this is only happening if I use Nomad 1.1.0/1.1.0+ent with a server that is Nomad 1.0.4+ent.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant