Skip to content

detect and adapt to system DNS and network/VPN changes at runtime #88

Closed

Description

@TheIndifferent

The ugly workaround I've submitted to TheNewNormal/corectl.app#21 works, but would be much better to have that in corectld itself.

Use-case is the following:

  • corectld starts in home network with local DNS 192.168.1.1 to resolve hostnames from local network.
  • VPN connection is established to restrictive office network, /etc/resolv.conf is updated with new DNS 10.11.12.13, to resolve internal docker images registry (which is not available for public) registry.mycompany.net.

Currently I have to restart the corectld every time VPN connection drops or established again, which also means that VM restarts and all containers are stopped.

Would be great to have dynamic refresh of resolv.conf from inside corectld, so new DNS will be used - even if with some delay - but without restarting.

Activity

  1. changed the title [-]Please add support and periodical refresh of /etc/resolv.conf[/-] [+]detect and adapt to system DNS and network/VPN changes at runtime[/+] on Jul 25, 2016
  2. AntonioMeireles commented on Jul 25, 2016

    @AntonioMeireles
    Member

    we'll try to integrate what you want together with transparent handling of VPN interfaces.

  3. TheIndifferent commented on Aug 31, 2016

    @TheIndifferent
    Author

    Small update: found out that skydns will read nameservers from /etc/resolv.conf if none specific, that worked (deleting this line: https://github.com/TheNewNormal/corectl/blob/golang/components/server/dns.go#L63 ). But now another showstopper appeared, search domains. VirtualBox made it seem so easy, just set to use host DNS resolver for NAT and everything magically works, but digging into it suddenly there are so many corner cases...

  4. rbellamy commented on Oct 3, 2016

    @rbellamy

    I'm not sure if this is related to an issue I'm having, since I'm still learning the intricacies of coreos + kubernetes, let alone corectl.

    My pods can resolve external DNS queries just fine, but cannot resolve those DNS requests that require our internal DNS server (we use split DNS VPN tunnels via Cisco AnyConnect).

    DNS queries for private addresses run on the host resolve internal addresses just fine.
    DNS queries for private addresses run on k8solo-01 or in any of the pods, fail to resolve.

    Mac OS X El Capitan

    2016-10-03 04:06:10
    rbellamy@terraspark i ~/Development/Terradatum/aergo/aergo-client feature/docker % nslookup
    > aergo.dev.terradatum.com
    Server:     10.1.1.245
    Address:        10.1.1.245#53
    
    Non-authoritative answer:
    Name:   aergo.dev.terradatum.com
    Address: 10.1.1.146
    

    k8solo-01

    core@k8solo-01 ~ $ nslookup
    > server 10.1.1.245
    Default server: 10.1.1.245
    Address: 10.1.1.245#53
    > aergo.dev.terradatum.com
    Server:     10.1.1.245
    Address:        10.1.1.245#53
    
    ** server can't find aergo.dev.terradatum.com: NXDOMAIN
    

    Neither can I ping the internal DNS server from k8solo-01

    core@k8solo-01 ~ $ ping 10.1.1.245
    PING 10.1.1.245 (10.1.1.245) 56(84) bytes of data.
    ^C
    --- 10.1.1.245 ping statistics ---
    5 packets transmitted, 0 received, 100% packet loss, time 4004ms
    

    So perhaps this is more a routing issue than a DNS issue - should the DNS server at 192.168.64.1 be able to resolve any query that my Mac OS X can resolve?

  5. databus23 commented on Nov 23, 2016

    @databus23

    Whats the status of this issue? It seems to me right now corectld does not consider /etc/resolv.conf at all. It defaults to public nameservers from google (8.8.8.8 and 8.8.4.4) and thats it.
    This is not working well for environments where public dns servers are not reachable.

    I'm hitting a wall trying to use corectl.app which starts corectld with static parameters and no good way to add --recursive-nameservers.

    Issue TheNewNormal/corectl.app#21 is basically what I want but it was closed with a reference to this issue.

  6. AntonioMeireles commented on Dec 1, 2016

    @AntonioMeireles
    Member

    @databus23 just reopened TheNewNormal/corectl.app#21. Thanks for reporting!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址