I was trying Nomad job with Consul Connect, and after many steps I was failed by:
failed to setup alloc: pre-run hook "network" failed: failed to configure networking for alloc: failed to configure bridge network: failed to open netns "/var/run/docker/netns/48b267c7ac4f": unknown FS magic on "/var/run/docker/netns/48b267c7ac4f": 1021994
Nomad 0.10.3
Consul 1.8
cni-plugins-linux-amd64-v0.8.6.tgz
job "cm-api-${env}" {
datacenters = ["a", "b", "c"]
type = "service"
constraint {
attribute = "$${node.class}"
value = "${env}"
}
# only one group
group "cm-api" {
restart {
attempts = 3
interval = "30m"
delay = "15s"
}
network {
mode = "bridge"
}
service {
name = "cm-api"
port = 8100
connect {
sidecar_service {}
}
}
task "cm-api" {
env {
RELOAD_INTERVAL = 3600
}
driver = "docker"
config {
image = "private-registry/cm-api:${version}"
force_pull = true
network_mode = "host"
auth {
username = ""
password = ""
}
auth_soft_fail = true
}
resources {
network {
port "metrics" { }
}
}
service {
name = "cm-api"
port = "metrics"
tags = ["$${node.class}"]
check {
type = "http"
port = "metrics"
path = "/metrics"
interval = "30s"
timeout = "10s"
check_restart {
limit = 3
grace = "90s"
}
}
}
}
}
}
Google search suggests it is caused by /var/run/
not mount shared.