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

Fix empty IP for backend when dnsrr in Docker swarm mode #2490

Merged
merged 1 commit into from
Dec 1, 2017

Conversation

mmatur
Copy link
Member

@mmatur mmatur commented Nov 29, 2017

What does this PR do?

Fixes #1494

Currently we don't manage DNSRR resolution mode in Docker swarm mode. This PR only excludes services with DNSRR resolution mode.

We will try to implement DNSRR resolution mode in Docker swarm mode ASAP

More

  • Added/updated tests

Copy link
Contributor

@nmengin nmengin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏 👏

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez changed the title Fix empty IP for backend when the Docker service is created as --endpoint-mode dnsrr in Docker swarm mode Fix empty IP for backend when dnsrr in Docker swarm mode Nov 30, 2017
Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevtainer
Copy link
Contributor

We will try to implement DNSRR resolution mode in Docker swarm mode ASAP

is there an issue being tracked for this work?

@caseycs
Copy link
Contributor

caseycs commented Feb 16, 2018

Looks like the problem still exists - 1.5.2 and Docker Swarm Docker version 17.12.0-ce, build c97c6d6
screenshot 2018-02-16 03 19 14

deploy@www3:~$ sudo sudo ./traefik  -c traefik.sample.toml
INFO[2018-02-16T03:14:50+01:00] Using TOML configuration file /home/deploy/traefik.sample.toml
WARN[2018-02-16T03:14:50+01:00] web provider configuration is deprecated, you should use these options : api, rest provider, ping and metrics
WARN[2018-02-16T03:14:50+01:00] web option is ignored if you use it with one of these options : api, rest provider, ping or metrics
INFO[2018-02-16T03:14:50+01:00] Traefik version v1.5.2 built on 2018-02-12_10:55:08AM
...
DEBU[2018-02-16T03:14:50+01:00] Validation of load balancer method for backend backend-nginx failed: invalid load-balancing method ''. Using default method wrr.
DEBU[2018-02-16T03:14:50+01:00] Configuration received from provider docker: {"backends":{"backend-nginx":{"servers":{"server-nginx-1":{"url":"http://:80","weight":0},"server-nginx-2":{"url":"http://:80","weight":0},"server-nginx-3":{"url":"http://:80","weight":0},"server-nginx-4":{"url":"http://:80","weight":0}},"loadBalancer":{"method":"wrr"}}},"frontends":{"frontend-Host-test-test-nl-0":{"entryPoints":["http"],"backend":"backend-nginx","routes":{"route-frontend-Host-test-test-nl-0":{"rule":"Host:test.test.nl"}},"passHostHeader":true,"priority":0,"basicAuth":[]}}}
DEBU[2018-02-16T03:14:50+01:00] Creating frontend frontend-Host-test-test-nl-0
DEBU[2018-02-16T03:14:50+01:00] Wiring frontend frontend-Host-test-test-nl-0 to entryPoint http
DEBU[2018-02-16T03:14:50+01:00] Creating route route-frontend-Host-test-test-nl-0 Host:test.test.nl
DEBU[2018-02-16T03:14:50+01:00] Creating backend backend-nginx
DEBU[2018-02-16T03:14:50+01:00] Creating load-balancer wrr
DEBU[2018-02-16T03:14:50+01:00] Creating server server-nginx-4 at http://:80 with weight 0
DEBU[2018-02-16T03:14:50+01:00] Creating server server-nginx-2 at http://:80 with weight 0
DEBU[2018-02-16T03:14:50+01:00] Creating server server-nginx-3 at http://:80 with weight 0
DEBU[2018-02-16T03:14:50+01:00] Creating server server-nginx-1 at http://:80 with weight 0

And on the docker side:

deploy@www3:~$ sudo docker service inspect nginx
[
    {
...
            "EndpointSpec": {
                "Mode": "dnsrr"
            }
        },
...
    }
]

@mmatur mmatur deleted the fix-container-with-empty-ip-swarm branch February 16, 2018 07:09
@mmatur
Copy link
Member Author

mmatur commented Feb 16, 2018

Hi @caseycs,

Could you open a new issue with a detailed configuration please ?

  • Træfik configuration
  • Compose file with your stack

@caseycs
Copy link
Contributor

caseycs commented Feb 16, 2018

@mmatur thanks, I tried to make it as clear as I can: #2869

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants