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 agent does not show configured host_network #11223

Closed
shantanugadgil opened this issue Sep 23, 2021 · 8 comments
Closed

nomad agent does not show configured host_network #11223

shantanugadgil opened this issue Sep 23, 2021 · 8 comments
Labels
good first issue stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli type/enhancement
Milestone

Comments

@shantanugadgil
Copy link
Contributor

Nomad version

Nomad v1.1.5 (117a23d)

Operating system and Environment details

Amazon Linux 2

Issue

From a usability perspective, I couldn't find a way of listing the configured host_network on the client machine.
Commands that I have tried (on the machine in question):

  • nomad node status -self -verbose
  • nomad node status -self -json

none of the above commands contain any clue about the host_network named internal as shown below

Reproduction steps

add the following in the client section of the Nomad agent:

client {
  ...
  host_network "internal" {
    interface = "lo"
  }
}

restart the Nomad agent.

Expected Result

The node status or the node status -verbose should show the configured host_network for the node

Actual Result

there is no information if this has been configured correctly or not.

Job file (if appropriate)

N/A; although the networking works as expected, there is no way to query the information before launching the job.

(job file in any case)

job "host_network" {
  type        = "service"
  region      = "myregion"
  datacenters = ["mydc"]

  group "host_network" {
    count = 1

    network {
      port "http" {
        static       = 8080
        to           = 5678
        host_network = "internal"
      }
    }

    task "web" {
      driver = "docker"

      config {
        image          = "hashicorp/http-echo"
        args           = ["-text='hello world'"]
        auth_soft_fail = true

        ports = ["http"]
      }

      resources {
        cpu    = 1024
        memory = 1024
      }
    } # task1
  }   # group
}     # job

Nomad Server logs (if appropriate)

N/A

Nomad Client logs (if appropriate)

N/A

@angrycub @nickethier

@shantanugadgil shantanugadgil changed the title nomad agent does not show configure host_network nomad agent does not show configured host_network Sep 23, 2021
@shantanugadgil shantanugadgil changed the title nomad agent does not show configured host_network nomad agent does not show configured host_network Sep 23, 2021
@DerekStrickland DerekStrickland self-assigned this Sep 23, 2021
@DerekStrickland
Copy link
Contributor

Hi @shantanugadgil,

Thanks for raising this issue and providing configuration and reproduction steps. I'll try to reproduce your use case and update you on what I find.

@DerekStrickland
Copy link
Contributor

DerekStrickland commented Sep 24, 2021

Hi @shantanugadgil,

I just want to confirm. You are asking that this information be added. You are not saying that in some other scenario the information is available, but in your current configuration it is not available. Is that an accurate summary?

-Derek

@shantanugadgil
Copy link
Contributor Author

Yes, I am asking that this information (about the host networks) be added to the output.

As far as I tried, I was not able to "query" for the information using the cmd line

@DerekStrickland
Copy link
Contributor

ok thanks. I'll relabel this as an enhancement and add to the backlog for consideration then. Thx!

@lgfa29 lgfa29 added stage/accepted Confirmed, and intend to work on. No timeline committment though. good first issue theme/cli labels Oct 2, 2021
@DerekStrickland DerekStrickland removed their assignment Oct 27, 2021
deblasis added a commit to deblasis/nomad that referenced this issue Nov 2, 2021
This commit should address hashicorp#11223.
Specifically it enhances the CLI in order to return two flavours
(default,verbose) of the `node status` command.

Signed-off-by: Alessandro De Blasis <[email protected]>
@deblasis
Copy link
Contributor

deblasis commented Nov 2, 2021

Hi there,

I am wandering across the various projects looking for issues that I can contribute to. This one seemed like a good fit.

Given the client stanza described in the issue, a nomad node status returns the extra line:

Host Networks   = internal

while supplying the -verbose flag produces the section:

Host Networks
Name      CIDR         Interface
internal  127.0.0.1/8  lo

@shantanugadgil
Copy link
Contributor Author

Awesome. If approved, any chance of this making into 1.2.0 GA?

@tgross tgross closed this as completed in 9a5248b Nov 5, 2021
@tgross
Copy link
Member

tgross commented Nov 5, 2021

Fixed in #11432 and will ship in 1.2.0-rc1.

@tgross tgross added this to the 1.2.0 milestone Nov 5, 2021
@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 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/cli type/enhancement
Projects
None yet
Development

No branches or pull requests

5 participants