cli: remove outdated hints

Hints no longer apply in the 0.8 Node RPC world.
This commit is contained in:
Michael Schurter
2018-04-09 12:09:47 -07:00
parent 1b3f4a18ca
commit 1b1a8d44fd
2 changed files with 3 additions and 3 deletions

View File

@@ -196,7 +196,7 @@ func (c *AllocStatusCommand) Run(args []string) int {
if statsErr != nil {
c.Ui.Output("")
if statsErr != api.NodeDownErr {
c.Ui.Error(fmt.Sprintf("Couldn't retrieve stats (HINT: ensure Client.Advertise.HTTP is set): %v", statsErr))
c.Ui.Error(fmt.Sprintf("Couldn't retrieve stats: %v", statsErr))
} else {
c.Ui.Output("Omitting resource statistics since the node is down.")
}

View File

@@ -316,7 +316,7 @@ func (c *NodeStatusCommand) formatNode(client *api.Client, node *api.Node) int {
hostStats, nodeStatsErr := client.Nodes().Stats(node.ID, nil)
if nodeStatsErr != nil {
c.Ui.Output("")
c.Ui.Error(fmt.Sprintf("error fetching node stats (HINT: ensure Client.Advertise.HTTP is set): %v", nodeStatsErr))
c.Ui.Error(fmt.Sprintf("error fetching node stats: %v", nodeStatsErr))
}
if hostStats != nil {
uptime := time.Duration(hostStats.Uptime * uint64(time.Second))
@@ -358,7 +358,7 @@ func (c *NodeStatusCommand) formatNode(client *api.Client, node *api.Node) int {
hostResources, err := getHostResources(hostStats, node)
if err != nil {
c.Ui.Output("")
c.Ui.Error(fmt.Sprintf("error fetching node stats (HINT: ensure Client.Advertise.HTTP is set): %v", err))
c.Ui.Error(fmt.Sprintf("error fetching node stats: %v", err))
}
if err == nil {
c.Ui.Output(c.Colorize().Color("\n[bold]Host Resource Utilization[reset]"))