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

nomad volume status -verbose command crashes #10816

Closed
ivoronin opened this issue Jun 25, 2021 · 5 comments · Fixed by #10818
Closed

nomad volume status -verbose command crashes #10816

ivoronin opened this issue Jun 25, 2021 · 5 comments · Fixed by #10818
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli theme/storage type/bug
Milestone

Comments

@ivoronin
Copy link

nomad volume status -verbose command crashes because of out of range index access:

~# nomad volume status -verbose
Container Storage Interface
ID                Name              Plugin ID  Schedulable  Access Mode
volume1           volume1           gcepd      true         single-node-writer
volume2           volume2           gcepd      true         single-node-writer
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/hashicorp/nomad/command.(*VolumeStatusCommand).listVolumes(0xc000117110, 0xc000262ee0, 0x70)
        github.com/hashicorp/nomad/command/volume_status_csi.go:123 +0x671
github.com/hashicorp/nomad/command.(*VolumeStatusCommand).csiStatus(0xc000117110, 0xc000262ee0, 0x0, 0x0, 0x0)
        github.com/hashicorp/nomad/command/volume_status_csi.go:23 +0x5fc
github.com/hashicorp/nomad/command.(*VolumeStatusCommand).Run(0xc000117110, 0xc000132030, 0x1, 0x1, 0xc0001b1ed0)
        github.com/hashicorp/nomad/command/volume_status.go:126 +0x46a
github.com/mitchellh/cli.(*CLI).Run(0xc0001da3c0, 0xc0001da3c0, 0xc00000f080, 0x37)
        github.com/mitchellh/cli@v1.1.0/cli.go:260 +0x41a
main.RunCustom(0xc000132010, 0x3, 0x3, 0xc000102058)
        github.com/hashicorp/nomad/main.go:142 +0x4a7
main.Run(...)
        github.com/hashicorp/nomad/main.go:87
main.main()
        github.com/hashicorp/nomad/main.go:83 +0x65

Something is definitely wrong with this code:

rows := []string{}
rows[0] = "External ID|Condition|Nodes"

@tgross
Copy link
Member

tgross commented Jun 25, 2021

Hi @ivoronin! Can you provide the output of nomad version please (from the CLI and the server would be helpful).

@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Jun 25, 2021
@ivoronin
Copy link
Author

Both clients and servers are running 1.1.1:

# nomad version
Nomad v1.1.1 (7feec97c04de4f8afff54ca9e56d66a61dfbfeb3)

@tgross
Copy link
Member

tgross commented Jun 25, 2021

Thanks. Yeah that's obviously a bug. 🤦 Looks like it first landed in 1.1.0. I'll push a PR up to fix it and it'll go out in the next patch.

@tgross tgross self-assigned this Jun 25, 2021
@tgross tgross moved this from Needs Triage to In Progress in Nomad - Community Issues Triage Jun 25, 2021
@tgross tgross added this to the 1.1.3 milestone Jun 25, 2021
@tgross tgross added the stage/accepted Confirmed, and intend to work on. No timeline committment though. label Jun 25, 2021
@tgross tgross removed this from In Progress in Nomad - Community Issues Triage Jun 25, 2021
@tgross
Copy link
Member

tgross commented Jun 25, 2021

#10818 has been merged and will land in Nomad 1.1.3.

@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 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli theme/storage type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants