nomad
nomad copied to clipboard
cli: operator `root` and `gossip` subcommands missing synopsis
Nomad version
Nomad v1.4.1 (2aa7e66bdb526e25f59883952d74dad7ea9a014e
Issue
When running nomad operator
, the command output is missing synopsis entries for the root
and gossip
subcommands. The nomad operator root
and nomad operator gossip
commands also output generic help messages rather than potentially useful detail about the command.
I believe this issue is caused because Nomad does not have implementations of the subcommands operator root
and operator gossip
which provide the synopsis and additional help output.
Reproduction steps
Run the nomad operator
command.
Expected Result
All subcommands including synopsis.
Actual Result
WARNING! The "nomad operator keygen" command is deprecated. Please use "nomad
operator gossip keyring generate" instead. This command will be removed a
later version of Nomad.
Usage: nomad operator <subcommand> [options]
Provides cluster-level tools for Nomad operators, such as interacting with
the Raft subsystem. NOTE: Use this command with extreme caution, as improper
use could lead to a Nomad outage and even loss of data.
Please see the individual subcommand help for detailed usage information.
Subcommands:
api Query Nomad's HTTP API
autopilot Provides tools for modifying Autopilot configuration
debug Build a debug archive
gossip
keygen Generates a new encryption key
keyring Manages gossip layer encryption keys
metrics Retrieve Nomad metrics
raft Provides access to the Raft subsystem
root
scheduler Provides access to the scheduler configuration
snapshot Saves and inspects snapshots of Nomad server state
Hi @jrasell, can I work on this? I'm new to nomad and would like to contribute to this issue since it has good first issue label!
I've got a question. Do I also need to create docs for gossip
and root
?
It seems other subcommands have links on this page. https://developer.hashicorp.com/nomad/docs/commands/operator
And each subcommand has its detail page https://developer.hashicorp.com/nomad/docs/commands/operator/debug
Hi @shogohida yes of course; I can't assign the issue to you as that is only possible with Nomad team members, but this note can be used as a marker to other readers. The autopilot command can provide a good example for creating these two new commands. Please let me know if you have any others questions!
If possible, adding the missing CLI commands to the operator command listing would be great, but that is not required as part of this PR and can be done in a followup.
@jrasell Thanks for your explanation! Do I have to add help text like autopilot command? If so, where can I find the right text for 2 new subcommands?
@jrasell
I did further research into this issue and found that gossip
and root
are always executed with keyring
. I assume that's the reason why there is no synopsis for them. I mean, gossip
and root
themselves don't mean anything as subcommands.
Should I create files called operator_gossip.go
and operator_root.go
even in this situation? I looked into operator_autopilot.go and it seemed a bit strange for me to create new files because gossip
and root
themselves don't mean anything as subcommands as I said...
By the way, I thought it was a good idea to merge them into keyring
to show just one synopsis but it will be removed, so we need another solution to this problem.