-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Labels
Description
If a service alias is copied to task, then the DNS resolution on the
service name will resolve to service VIP and all of Task-IPs and that
will break the concept of vip based load-balancing resulting in all the dns-rr caching issues.
This is a regression introduced in 17.06.0-rc1 and is not seen in 17.05 or earlier.
$ docker network create --scope=swarm testbrsfvmlr8cnjx5r4i4e6w7jijeb8
$ docker service create --network name=testbrs,alias=mysrv --name=srvtest busybox top
ta9b0frvmvco792te9h8acd9k
Since --detach=false was not specified, tasks will be created in the background.
In a future release, --detach=false will become the default.
$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
ta9b0frvmvco srvtest replicated 1/1 docker.io/library/busybox@sha256:c79345819a6882c31b41bc771d9a94fc52872fa651b36771fbe0c8461d7ee558
$ docker ps | grep srvtest
3c6fe281cfc6 busybox "top" 13 seconds ago Up 12 seconds srvtest.1.16jul607inlkwaabo9mi9yks7
root@Ubuntu-vm docker (taskalias) $ docker inspect 3c6fe281cfc6
[
{
"Id": "3c6fe281cfc6d94aa5d3fa722de4c358732ed326f053ec2d1d6cf51c36ecd674",
"Created": "2017-06-07T18:23:18.960122087Z",
"Path": "top",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 22963,
"ExitCode": 0,
"Error": "",
"StartedAt": "2017-06-07T18:23:19.559911343Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:c75bebcdd211f41b3a460c7bf82970ed6c75acaab9cd4c9a4e125b03ca113798",
"ResolvConfPath": "/var/lib/docker/containers/3c6fe281cfc6d94aa5d3fa722de4c358732ed326f053ec2d1d6cf51c36ecd674/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/3c6fe281cfc6d94aa5d3fa722de4c358732ed326f053ec2d1d6cf51c36ecd674/hostname",
"HostsPath": "/var/lib/docker/containers/3c6fe281cfc6d94aa5d3fa722de4c358732ed326f053ec2d1d6cf51c36ecd674/hosts",
"LogPath": "/var/lib/docker/containers/3c6fe281cfc6d94aa5d3fa722de4c358732ed326f053ec2d1d6cf51c36ecd674/3c6fe281cfc6d94aa5d3fa722de4c358732ed326f053ec2d1d6cf51c36ecd674-json.log",
"Name": "/srvtest.1.16jul607inlkwaabo9mi9yks7",
"RestartCount": 0,
"Driver": "aufs",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Data": null,
"Name": "aufs"
},
"Mounts": [],
"Config": {
"Hostname": "3c6fe281cfc6",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"top"
],
"Image": "busybox@sha256:c79345819a6882c31b41bc771d9a94fc52872fa651b36771fbe0c8461d7ee558",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.swarm.node.id": "kok4e0ar8yrj5jtzz9ufl3yr6",
"com.docker.swarm.service.id": "ta9b0frvmvco792te9h8acd9k",
"com.docker.swarm.service.name": "srvtest",
"com.docker.swarm.task": "",
"com.docker.swarm.task.id": "16jul607inlkwaabo9mi9yks7",
"com.docker.swarm.task.name": "srvtest.1.16jul607inlkwaabo9mi9yks7"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "8059ec6cd5d4f62886a532a72ac9dff4ae7abfb20931ccf4c74a04aded2dc0bb",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/8059ec6cd5d4",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"testbrs": {
"IPAMConfig": {},
"Links": null,
"Aliases": [
"mysrv",
"3c6fe281cfc6"
],
"NetworkID": "fvmlr8cnjx5r4i4e6w7jijeb8",
"EndpointID": "d4eca88f2a8b53778a9be31110d9e0c0cd1a6df668b63d9990f6e96a05f71874",
"Gateway": "172.20.0.1",
"IPAddress": "172.20.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:14:00:02",
"DriverOpts": null
}
}
}
}
]