juju storage filesystem list panics and dumps stack trace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
@les |
Bug Description
Using juju 1.26-alpha1-
I was writing documentation about the storage feature in Juju and found a command that panics and dumps the golang stack trace. If this is not a valid command juju should print out the usage and exit.
mbruzek@
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x6a5173]
goroutine 16 [running]:
runtime.
github.
github.
github.
github.
github.
github.
github.
github.
main.main()
goroutine 19 [finalizer wait]:
runtime.
runtime.
runfinq()
runtime.goexit()
goroutine 22 [syscall]:
os/signal.loop()
created by os/signal.init·1
goroutine 33 [syscall]:
runtime.goexit()
- - - - - -
Please let me know what log files (if any) that you need to fix this problem. Thanks!
description: | updated |
no longer affects: | juju-core/1.25 |
Changed in juju-core: | |
assignee: | nobody → @les (alesstimec) |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
tags: | added: 2.0-count |
I can see this is because of these lines:
70 if api == nil {
71 api, err := c.NewStorageAPI()
72 if err != nil {
73 return err
74 }
75 defer api.Close()
76 }
Since ":=" is used on line 71, api and err are local to that if statement. It should just be "=".