{"action":"created","issue":{"url":"https://api.github.com/repos/skynetservices/skydns/issues/150","labels_url":"https://api.github.com/repos/skynetservices/skydns/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/skynetservices/skydns/issues/150/comments","events_url":"https://api.github.com/repos/skynetservices/skydns/issues/150/events","html_url":"https://github.com/skynetservices/skydns/issues/150","id":67242492,"number":150,"title":"A records and SRV records - too hacky?","user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-08T23:28:12Z","updated_at":"2015-04-09T19:55:42Z","closed_at":null,"body":"I'm still just learning how to use SRV.  Hooray for wikipedia.  I apologize if I am dumb.  This seems to work:\r\n\r\n```\r\n# etcdctl set /skydns/local/kubernetes/th1/srvtst1/_tcp/_http '{\"host\":\"1.1.1.1\", \"port\":80}'\r\n{\"host\":\"1.1.1.1\", \"port\":80}\r\n\r\n# etcdctl set /skydns/local/kubernetes/th1/srvtst1/_tcp/_https '{\"host\":\"1.1.1.1\", \"port\":443}'\r\n{\"host\":\"1.1.1.1\", \"port\":80}\r\n\r\n# dig @10.0.0.10 +noall +answer +additional _http._tcp.srvtst1.th1.kubernetes.local SRV\r\n_http._tcp.srvtst1.th1.kubernetes.local. 3600 IN SRV 10 100 80 _http._tcp.srvtst1.th1.kubernetes.local.\r\n_http._tcp.srvtst1.th1.kubernetes.local. 3600 IN A 1.1.1.1\r\n\r\n# dig @10.0.0.10 +noall +answer +additional _https._tcp.srvtst1.th1.kubernetes.local SRV\r\n_https._tcp.srvtst1.th1.kubernetes.local. 3600 IN SRV 10 100 443 _https._tcp.srvtst1.th1.kubernetes.local.\r\n_https._tcp.srvtst1.th1.kubernetes.local. 3600 IN A 1.1.1.1\r\n```\r\n\r\nIs that right?  Now I want to enable round-robin over that:\r\n\r\n```\r\n# etcdctl set /skydns/local/kubernetes/th1/srvtst1/_tcp/_http/pod1 '{\"host\":\"1.1.1.1\", \"port\":80}'\r\n{\"host\":\"1.1.1.1\", \"port\":80}\r\n\r\n# etcdctl set /skydns/local/kubernetes/th1/srvtst1/_tcp/_http/pod2 '{\"host\":\"1.1.1.2\", \"port\":80}'\r\n{\"host\":\"1.1.1.2\", \"port\":80}\r\n\r\n# dig @10.0.0.10 +noall +answer +additional _http._tcp.srvtst1.th1.kubernetes.local SRV\r\n_http._tcp.srvtst1.th1.kubernetes.local. 3600 IN SRV 10 100 80 pod1._http._tcp.srvtst1.th1.kubernetes.local.\r\n_http._tcp.srvtst1.th1.kubernetes.local. 3600 IN SRV 10 100 80 pod2._http._tcp.srvtst1.th1.kubernetes.local.\r\npod1._http._tcp.srvtst1.th1.kubernetes.local. 3600 IN A 1.1.1.1\r\npod2._http._tcp.srvtst1.th1.kubernetes.local. 3600 IN A 1.1.1.2\r\n```\r\n\r\nThis looks great.  Now I want an A record for srvtst1.th1.kubernetes.local\r\n\r\n```\r\n# dig @10.0.0.10 +noall +answer +additional srvtst1.th1.kubernetes.local A\r\n```\r\n\r\nNothing.  I guess that makes sense.  So now I write this:\r\n\r\n```\r\n# etcdctl set /skydns/local/kubernetes/th1/srvtst3/pod1 '{\"host\":\"1.1.1.1\", \"port\":80}'\r\n{\"host\":\"1.1.1.1\", \"port\":80}\r\n\r\n# etcdctl set /skydns/local/kubernetes/th1/srvtst3/pod2 '{\"host\":\"1.1.1.2\", \"port\":80}'\r\n{\"host\":\"1.1.1.2\", \"port\":80}\r\n\r\n# dig @10.0.0.10 +noall +answer +additional srvtst3.th1.kubernetes.local A\r\nsrvtst1.th1.kubernetes.local. 3600 IN\tA\t1.1.1.1\r\nsrvtst1.th1.kubernetes.local. 3600 IN\tA\t1.1.1.2\r\n```\r\n\r\nIt's this last step that is confusing to me - it feels...dirty.  Is it right?  This is related to the conversation @miekg were having last week.  @smarterclayton too\r\n"},"comment":{"url":"https://api.github.com/repos/skynetservices/skydns/issues/comments/91340992","html_url":"https://github.com/skynetservices/skydns/issues/150#issuecomment-91340992","issue_url":"https://api.github.com/repos/skynetservices/skydns/issues/150","id":91340992,"user":{"login":"SpComb","id":3950373,"avatar_url":"https://avatars.githubusercontent.com/u/3950373?v=3","gravatar_id":"","url":"https://api.github.com/users/SpComb","html_url":"https://github.com/SpComb","followers_url":"https://api.github.com/users/SpComb/followers","following_url":"https://api.github.com/users/SpComb/following{/other_user}","gists_url":"https://api.github.com/users/SpComb/gists{/gist_id}","starred_url":"https://api.github.com/users/SpComb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpComb/subscriptions","organizations_url":"https://api.github.com/users/SpComb/orgs","repos_url":"https://api.github.com/users/SpComb/repos","events_url":"https://api.github.com/users/SpComb/events{/privacy}","received_events_url":"https://api.github.com/users/SpComb/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T19:55:42Z","updated_at":"2015-04-09T19:55:42Z","body":"Dunno, that depends on how the client application doing SRV queries works. Once you're doing SRV queries like that, it's entirely up to you to define your own semantics, RFC2782 doesn't know anything about an SRV query like that, and e.g. python srvlookup can't be used to send a query like that.\r\n\r\nWhat kind of client behaviour would involve enumerating all the service-ports on a given host via DNS? Note how the reply there doesn't actually tell you what protocol (http or https) the given port is. The most common case is finding all the host:port combos providing a known service/protocol under for a given domain.\r\n\r\nAt least for my own scheme, I don't think I would need to support queries like that."}}