skynetservices / skydns

DNS service discovery for etcd
MIT License
2.2k stars 305 forks source link

simple feature request: forward own domain requests if etcd not available #269

Open TrurlMcByte opened 8 years ago

TrurlMcByte commented 8 years ago

I'ts possible to add flag to forward own domain requests to "nameservers" if etcd currently not available (or don't have skydns/config)? It's useful in case when etcd itself trying to use same skydns to resolve own cluster on bootstrap

miekg commented 8 years ago

[ Quoting notifications@github.com in "[skynetservices/skydns] simple feat..." ]

I'ts possible to add flag to forward own domain requests to "nameservers" if etcd currently not available (or don't have skydns/config)? It's useful in case when etcd itself trying to use same skydns to resolve own cluster on bootstrap

There is code in skydns that allows you to chain backends, but the DNS is not your friend if you try this, because of caching and other thing. What if the other nameserver return something different and the client never asks again?

What problem are you trying to solve?

/Miek

Miek Gieben

TrurlMcByte commented 8 years ago

I'm trying to start etcd2 cluster backend using DNS discovery on SkyDNS, which use this starting backend (recursion) Currently only one solution is start SkyDNS with fake wrong domain and, after etcd cluster and swarm started, restart SkyNDS again with real domain (etcd have too small resolving timeouts) Also I have BIND with static version of same domain with etcd cluster initial config only.

miekg commented 8 years ago

[ Quoting notifications@github.com in "Re: [skynetservices/skydns] simple ..." ]

I'm trying to start etcd2 cluster backend using DNS discovery on SkyDNS, which use this starting backend (recursion)

Wait, you start the cluster by bootstrapping it from SkyDNS which needs a etcd cluster?

Currently only one solution is start SkyDNS with fake wrong domain and, after etcd cluster and swarm started, restart SkyNDS again with real domain (etcd have too small resolving timeouts) Also I have BIND with static version of same domain with etcd cluster initial config only.

How do you specify the initial set of ip address for the etcd cluster in your bind zone?

/Miek

Miek Gieben

TrurlMcByte commented 8 years ago

Wait, you start the cluster by bootstrapping it from SkyDNS which needs a etcd cluster?

Yep, It's bit crazy, but it's real situation after total blackout or some other disaster. It's just few A and SRV records, but etcd can't use more as one NS "in real life" (got timeout if first is dead). And I can't "switch it later" it's must be real IP of NS from start. So I use other (static) NS as forwarder for SkyDNS on bootstrap, but SkyDNS (it's starting faster) in this moment (no backend yet) forwarding only not own domain request. And etcd getting from skydns empty answer (because no backend)...