-
Notifications
You must be signed in to change notification settings - Fork 880
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
Make DNS records and queries case-insensitive #2394
Conversation
@arkodg as per your comment on moby, it will be a problem if we create container Foo and foo and attach in the same network. so we need to make sure it doesn't break existing functionality. Below is what the test I tried on 19.03
|
Should this take some round-robin approach if multiple containers share the same hostname (in different case), but prioritise "exact match" over "match, but different casing"? I think that was the proposal in; moby/moby#28689 (comment)
Oh, could you remove |
@thaJeztah the round-robin approach introduces non deterministic behavior so I would not want to implement that |
Agree. Thats will cause wired behavior. |
be98208
to
91601e1
Compare
True, this can be ambiguous, but round-robin is currently supported, and definitely has valid use-cases; example 1: "blue(ish) / green(ish) deployments"mkdir case-sense && cd case-sense
docker network create -d overlay --attachable myoverlay cat > docker-compose.yml -<<'EOF'
version: "3.5"
services:
web:
image: nginx:alpine
networks:
default:
external: true
name: myoverlay
EOF docker stack deploy -c docker-compose.yml stackblue
docker stack deploy -c docker-compose.yml stackgreen
docker run --rm --network myoverlay alpine nslookup web
nslookup: can't resolve '(null)': Name does not resolve
Name: web
Address 1: 10.0.1.10
Address 2: 10.0.1.13 Example 2: docker compose with aliases and scalingcat > docker-compose.yml -<<'EOF'
version: "3.5"
services:
web:
image: nginx:alpine
networks:
default:
aliases:
- foobar
networks:
default:
external: true
name: myoverlay
EOF docker-compose --project-name=example up -d --scale web=3
docker run --rm --network myoverlay alpine nslookup foobar
nslookup: can't resolve '(null)': Name does not resolve
Name: foobar
Address 1: 10.0.1.20 example_web_1.myoverlay
Address 2: 10.0.1.21 example_web_2.myoverlay
Address 3: 10.0.1.22 example_web_3.myoverlay |
Oh, looks like you made a typo in your commit message; |
Reading the RFC to check if case should be preserved, which seems to be the case (RFC4343 section 4);
Also of note; RFC4034, section 6.2;
Which might be different than |
With the current changes this is the o/p
I guess what you're saying is we need to preserve the name for |
RFC434 states that DNS Servers should be case insensitive This commit makes sure that all DNS queries will be translated to lower ASCII characters and all svcRecords will be saved in lower case to abide by the RFC Relates to moby/moby#21169 Signed-off-by: Arko Dasgupta <[email protected]>
91601e1
to
49b1a51
Compare
PTAL @thaJeztah @selansen with the latest changes the behavior looks like the following
|
This looks good @arkodg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
full diffs: - moby/libnetwork@fc5a7d9...62a13ae - vishvananda/netlink@b2de5d1...v1.0.0 - vishvananda/netns@604eaf1...13995c7 notable changes in libnetwork: - moby/libnetwork#2366 Bump vishvananda/netlink to 1.0.0 - moby/libnetwork#2339 controller: Check if IPTables is enabled for arrangeUserFilterRule - addresses moby/libnetwork#2158 dockerd when run with --iptables=false modifies iptables by adding DOCKER-USER - addresses moby#35777 With iptables=false dockerd still creates DOCKER-USER chain and rules - addresses docker/for-linux#136 dockerd --iptables=false adds DOCKER-USER chain and modify FORWARD chain anyway - moby/libnetwork#2394 Make DNS records and queries case-insensitive - addresses moby#28689 Embedded DNS is case-sensitive - addresses moby#21169 hostnames with new networking are case-sensitive Signed-off-by: Sebastiaan van Stijn <[email protected]>
full diffs: - moby/libnetwork@fc5a7d9...62a13ae - vishvananda/netlink@b2de5d1...v1.0.0 - vishvananda/netns@604eaf1...13995c7 notable changes in libnetwork: - moby/libnetwork#2366 Bump vishvananda/netlink to 1.0.0 - moby/libnetwork#2339 controller: Check if IPTables is enabled for arrangeUserFilterRule - addresses moby/libnetwork#2158 dockerd when run with --iptables=false modifies iptables by adding DOCKER-USER - addresses moby/moby#35777 With iptables=false dockerd still creates DOCKER-USER chain and rules - addresses docker/for-linux#136 dockerd --iptables=false adds DOCKER-USER chain and modify FORWARD chain anyway - moby/libnetwork#2394 Make DNS records and queries case-insensitive - addresses moby/moby#28689 Embedded DNS is case-sensitive - addresses moby/moby#21169 hostnames with new networking are case-sensitive Signed-off-by: Sebastiaan van Stijn <[email protected]> Upstream-commit: 344b093258fcb2195fa393081e5224a6c766c798 Component: engine
full diffs: - moby/libnetwork@fc5a7d9...62a13ae - vishvananda/netlink@b2de5d1...v1.0.0 - vishvananda/netns@604eaf1...13995c7 notable changes in libnetwork: - moby/libnetwork#2366 Bump vishvananda/netlink to 1.0.0 - moby/libnetwork#2339 controller: Check if IPTables is enabled for arrangeUserFilterRule - addresses moby/libnetwork#2158 dockerd when run with --iptables=false modifies iptables by adding DOCKER-USER - addresses moby#35777 With iptables=false dockerd still creates DOCKER-USER chain and rules - addresses docker/for-linux#136 dockerd --iptables=false adds DOCKER-USER chain and modify FORWARD chain anyway - moby/libnetwork#2394 Make DNS records and queries case-insensitive - addresses moby#28689 Embedded DNS is case-sensitive - addresses moby#21169 hostnames with new networking are case-sensitive Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 344b093) Signed-off-by: Sebastiaan van Stijn <[email protected]>
full diffs: - moby/libnetwork@fc5a7d9...62a13ae - vishvananda/netlink@b2de5d1...v1.0.0 - vishvananda/netns@604eaf1...13995c7 notable changes in libnetwork: - moby/libnetwork#2366 Bump vishvananda/netlink to 1.0.0 - moby/libnetwork#2339 controller: Check if IPTables is enabled for arrangeUserFilterRule - addresses moby/libnetwork#2158 dockerd when run with --iptables=false modifies iptables by adding DOCKER-USER - addresses moby/moby#35777 With iptables=false dockerd still creates DOCKER-USER chain and rules - addresses docker/for-linux#136 dockerd --iptables=false adds DOCKER-USER chain and modify FORWARD chain anyway - moby/libnetwork#2394 Make DNS records and queries case-insensitive - addresses moby/moby#28689 Embedded DNS is case-sensitive - addresses moby/moby#21169 hostnames with new networking are case-sensitive Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 344b093258fcb2195fa393081e5224a6c766c798) Signed-off-by: Sebastiaan van Stijn <[email protected]> Upstream-commit: f3e1aff81df959e9178433b77e7f3364c22aee59 Component: engine
full diffs: - moby/libnetwork@fc5a7d9...62a13ae - vishvananda/netlink@b2de5d1...v1.0.0 - vishvananda/netns@604eaf1...13995c7 notable changes in libnetwork: - moby/libnetwork#2366 Bump vishvananda/netlink to 1.0.0 - moby/libnetwork#2339 controller: Check if IPTables is enabled for arrangeUserFilterRule - addresses moby/libnetwork#2158 dockerd when run with --iptables=false modifies iptables by adding DOCKER-USER - addresses moby#35777 With iptables=false dockerd still creates DOCKER-USER chain and rules - addresses docker/for-linux#136 dockerd --iptables=false adds DOCKER-USER chain and modify FORWARD chain anyway - moby/libnetwork#2394 Make DNS records and queries case-insensitive - addresses moby#28689 Embedded DNS is case-sensitive - addresses moby#21169 hostnames with new networking are case-sensitive Signed-off-by: Sebastiaan van Stijn <[email protected]> Signed-off-by: zach <[email protected]>
Signed-off-by: Arko Dasgupta [email protected]