{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/comments/35770092","id":35770092,"diff_hunk":"@@ -271,12 +271,15 @@ func (rg *RecordGenerator) InsertState(sj StateJSON, domain string, ns string,\n \n \t// creates a map with slave IP addresses (IPv4)\n \trg.SlaveIPs = make(map[string]string)\n+\trg.SRVs = make(rrs)\n+\trg.As = make(rrs)\n+\n \tfor _, slave := range sj.Slaves {\n-\t\trg.SlaveIPs[slave.ID] = sanitizedSlaveAddress(slave.Hostname, spec)\n+\t\tssa := sanitizedSlaveAddress(slave.Hostname, spec)","path":"records/generator.go","position":9,"original_position":9,"commit_id":"659d1dc164f9359fc501157d0efb8335b4835676","original_commit_id":"659d1dc164f9359fc501157d0efb8335b4835676","user":{"login":"jdef","id":2348332,"avatar_url":"https://avatars.githubusercontent.com/u/2348332?v=3","gravatar_id":"","url":"https://api.github.com/users/jdef","html_url":"https://github.com/jdef","followers_url":"https://api.github.com/users/jdef/followers","following_url":"https://api.github.com/users/jdef/following{/other_user}","gists_url":"https://api.github.com/users/jdef/gists{/gist_id}","starred_url":"https://api.github.com/users/jdef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdef/subscriptions","organizations_url":"https://api.github.com/users/jdef/orgs","repos_url":"https://api.github.com/users/jdef/repos","events_url":"https://api.github.com/users/jdef/events{/privacy}","received_events_url":"https://api.github.com/users/jdef/received_events","type":"User","site_admin":false},"body":"actually there's a chance that `sanitizedSlaveAddress` doesn't return a string containing an ipv4 address, which will result in a bad A record. should probably test for that.","created_at":"2015-07-29T15:04:43Z","updated_at":"2015-07-29T15:04:43Z","html_url":"https://github.com/mesosphere/mesos-dns/pull/196#discussion_r35770092","pull_request_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/196","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/comments/35770092"},"html":{"href":"https://github.com/mesosphere/mesos-dns/pull/196#discussion_r35770092"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/196"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/196","id":41023443,"html_url":"https://github.com/mesosphere/mesos-dns/pull/196","diff_url":"https://github.com/mesosphere/mesos-dns/pull/196.diff","patch_url":"https://github.com/mesosphere/mesos-dns/pull/196.patch","issue_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/196","number":196,"state":"closed","locked":false,"title":"add A record slave.<domain> to contain list of slave IPs","user":{"login":"lloesche","id":2124094,"avatar_url":"https://avatars.githubusercontent.com/u/2124094?v=3","gravatar_id":"","url":"https://api.github.com/users/lloesche","html_url":"https://github.com/lloesche","followers_url":"https://api.github.com/users/lloesche/followers","following_url":"https://api.github.com/users/lloesche/following{/other_user}","gists_url":"https://api.github.com/users/lloesche/gists{/gist_id}","starred_url":"https://api.github.com/users/lloesche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lloesche/subscriptions","organizations_url":"https://api.github.com/users/lloesche/orgs","repos_url":"https://api.github.com/users/lloesche/repos","events_url":"https://api.github.com/users/lloesche/events{/privacy}","received_events_url":"https://api.github.com/users/lloesche/received_events","type":"User","site_admin":false},"body":"This allows me to resolve slave.mesos and get a list of all slave IPs.\r\nWe'd like to use this for our dreamathon monitoring project which is supposed to run on DCOS and monitor the state of all mesos slaves.\r\n\r\nIn a second step I'd also like to add appropriate SRV records, but couldn't find an easy way to get the slave port out of the current data structure.","created_at":"2015-07-28T15:17:26Z","updated_at":"2015-07-29T15:04:44Z","closed_at":"2015-07-29T14:54:51Z","merged_at":"2015-07-29T14:54:51Z","merge_commit_sha":"385200fbe4d8ce7ac8b3df1682e69707d6abbebb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/196/commits","review_comments_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/196/comments","review_comment_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/196/comments","statuses_url":"https://api.github.com/repos/mesosphere/mesos-dns/statuses/659d1dc164f9359fc501157d0efb8335b4835676","head":{"label":"mesosphere:lloesche/add-slaves-sld","ref":"lloesche/add-slaves-sld","sha":"659d1dc164f9359fc501157d0efb8335b4835676","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":26509179,"name":"mesos-dns","full_name":"mesosphere/mesos-dns","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/mesos-dns","description":" DNS-based service discovery for Mesos.","fork":false,"url":"https://api.github.com/repos/mesosphere/mesos-dns","forks_url":"https://api.github.com/repos/mesosphere/mesos-dns/forks","keys_url":"https://api.github.com/repos/mesosphere/mesos-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/mesos-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/mesos-dns/teams","hooks_url":"https://api.github.com/repos/mesosphere/mesos-dns/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/mesos-dns/events","assignees_url":"https://api.github.com/repos/mesosphere/mesos-dns/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/mesos-dns/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/mesos-dns/tags","blobs_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/mesos-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/mesos-dns/languages","stargazers_url":"https://api.github.com/repos/mesosphere/mesos-dns/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/mesos-dns/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/mesos-dns/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/mesos-dns/subscription","commits_url":"https://api.github.com/repos/mesosphere/mesos-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/mesos-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/mesos-dns/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/mesos-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/mesos-dns/merges","archive_url":"https://api.github.com/repos/mesosphere/mesos-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/mesos-dns/downloads","issues_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/mesos-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/mesos-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/mesos-dns/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/mesos-dns/releases{/id}","created_at":"2014-11-11T23:06:33Z","updated_at":"2015-07-29T07:23:38Z","pushed_at":"2015-07-29T14:54:55Z","git_url":"git://github.com/mesosphere/mesos-dns.git","ssh_url":"git@github.com:mesosphere/mesos-dns.git","clone_url":"https://github.com/mesosphere/mesos-dns.git","svn_url":"https://github.com/mesosphere/mesos-dns","homepage":"https://mesosphere.github.com/mesos-dns","size":2343,"stargazers_count":219,"watchers_count":219,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":35,"mirror_url":null,"open_issues_count":46,"forks":35,"open_issues":46,"watchers":219,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"9360c0a0d4fd73a75e3f4f5bf66c7ea75fe5b099","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":26509179,"name":"mesos-dns","full_name":"mesosphere/mesos-dns","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/mesos-dns","description":" DNS-based service discovery for Mesos.","fork":false,"url":"https://api.github.com/repos/mesosphere/mesos-dns","forks_url":"https://api.github.com/repos/mesosphere/mesos-dns/forks","keys_url":"https://api.github.com/repos/mesosphere/mesos-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/mesos-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/mesos-dns/teams","hooks_url":"https://api.github.com/repos/mesosphere/mesos-dns/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/mesos-dns/events","assignees_url":"https://api.github.com/repos/mesosphere/mesos-dns/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/mesos-dns/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/mesos-dns/tags","blobs_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/mesos-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/mesos-dns/languages","stargazers_url":"https://api.github.com/repos/mesosphere/mesos-dns/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/mesos-dns/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/mesos-dns/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/mesos-dns/subscription","commits_url":"https://api.github.com/repos/mesosphere/mesos-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/mesos-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/mesos-dns/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/mesos-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/mesos-dns/merges","archive_url":"https://api.github.com/repos/mesosphere/mesos-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/mesos-dns/downloads","issues_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/mesos-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/mesos-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/mesos-dns/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/mesos-dns/releases{/id}","created_at":"2014-11-11T23:06:33Z","updated_at":"2015-07-29T07:23:38Z","pushed_at":"2015-07-29T14:54:55Z","git_url":"git://github.com/mesosphere/mesos-dns.git","ssh_url":"git@github.com:mesosphere/mesos-dns.git","clone_url":"https://github.com/mesosphere/mesos-dns.git","svn_url":"https://github.com/mesosphere/mesos-dns","homepage":"https://mesosphere.github.com/mesos-dns","size":2343,"stargazers_count":219,"watchers_count":219,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":35,"mirror_url":null,"open_issues_count":46,"forks":35,"open_issues":46,"watchers":219,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/196"},"html":{"href":"https://github.com/mesosphere/mesos-dns/pull/196"},"issue":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/issues/196"},"comments":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/statuses/659d1dc164f9359fc501157d0efb8335b4835676"}}}}