Nomad: "missing network" constraint w/ bridge network

Created on 18 Aug 2020  路  3Comments  路  Source: hashicorp/nomad

Nomad version

v0.12.3

Operating system and Environment details

macOS Catalina 10.15.6
Single node nomad environment

Issue

Short version is.. I was trying to move to the group level network stanza and using the bridge network. When I bring up nomad with nomad agent -dev -config=./ on my macbook it doesn't load the bridge network driver. Works fine if I switch to a Linux VM. Is there something additional that I need to enable?

Reproduction steps

Job file (if appropriate)

    network {
      mode = "bridge"
      port "redis" {to = 6379, static = 6379} 
    }

    task "redis" {
      driver = "docker"
      config {
        image = "redis:3.2"
        ports = ["redis"]
      }

      service {
        name = "redis-cache"
        tags = ["global", "cache"]
        port = "6379"
        address_mode="driver"
        check {
          name     = "alive"
          address_mode="driver"
          type     = "tcp"
          interval = "10s"
          timeout  = "2s"
        }
      }

Nomad Client logs (if appropriate)

2020-08-17T22:54:44.785-0400 [DEBUG] client.fingerprint_mgr: built-in fingerprints: fingerprinters=[arch, cni, consul, cpu, host, memory, network, nomad, signal, storage, vault, env_aws, env_gce]

Most helpful comment

Hey @cecilphillip

The reason this is only working on linux is because the bridge Nomad networking mode is only fingerprinted on linux. If you remove the network mode = "bridge" line all together then it should schedule on macOS. The docker driver docs have been updated as well with current information on how to port map when you're unable to use bridge network mode: https://www.nomadproject.io/docs/drivers/docker#forwarding-and-exposing-ports

Let me know if you have any issues.

All 3 comments

Hey @cecilphillip

The reason this is only working on linux is because the bridge Nomad networking mode is only fingerprinted on linux. If you remove the network mode = "bridge" line all together then it should schedule on macOS. The docker driver docs have been updated as well with current information on how to port map when you're unable to use bridge network mode: https://www.nomadproject.io/docs/drivers/docker#forwarding-and-exposing-ports

Let me know if you have any issues.

Thanks @nickethier. Yep, that resolved it.
Would it be possible to also add a note in the docs somewhere that the bridge mode doesn't work in MacOS?

Yes! I鈥檓 glad you got it working 馃榿

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jippi picture jippi  路  3Comments

joliver picture joliver  路  3Comments

Smuerdt picture Smuerdt  路  3Comments

hamann picture hamann  路  3Comments

byronwolfman picture byronwolfman  路  3Comments