mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
address feedback
This commit is contained in:
@@ -9,8 +9,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// NodeDownErr marks an operational as not able to complete since the node
|
||||
// is down.
|
||||
// NodeDownErr marks an operation as not able to complete since the node is
|
||||
// down.
|
||||
NodeDownErr = fmt.Errorf("node down")
|
||||
)
|
||||
|
||||
|
||||
@@ -233,9 +233,11 @@ func (c *AllocStatusCommand) Run(args []string) int {
|
||||
var stats *api.AllocResourceUsage
|
||||
stats, statsErr = client.Allocations().Stats(alloc, nil)
|
||||
if statsErr != nil {
|
||||
c.Ui.Output("")
|
||||
if statsErr != api.NodeDownErr {
|
||||
c.Ui.Output("")
|
||||
c.Ui.Error(fmt.Sprintf("couldn't retrieve stats (HINT: ensure Client.Advertise.HTTP is set): %v", statsErr))
|
||||
} else {
|
||||
c.Ui.Output("Omitting resource statistics since the node is down.")
|
||||
}
|
||||
}
|
||||
c.outputTaskDetails(alloc, stats, displayStats)
|
||||
|
||||
Reference in New Issue
Block a user