Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic on every run of the keyring command. #3509

Merged
merged 1 commit into from
Nov 6, 2017

Conversation

jrasell
Copy link
Member

@jrasell jrasell commented Nov 6, 2017

This change removes the flag token declaration within keyring.go which caused a flag redefined panic on every command run as the token flag is specified in the command meta.

The change has been built and tested locally by running the compiled binary:

$ nomad-local agent -dev -encrypt=<REDACTED>

The local running instance was then queried using the compiled binary:

$ nomad-local keyring  -list
==> Gathering installed encryption keys...
Key
<REDACTED>

Running the command without any parameters also now results in the usage being correctly printed to the console:

$ nomad keyring
Usage: nomad keyring [options]

  Manages encryption keys used for gossip messages between Nomad servers. Gossip
  encryption is optional. When enabled, this command may be used to examine
  active encryption keys in the cluster, add new keys, and remove old ones. When
  combined, this functionality provides the ability to perform key rotation
  cluster-wide, without disrupting the cluster.

  All operations performed by this command can only be run against server nodes.

  All variations of the keyring command return 0 if all nodes reply and there
  are no errors. If any node fails to reply or reports failure, the exit code
  will be 1.

General Options:

Coses #3508

This change removes the flag token declaration within keyring.go
which caused a flag redefined panic on every command run as the
token flag is specified in the command meta.
@schmichael
Copy link
Member

Thanks @jrasell!

@schmichael schmichael merged commit ed142eb into hashicorp:master Nov 6, 2017
schmichael added a commit that referenced this pull request Nov 6, 2017
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants