25 Commits

Author SHA1 Message Date
James Rasell
2ef837f02f cli: Ensure all no argument console messages are the same. (#26331)
Use a constant to ensure consistency across the CLI when displaying
a console message indicating the command was passed arguments when
it takes none.
2025-07-25 07:05:10 +01:00
Phil Renaud
35e1ea4328 [cli] UI URL hints for common CLI commands (#24454)
* Basic implementation for server members and node status

* Commands for alloc status and job status

* -ui flag for most commands

* url hints for variables

* url hints for job dispatch, evals, and deployments

* agent config ui.cli_url_links to disable

* Fix an issue where path prefix was presumed for variables

* driver uncomment and general cleanup

* -ui flag on the generic status endpoint

* Job run command gets namespaces, and no longer gets ui hints for --output flag

* Dispatch command hints get a namespace, and bunch o tests

* Lots of tests depend on specific output, so let's not mess with them

* figured out what flagAddress is all about for testServer, oof

* Parallel outside of test instances

* Browser-opening test, sorta

* Env var for disabling/enabling CLI hints

* Addressing a few PR comments

* CLI docs available flags now all have -ui

* PR comments addressed; switched the env var to be consistent and scrunched monitor-adjacent hints a bit more

* ui.Output -> ui.Warn; moves hints from stdout to stderr

* isTerminal check and parseBool on command option

* terminal.IsTerminal check removed for test-runner-not-being-terminal reasons
2025-03-07 13:23:35 -05:00
hashicorp-copywrite[bot]
a9d61ea3fd Update copyright file headers to BUSL-1.1 2023-08-10 17:27:29 -05:00
Yethal
93fc71bb37 cli: show leader status in json output of server members (#17138) 2023-05-18 16:43:57 -04:00
hashicorp-copywrite[bot]
f005448366 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
Juana De La Cuesta
151147b718 cli: Add json and -t flags to server members command (#16444)
* cli: Add  and  flags to server members

* Update website/content/docs/commands/server/members.mdx

Co-authored-by: James Rasell <jrasell@users.noreply.github.com>

* Update website/content/docs/commands/server/members.mdx

Co-authored-by: James Rasell <jrasell@users.noreply.github.com>

* cli: update the server memebers tests to use must

* cli: add flags addition to changelog

---------

Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-03-20 10:39:24 +01:00
Luiz Aoqui
eca4ac67f3 cli: display Raft version in server members (#12317)
The previous output of the `nomad server members` command would output a
column named `Protocol` that displayed the Serf protocol being currently
used by servers.

This is not a configurable option, so it holds very little value to
operators. It is also easy to confuse it with the Raft Protocol version,
which is configurable and highly relevant to operators.

This commit replaces the previous `Protocol` column with the new `Raft
Version`. It also updates the `-detailed` flag to be called `-verbose`
so it matches other commands. The detailed output now also outputs the
same information as the standard output with the addition of the
previous `Protocol` column and `Tags`.
2022-03-17 14:15:10 -04:00
Kris Hicks
2cd7136bc7 Fix some errcheck errors (#9811)
* Throw away result of multierror.Append

When given a *multierror.Error, it is mutated, therefore the return
value is not needed.

* Simplify MergeMultierrorWarnings, use StringBuilder

* Hash.Write() never returns an error

* Remove error that was always nil

* Remove error from Resources.Add signature

When this was originally written it could return an error, but that was
refactored away, and callers of it as of today never handle the error.

* Throw away results of io.Copy during Bridge

* Handle errors when computing node class in test
2021-01-14 12:46:35 -08:00
Tim Gross
8a66f11bb3 docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
Tim Gross
89f4f51746 command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
Nick Ethier
45b0ce9177 command: improve help text when invalid arguments are given 2018-04-18 12:02:11 -04:00
Alex Dadgar
9f99b9d3d7 Generic handling of server region errors 2018-03-30 10:57:32 -07:00
Alex Dadgar
c7fc6571d8 use subcommands 2018-03-21 20:27:32 -07:00
Preetha Appan
4715533743 Ignore left members when querying regions for leader in server-members command. 2018-03-05 16:56:36 -06:00
Chelsea Holland Komlo
e88228cc5d add global flags to autocomplete 2017-08-23 22:58:44 +00:00
Chelsea Holland Komlo
c1e5c7132a enable autocompletion of flags 2017-08-23 22:57:07 +00:00
Michael Schurter
4eb30022b2 Use net.JoinHostPort instead of fmt.Sprintf
Using fmt.Sprintf breaks IPv6 addresses.
2016-11-28 10:38:54 -08:00
Diptanu Choudhury
f766f71500 Changing the API to use the new servermember datastructure 2016-11-06 10:30:43 -08:00
Seth Vargo
04c7163aa2 Clarify server-members is server-only (#1761)
* Add a note to the CLI that only servers can run this command

* Add a callout that this is a server command

* Remove the annoying bottom margin on callouts
2016-09-27 13:51:54 -07:00
Alex Dadgar
38dbe768e7 Add eval-status and remove eval-monitor 2016-05-27 11:50:15 -07:00
Alex Dadgar
b6585fc50c Better error handling 2016-04-22 15:59:56 -07:00
Alex Dadgar
139064008d display server leaders per region 2016-03-17 16:04:09 -07:00
Ivo Verberk
2559bd68c8 Do not use the exact internal field names in the CLI output 2016-01-21 21:35:56 +01:00
Gregory Man
09513e0147 Sort server-members output using name and tags 2015-10-23 21:33:18 +03:00
Ryan Uber
120974820f command: rename some agent commands to use a server- prefix 2015-09-22 11:01:41 -07:00