Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
1b1a8d44
Commit
1b1a8d44
authored
7 years ago
by
Michael Schurter
Browse files
Options
Download
Email Patches
Plain Diff
cli: remove outdated hints
Hints no longer apply in the 0.8 Node RPC world.
parent
1b3f4a18
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
command/alloc_status.go
+1
-1
command/alloc_status.go
command/node_status.go
+2
-2
command/node_status.go
with
3 additions
and
3 deletions
+3
-3
command/alloc_status.go
+
1
-
1
View file @
1b1a8d44
...
...
@@ -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."
)
}
...
...
This diff is collapsed.
Click to expand it.
command/node_status.go
+
2
-
2
View file @
1b1a8d44
...
...
@@ -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]"
))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help