Podman allocations not properly registered in consul

Hi folks, I’m having a very similar issue to this thread Nomad,Consul and Podman assistance - #6 by KK123

…but the accepted solution isn’t working / doesn’t apply.

I’m running rootful containers on podman with the latest (as of yesterday) podman driver from git.

Nomad is registering the services running in podman with ip addresses in the 10.88.0.0/16 subnet, which belongs to the cni-podman0 iface.

Try as I might I can’t get the services to be exposed on another interface/network.

My nomad clients (not servers) are running with a config like:

client {
  enabled = true
  network_interface = "eth0"

  host_network "mgmt" {
    interface = "eth0"
  }
  host_network "app" {
    interface = "eth1"
  }
}

and the nomad jobs’s group section contains a stanza like:

...
    network {
      port "http" {
        to = 8080
        host_network = "mgmt"
      }
    }
...

The services registered to consul always have an ip in the 10.88.0.0/16 network. Yet in nomad itself, the allocation shows the http port along with the proper network (mgmt in this case). The service is working fine and bound to the proper iface, it’s just consul that has the erroneous addr.

Originally I tried a more vanilla config (without host_networks defined in the clients and without host_network defined in the jobs), but I had the same issue.

I’m running nomad 1.2.2

Any tips on how to solve this?