-
Notifications
You must be signed in to change notification settings - Fork 2.1k
nomad volume status -verbose command crashes #10816
Copy link
Copy link
Closed
Labels
stage/acceptedConfirmed, and intend to work on. No timeline committment though.Confirmed, and intend to work on. No timeline committment though.theme/clitheme/storagetype/bug
Milestone
Description
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/[email protected]/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 +0x65Something is definitely wrong with this code:
nomad/command/volume_status_csi.go
Lines 122 to 123 in 09bd336
| rows := []string{} | |
| rows[0] = "External ID|Condition|Nodes" |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stage/acceptedConfirmed, and intend to work on. No timeline committment though.Confirmed, and intend to work on. No timeline committment though.theme/clitheme/storagetype/bug