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

nomad system gc doesn't take into account command line variables, only environment variables #10820

Closed
KarimJedda opened this issue Jun 25, 2021 · 2 comments · Fixed by #10822
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli type/bug

Comments

@KarimJedda
Copy link

Hi everyone, I just stumbled on what I believe is a little bug :) hope the following helps! I don't know go otherwise I would have tried to submit a PR.

Nomad version

Output from nomad version (on server, clients, management and local machines)
Nomad v1.1.1 (7feec97c04de4f8afff54ca9e56d66a61dfbfeb3)

Operating system and Environment details

Linux (Ubuntu 20) + tested on remote management server (Ubuntu 18)

Issue

Following doesn't work:
nomad system gc -ca-path=nomad-ca.pem -client-cert=nomad-cli-cert.pem -client-key=nomad-cli-key.pem -address=https://control:4646 -token=myepictoken

Following works:
NOMAD_ADDR=https://control:4646 NOMAD_CACERT=nomad-ca.pem NOMAD_CLIENT_KEY=nomad-cli-key.pem NOMAD_CLIENT_CERT=nomad-cli-cert.pem NOMAD_TOKEN=myepictoken nomad system gc

Reproduction steps

  • Spin up a remote nomad cluster.
  • Trigger garbage collection from a remote machine without setting the environment variables

Expected Result

The expected results refer to the following documentation https://www.nomadproject.io/docs/commands/system/gc#general-options

Actual Result

Variables not taken into account, requests are made to http://127.0.0.1:4646 for example when -address is set
Error running system garbage-collection: Put "http://127.0.0.1:4646/v1/system/gc": dial tcp 127.0.0.1:4646: connect: connection refused

@jrasell jrasell self-assigned this Jun 28, 2021
@jrasell jrasell added stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli labels Jun 28, 2021
@jrasell
Copy link
Member

jrasell commented Jun 28, 2021

Hi @KarimJedda and thanks for raising this issue. I have identified the problem and will shortly raise the fix.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants