Skip to content

Commit 0553288

Browse files
committed
address feedback
1 parent 72ce7e7 commit 0553288

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

api/allocations.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
)
1010

1111
var (
12-
// NodeDownErr marks an operational as not able to complete since the node
13-
// is down.
12+
// NodeDownErr marks an operation as not able to complete since the node is
13+
// down.
1414
NodeDownErr = fmt.Errorf("node down")
1515
)
1616

command/alloc_status.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,11 @@ func (c *AllocStatusCommand) Run(args []string) int {
233233
var stats *api.AllocResourceUsage
234234
stats, statsErr = client.Allocations().Stats(alloc, nil)
235235
if statsErr != nil {
236+
c.Ui.Output("")
236237
if statsErr != api.NodeDownErr {
237-
c.Ui.Output("")
238238
c.Ui.Error(fmt.Sprintf("couldn't retrieve stats (HINT: ensure Client.Advertise.HTTP is set): %v", statsErr))
239+
} else {
240+
c.Ui.Output("Omitting resource statistics since the node is down.")
239241
}
240242
}
241243
c.outputTaskDetails(alloc, stats, displayStats)

0 commit comments

Comments
 (0)