2016-05-19 14:18:03 |
Nate Finch |
description |
$ juju status-history resource/0
ERROR no status history available
$ juju status-history wqelgnweglewgnwglnegwlw
ERROR no status history available
The first one above is a valid unit. The second one is obviously not, but I get the same error. We should be checking if something is a valid unit (or whatever) name, and giving an error if it's not. Also, giving an error if that unit (or whatever) name doesn't exist.
By always giving the same error, we mask typos etc. |
$ juju status-history wqelgnweglewgnwglnegwlw
panic: "wqelgnweglewgnwglnegwlw" is not a valid unit name
goroutine 1 [running]:
panic(0x19d0c60, 0xc82049dad0)
/home/nate/go/src/runtime/panic.go:481 +0x3e6
github.com/juju/names.NewUnitTag(0x7ffc9942f0aa, 0xd, 0x0, 0x0)
/home/nate/src/github.com/juju/names/unit.go:29 +0x1ad
github.com/juju/juju/cmd/juju/status.(*statusHistoryCommand).Run(0xc8201501e0, 0xc820328780, 0x0, 0x0)
/home/nate/src/github.com/juju/juju/cmd/juju/status/history.go:138 +0x285
github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run(0xc820422840, 0xc820328780, 0x0, 0x0)
/home/nate/src/github.com/juju/juju/cmd/modelcmd/modelcommand.go:273 +0x4f
github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run(0xc820327480, 0xc820328780, 0x0, 0x0)
/home/nate/src/github.com/juju/juju/cmd/modelcmd/base.go:205 +0xd4
github.com/juju/cmd.(*SuperCommand).Run(0xc82018bd00, 0xc820328780, 0x0, 0x0)
/home/nate/src/github.com/juju/cmd/supercommand.go:446 +0x688
github.com/juju/cmd.Main(0x7f9d83405678, 0xc82018bd00, 0xc820328780, 0xc82000a370, 0x2, 0x2, 0x4acdca)
/home/nate/src/github.com/juju/cmd/cmd.go:280 +0x2f0
github.com/juju/juju/cmd/juju/commands.main.Run(0x2a857c8, 0xc82000a360, 0x3, 0x3, 0xc82021de20)
/home/nate/src/github.com/juju/juju/cmd/juju/commands/main.go:148 +0x5bb
github.com/juju/juju/cmd/juju/commands.Main(0xc82000a360, 0x3, 0x3, 0xc820000180)
/home/nate/src/github.com/juju/juju/cmd/juju/commands/main.go:113 +0x48
main.main()
/home/nate/src/github.com/juju/juju/cmd/juju/main.go:27 +0x3b |
|