rancher: rancher-dns does not honor upstream TTL, static TTL for all requests
Rancher versions: rancher/server: 1.5.9 rancher/agent: 1.2.2
Infrastructure Stack versions: network-services: metadata 0.9.1, network-manager 0.6.6
Docker version: (docker version,docker info preferred)
Operating system and kernel: (cat /etc/os-release, uname -r preferred)
RancherOS 1.0
Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
Parallels VM
Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)
HA with external DB
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:
I have consul dns for service discovery. When I start my services dns lookup seems to be ok:
me@container$ dig db.cachet.service.x
...
...
db.cachet.service.x. 0 IN A 10.42.143.80
After that I try to upgrade db and got the same thing, but on host(outside of container) dns lookup works fine:
me@host$ dig db.cachet.service.x
...
db.cachet.service.herzen. 0 IN A 10.42.8.85
me@container$ dig db.cachet.service.x
...
...
db.cachet.service.x. 0 IN A 10.42.143.80
Is there any way to reduce TTL for internal dns cache? Because, there is no way to wait five or more minutes for dns cache invalidation.
Guys, please, do something with it. It’s really awful.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 18 (6 by maintainers)
@ketchoop just a quick summary. We have 2 issues:
for 1) we are going to make TTL configurable via the template (with 10 seconds as default). This fix would be provided ASAP to unblock you.
for 2) a bigger fix is needed for the rancher-dns. When store item in DNS cache, store it for the upstream TTL. Also upon forming the response to the user, update the TTL value to “upstream TTL - time spend in rancher dns internal cache”. Along with the fix, we are gonna change the default value for defaultTTL to 10 seconds on the microservice side as well.
@kinarashah ^
@superseb OH GOD, IT WORKS! Do you need additional info? Logs, dns queries and other things?