{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/rancher-metadata/pulls/comments/143334773","pull_request_review_id":67837012,"id":143334773,"diff_hunk":"@@ -34,6 +37,11 @@ const (\n \tDEFAULT_KEY = \"default\"\n )\n \n+const (\n+\tresolvConfLocation = \"/etc/resolv.conf\"\n+\tipLocalhost        = `^nameserver\\s+((127\\.([0-9]{1,3}\\.){2}[0-9]{1,3})|(::1)$)`","path":"main.go","position":37,"original_position":37,"commit_id":"a7f1abbc6fbec8c2d04f3c243f74a9a5da0671b4","original_commit_id":"a7f1abbc6fbec8c2d04f3c243f74a9a5da0671b4","user":{"login":"yasker","id":3344618,"avatar_url":"https://avatars1.githubusercontent.com/u/3344618?v=4","gravatar_id":"","url":"https://api.github.com/users/yasker","html_url":"https://github.com/yasker","followers_url":"https://api.github.com/users/yasker/followers","following_url":"https://api.github.com/users/yasker/following{/other_user}","gists_url":"https://api.github.com/users/yasker/gists{/gist_id}","starred_url":"https://api.github.com/users/yasker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasker/subscriptions","organizations_url":"https://api.github.com/users/yasker/orgs","repos_url":"https://api.github.com/users/yasker/repos","events_url":"https://api.github.com/users/yasker/events{/privacy}","received_events_url":"https://api.github.com/users/yasker/received_events","type":"User","site_admin":false},"body":"You read it wrong.\r\n\r\nYou grouped it as ,`127.[XXX.]{repeat twice}XXX`\r\n\r\nWhat you should do it as `127[.XXX]{repeat three times}`, as in my regex.","created_at":"2017-10-07T16:28:17Z","updated_at":"2017-10-07T16:28:17Z","html_url":"https://github.com/rancher/rancher-metadata/pull/70#discussion_r143334773","pull_request_url":"https://api.github.com/repos/rancher/rancher-metadata/pulls/70","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher-metadata/pulls/comments/143334773"},"html":{"href":"https://github.com/rancher/rancher-metadata/pull/70#discussion_r143334773"},"pull_request":{"href":"https://api.github.com/repos/rancher/rancher-metadata/pulls/70"}},"in_reply_to_id":142238484},"pull_request":{"url":"https://api.github.com/repos/rancher/rancher-metadata/pulls/70","id":143581272,"html_url":"https://github.com/rancher/rancher-metadata/pull/70","diff_url":"https://github.com/rancher/rancher-metadata/pull/70.diff","patch_url":"https://github.com/rancher/rancher-metadata/pull/70.patch","issue_url":"https://api.github.com/repos/rancher/rancher-metadata/issues/70","number":70,"state":"open","locked":false,"title":"add dns nameserver check to prevent only localhost dns nameserver","user":{"login":"aiwantaozi","id":5936271,"avatar_url":"https://avatars0.githubusercontent.com/u/5936271?v=4","gravatar_id":"","url":"https://api.github.com/users/aiwantaozi","html_url":"https://github.com/aiwantaozi","followers_url":"https://api.github.com/users/aiwantaozi/followers","following_url":"https://api.github.com/users/aiwantaozi/following{/other_user}","gists_url":"https://api.github.com/users/aiwantaozi/gists{/gist_id}","starred_url":"https://api.github.com/users/aiwantaozi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aiwantaozi/subscriptions","organizations_url":"https://api.github.com/users/aiwantaozi/orgs","repos_url":"https://api.github.com/users/aiwantaozi/repos","events_url":"https://api.github.com/users/aiwantaozi/events{/privacy}","received_events_url":"https://api.github.com/users/aiwantaozi/received_events","type":"User","site_admin":false},"body":"Related Issue: https://github.com/rancher/rancher/issues/9562\r\nDescription: Add dns checker to prevent only localhost dns namserver in the resolv.conf in the metadata, because it use bridge network and config dns search when create, so docker will not automatically add 8.8.8.8 to the resolv.conf, more details in the issue.\r\n\r\n@yasker  could you help review this PR.","created_at":"2017-09-28T08:10:11Z","updated_at":"2017-10-07T16:28:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5045e63c04185356cff3cb8d01f2c504f713204","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rancher/rancher-metadata/pulls/70/commits","review_comments_url":"https://api.github.com/repos/rancher/rancher-metadata/pulls/70/comments","review_comment_url":"https://api.github.com/repos/rancher/rancher-metadata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/rancher-metadata/issues/70/comments","statuses_url":"https://api.github.com/repos/rancher/rancher-metadata/statuses/a7f1abbc6fbec8c2d04f3c243f74a9a5da0671b4","head":{"label":"aiwantaozi:work-master","ref":"work-master","sha":"a7f1abbc6fbec8c2d04f3c243f74a9a5da0671b4","user":{"login":"aiwantaozi","id":5936271,"avatar_url":"https://avatars0.githubusercontent.com/u/5936271?v=4","gravatar_id":"","url":"https://api.github.com/users/aiwantaozi","html_url":"https://github.com/aiwantaozi","followers_url":"https://api.github.com/users/aiwantaozi/followers","following_url":"https://api.github.com/users/aiwantaozi/following{/other_user}","gists_url":"https://api.github.com/users/aiwantaozi/gists{/gist_id}","starred_url":"https://api.github.com/users/aiwantaozi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aiwantaozi/subscriptions","organizations_url":"https://api.github.com/users/aiwantaozi/orgs","repos_url":"https://api.github.com/users/aiwantaozi/repos","events_url":"https://api.github.com/users/aiwantaozi/events{/privacy}","received_events_url":"https://api.github.com/users/aiwantaozi/received_events","type":"User","site_admin":false},"repo":{"id":105115242,"name":"rancher-metadata","full_name":"aiwantaozi/rancher-metadata","owner":{"login":"aiwantaozi","id":5936271,"avatar_url":"https://avatars0.githubusercontent.com/u/5936271?v=4","gravatar_id":"","url":"https://api.github.com/users/aiwantaozi","html_url":"https://github.com/aiwantaozi","followers_url":"https://api.github.com/users/aiwantaozi/followers","following_url":"https://api.github.com/users/aiwantaozi/following{/other_user}","gists_url":"https://api.github.com/users/aiwantaozi/gists{/gist_id}","starred_url":"https://api.github.com/users/aiwantaozi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aiwantaozi/subscriptions","organizations_url":"https://api.github.com/users/aiwantaozi/orgs","repos_url":"https://api.github.com/users/aiwantaozi/repos","events_url":"https://api.github.com/users/aiwantaozi/events{/privacy}","received_events_url":"https://api.github.com/users/aiwantaozi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aiwantaozi/rancher-metadata","description":"A simple HTTP server that returns EC2-style metadata information that varies depending on the source IP address making the request.","fork":true,"url":"https://api.github.com/repos/aiwantaozi/rancher-metadata","forks_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/forks","keys_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/teams","hooks_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/hooks","issue_events_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/issues/events{/number}","events_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/events","assignees_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/assignees{/user}","branches_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/branches{/branch}","tags_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/tags","blobs_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/languages","stargazers_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/stargazers","contributors_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/contributors","subscribers_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/subscribers","subscription_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/subscription","commits_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/contents/{+path}","compare_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/merges","archive_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/downloads","issues_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/issues{/number}","pulls_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/labels{/name}","releases_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/releases{/id}","deployments_url":"https://api.github.com/repos/aiwantaozi/rancher-metadata/deployments","created_at":"2017-09-28T07:18:59Z","updated_at":"2017-09-28T07:19:00Z","pushed_at":"2017-09-29T09:46:16Z","git_url":"git://github.com/aiwantaozi/rancher-metadata.git","ssh_url":"git@github.com:aiwantaozi/rancher-metadata.git","clone_url":"https://github.com/aiwantaozi/rancher-metadata.git","svn_url":"https://github.com/aiwantaozi/rancher-metadata","homepage":"","size":1197,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rancher:master","ref":"master","sha":"ac5caa4fb5050c01c07568bcad3191e169b19af0","user":{"login":"rancher","id":9343010,"avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":39291004,"name":"rancher-metadata","full_name":"rancher/rancher-metadata","owner":{"login":"rancher","id":9343010,"avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/rancher-metadata","description":"A simple HTTP server that returns EC2-style metadata information that varies depending on the source IP address making the request.","fork":false,"url":"https://api.github.com/repos/rancher/rancher-metadata","forks_url":"https://api.github.com/repos/rancher/rancher-metadata/forks","keys_url":"https://api.github.com/repos/rancher/rancher-metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/rancher-metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/rancher-metadata/teams","hooks_url":"https://api.github.com/repos/rancher/rancher-metadata/hooks","issue_events_url":"https://api.github.com/repos/rancher/rancher-metadata/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/rancher-metadata/events","assignees_url":"https://api.github.com/repos/rancher/rancher-metadata/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/rancher-metadata/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/rancher-metadata/tags","blobs_url":"https://api.github.com/repos/rancher/rancher-metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/rancher-metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/rancher-metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/rancher-metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/rancher-metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/rancher-metadata/languages","stargazers_url":"https://api.github.com/repos/rancher/rancher-metadata/stargazers","contributors_url":"https://api.github.com/repos/rancher/rancher-metadata/contributors","subscribers_url":"https://api.github.com/repos/rancher/rancher-metadata/subscribers","subscription_url":"https://api.github.com/repos/rancher/rancher-metadata/subscription","commits_url":"https://api.github.com/repos/rancher/rancher-metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/rancher-metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/rancher-metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/rancher-metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/rancher-metadata/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/rancher-metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/rancher-metadata/merges","archive_url":"https://api.github.com/repos/rancher/rancher-metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/rancher-metadata/downloads","issues_url":"https://api.github.com/repos/rancher/rancher-metadata/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/rancher-metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/rancher-metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/rancher-metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/rancher-metadata/labels{/name}","releases_url":"https://api.github.com/repos/rancher/rancher-metadata/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/rancher-metadata/deployments","created_at":"2015-07-18T07:50:20Z","updated_at":"2017-04-18T13:37:56Z","pushed_at":"2017-09-29T09:46:17Z","git_url":"git://github.com/rancher/rancher-metadata.git","ssh_url":"git@github.com:rancher/rancher-metadata.git","clone_url":"https://github.com/rancher/rancher-metadata.git","svn_url":"https://github.com/rancher/rancher-metadata","homepage":"","size":1193,"stargazers_count":18,"watchers_count":18,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":9,"forks":25,"open_issues":9,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher-metadata/pulls/70"},"html":{"href":"https://github.com/rancher/rancher-metadata/pull/70"},"issue":{"href":"https://api.github.com/repos/rancher/rancher-metadata/issues/70"},"comments":{"href":"https://api.github.com/repos/rancher/rancher-metadata/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/rancher-metadata/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/rancher-metadata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/rancher-metadata/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/rancher-metadata/statuses/a7f1abbc6fbec8c2d04f3c243f74a9a5da0671b4"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"yasker"}}