newsnowlabs / docker-ingress-routing-daemon

Docker swarm daemon that modifies ingress mesh routing to expose true client IPs to service containers
MIT License
161 stars 31 forks source link

Couldn't identify ingress network subnet #30

Closed ggree1 closed 1 year ago

ggree1 commented 1 year ago

Hi, Thanks for such a nice idea - dird.

I've been used to dird. Recently I removed docker swarm ingress and created with new subnet configuration.

docker network create \
--driver overlay \
--ingress \
--subnet=10.11.0.0/16 \
--gateway=10.11.0.2 \
--opt com.docker.network.driver.mtu=1200 \
ingress

And I executed like below,

docker-ingress-routing-daemon --ingress-gateway-ips 10.11.0.2 --install

Then I got error.

 Couldn't identify ingress network subnet or this node's ingress network IP; sleeping 1s, then exiting

my ingress info is like below,

 docker network inspect ingress
[
    {
        "Name": "ingress",
        "Id": "v32es3xqdduj7hr6jyq7xnhh2",
        "Created": "2023-04-06T04:47:11.046596306Z",
        "Scope": "swarm",
        "Driver": "overlay",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "10.11.0.0/16",
                    "Gateway": "10.11.0.2"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": true,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": null,
        "Options": {
            "com.docker.network.driver.mtu": "1200",
            "com.docker.network.driver.overlay.vxlanid_list": "4106"
        },
        "Labels": null
    }
]

What am I missing?

ggree1 commented 1 year ago

Never mind. After minutes, It works fine again. Weird thing is, with creating that new ingress, I can get client ip from ingress without starting dird.