GitHub PullRequestReviewCommentEvent at 2014-06-25 23:50:10
Repository: beaker
Actor: colinPL
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/beaker/pulls/comments/14219215","id":14219215,"diff_hunk":"@@ -35,7 +35,11 @@ def provision\n         container.start({\"PublishAllPorts\" => true, \"Privileged\" => true})\n \n         # Find out where the ssh port is from the container\n-        ip   = container.json[\"NetworkSettings\"][\"Ports\"][\"22/tcp\"][0][\"HostIp\"]\n+        if ENV['DOCKER_HOST']\n+          ip = URI.parse(ENV['DOCKER_HOST']).host\n+          @logger.info(\"Using docker server at #{ip}\")\n+        end\n+        ip ||= container.json[\"NetworkSettings\"][\"IPAddress\"]\n         port = container.json[\"NetworkSettings\"][\"Ports\"][\"22/tcp\"][0][\"HostPort\"]","path":"lib/beaker/hypervisor/docker.rb","position":10,"original_position":10,"commit_id":"4fe80670f53919c10abf9642bf2156d3d8d1347c","original_commit_id":"4fe80670f53919c10abf9642bf2156d3d8d1347c","user":{"login":"colinPL","id":6528153,"avatar_url":"https://avatars.githubusercontent.com/u/6528153?","gravatar_id":"63736ae5e6be2486a2616000ddf5abaf","url":"https://api.github.com/users/colinPL","html_url":"https://github.com/colinPL","followers_url":"https://api.github.com/users/colinPL/followers","following_url":"https://api.github.com/users/colinPL/following{/other_user}","gists_url":"https://api.github.com/users/colinPL/gists{/gist_id}","starred_url":"https://api.github.com/users/colinPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinPL/subscriptions","organizations_url":"https://api.github.com/users/colinPL/orgs","repos_url":"https://api.github.com/users/colinPL/repos","events_url":"https://api.github.com/users/colinPL/events{/privacy}","received_events_url":"https://api.github.com/users/colinPL/received_events","type":"User","site_admin":false},"body":"This is setting `port` to the host's port exposing the container's port 22. (container:22 -> host:X). However, the line above sets `ip` to the container's IP address. Together, this gives `container:X`, which is not a valid combo.\r\n\r\n","created_at":"2014-06-25T23:50:10Z","updated_at":"2014-06-25T23:50:10Z","html_url":"https://github.com/puppetlabs/beaker/pull/316#discussion_r14219215","pull_request_url":"https://api.github.com/repos/puppetlabs/beaker/pulls/316","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/comments/14219215"},"html":{"href":"https://github.com/puppetlabs/beaker/pull/316#discussion_r14219215"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/316"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/beaker/pulls/316","id":17448692,"html_url":"https://github.com/puppetlabs/beaker/pull/316","diff_url":"https://github.com/puppetlabs/beaker/pull/316.diff","patch_url":"https://github.com/puppetlabs/beaker/pull/316.patch","issue_url":"https://api.github.com/repos/puppetlabs/beaker/issues/316","number":316,"state":"open","title":"Use the correct docker server ip address for ssh","user":{"login":"carlossg","id":23651,"avatar_url":"https://avatars.githubusercontent.com/u/23651?","gravatar_id":"f4fd99ba365026782163a37fc5475207","url":"https://api.github.com/users/carlossg","html_url":"https://github.com/carlossg","followers_url":"https://api.github.com/users/carlossg/followers","following_url":"https://api.github.com/users/carlossg/following{/other_user}","gists_url":"https://api.github.com/users/carlossg/gists{/gist_id}","starred_url":"https://api.github.com/users/carlossg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlossg/subscriptions","organizations_url":"https://api.github.com/users/carlossg/orgs","repos_url":"https://api.github.com/users/carlossg/repos","events_url":"https://api.github.com/users/carlossg/events{/privacy}","received_events_url":"https://api.github.com/users/carlossg/received_events","type":"User","site_admin":false},"body":"Honor DOCKER_HOST envvar, used with boot2docker\r\nUse the IpAddress field from docker info otherwise, `[Ports][22/tcp][0][HostPort]` is the\r\nbind address and can be 0.0.0.0\r\n\r\nThe current implementation is trying to ssh connect to 0.0.0.0 for me (using boot2docker on OS X)\r\n\r\nMy NetworkSettings from docker info\r\n\r\n```\r\n  \"NetworkSettings\": {\r\n    \"IPAddress\": \"172.17.0.47\",\r\n    \"IPPrefixLen\": 16,\r\n    \"Gateway\": \"172.17.42.1\",\r\n    \"Bridge\": \"docker0\",\r\n    \"PortMapping\": null,\r\n    \"Ports\": {\r\n      \"22/tcp\": [\r\n        {\r\n          \"HostIp\": \"0.0.0.0\",\r\n          \"HostPort\": \"49155\"\r\n        }\r\n      ]\r\n    }\r\n  },\r\n```\r\n\r\nI have tested it with https://github.com/maestrodev/puppet-maven\r\n\r\n    BEAKER_set=centos-65-x64-docker rspec spec/acceptance\r\n","created_at":"2014-06-22T14:19:45Z","updated_at":"2014-06-25T23:50:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"611e031aa73eb5306709ad5dc3aef3cd2e199830","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/beaker/pulls/316/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/beaker/pulls/316/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/beaker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/puppetlabs/beaker/issues/316/comments","statuses_url":"https://api.github.com/repos/puppetlabs/beaker/statuses/4fe80670f53919c10abf9642bf2156d3d8d1347c","head":{"label":"maestrodev:docker-ip","ref":"docker-ip","sha":"4fe80670f53919c10abf9642bf2156d3d8d1347c","user":{"login":"maestrodev","id":629978,"avatar_url":"https://avatars.githubusercontent.com/u/629978?","gravatar_id":"e2cdfabe7ffbcf89c5b0ac8623cfd40e","url":"https://api.github.com/users/maestrodev","html_url":"https://github.com/maestrodev","followers_url":"https://api.github.com/users/maestrodev/followers","following_url":"https://api.github.com/users/maestrodev/following{/other_user}","gists_url":"https://api.github.com/users/maestrodev/gists{/gist_id}","starred_url":"https://api.github.com/users/maestrodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maestrodev/subscriptions","organizations_url":"https://api.github.com/users/maestrodev/orgs","repos_url":"https://api.github.com/users/maestrodev/repos","events_url":"https://api.github.com/users/maestrodev/events{/privacy}","received_events_url":"https://api.github.com/users/maestrodev/received_events","type":"Organization","site_admin":false},"repo":{"id":18299902,"name":"beaker","full_name":"maestrodev/beaker","owner":{"login":"maestrodev","id":629978,"avatar_url":"https://avatars.githubusercontent.com/u/629978?","gravatar_id":"e2cdfabe7ffbcf89c5b0ac8623cfd40e","url":"https://api.github.com/users/maestrodev","html_url":"https://github.com/maestrodev","followers_url":"https://api.github.com/users/maestrodev/followers","following_url":"https://api.github.com/users/maestrodev/following{/other_user}","gists_url":"https://api.github.com/users/maestrodev/gists{/gist_id}","starred_url":"https://api.github.com/users/maestrodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maestrodev/subscriptions","organizations_url":"https://api.github.com/users/maestrodev/orgs","repos_url":"https://api.github.com/users/maestrodev/repos","events_url":"https://api.github.com/users/maestrodev/events{/privacy}","received_events_url":"https://api.github.com/users/maestrodev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/maestrodev/beaker","description":"Puppet acceptance testing harness","fork":true,"url":"https://api.github.com/repos/maestrodev/beaker","forks_url":"https://api.github.com/repos/maestrodev/beaker/forks","keys_url":"https://api.github.com/repos/maestrodev/beaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maestrodev/beaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maestrodev/beaker/teams","hooks_url":"https://api.github.com/repos/maestrodev/beaker/hooks","issue_events_url":"https://api.github.com/repos/maestrodev/beaker/issues/events{/number}","events_url":"https://api.github.com/repos/maestrodev/beaker/events","assignees_url":"https://api.github.com/repos/maestrodev/beaker/assignees{/user}","branches_url":"https://api.github.com/repos/maestrodev/beaker/branches{/branch}","tags_url":"https://api.github.com/repos/maestrodev/beaker/tags","blobs_url":"https://api.github.com/repos/maestrodev/beaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maestrodev/beaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maestrodev/beaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/maestrodev/beaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maestrodev/beaker/statuses/{sha}","languages_url":"https://api.github.com/repos/maestrodev/beaker/languages","stargazers_url":"https://api.github.com/repos/maestrodev/beaker/stargazers","contributors_url":"https://api.github.com/repos/maestrodev/beaker/contributors","subscribers_url":"https://api.github.com/repos/maestrodev/beaker/subscribers","subscription_url":"https://api.github.com/repos/maestrodev/beaker/subscription","commits_url":"https://api.github.com/repos/maestrodev/beaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/maestrodev/beaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/maestrodev/beaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/maestrodev/beaker/issues/comments/{number}","contents_url":"https://api.github.com/repos/maestrodev/beaker/contents/{+path}","compare_url":"https://api.github.com/repos/maestrodev/beaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maestrodev/beaker/merges","archive_url":"https://api.github.com/repos/maestrodev/beaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maestrodev/beaker/downloads","issues_url":"https://api.github.com/repos/maestrodev/beaker/issues{/number}","pulls_url":"https://api.github.com/repos/maestrodev/beaker/pulls{/number}","milestones_url":"https://api.github.com/repos/maestrodev/beaker/milestones{/number}","notifications_url":"https://api.github.com/repos/maestrodev/beaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maestrodev/beaker/labels{/name}","releases_url":"https://api.github.com/repos/maestrodev/beaker/releases{/id}","created_at":"2014-03-31T16:28:29Z","updated_at":"2014-06-22T14:19:45Z","pushed_at":"2014-06-25T17:53:27Z","git_url":"git://github.com/maestrodev/beaker.git","ssh_url":"git@github.com:maestrodev/beaker.git","clone_url":"https://github.com/maestrodev/beaker.git","svn_url":"https://github.com/maestrodev/beaker","homepage":null,"size":7216,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"5e80c638513e3b1163ffc1320cc03b8ee876a3de","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?","gravatar_id":"eb454c2139c156db7c8266a875519a1f","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":12164675,"name":"beaker","full_name":"puppetlabs/beaker","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?","gravatar_id":"eb454c2139c156db7c8266a875519a1f","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/beaker","description":"Puppet acceptance testing harness","fork":false,"url":"https://api.github.com/repos/puppetlabs/beaker","forks_url":"https://api.github.com/repos/puppetlabs/beaker/forks","keys_url":"https://api.github.com/repos/puppetlabs/beaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/beaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/beaker/teams","hooks_url":"https://api.github.com/repos/puppetlabs/beaker/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/beaker/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/beaker/events","assignees_url":"https://api.github.com/repos/puppetlabs/beaker/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/beaker/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/beaker/tags","blobs_url":"https://api.github.com/repos/puppetlabs/beaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/beaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/beaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/beaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/beaker/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/beaker/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/beaker/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/beaker/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/beaker/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/beaker/subscription","commits_url":"https://api.github.com/repos/puppetlabs/beaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/beaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/beaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/beaker/issues/comments/{number}","contents_url":"https://api.github.com/repos/puppetlabs/beaker/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/beaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/beaker/merges","archive_url":"https://api.github.com/repos/puppetlabs/beaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/beaker/downloads","issues_url":"https://api.github.com/repos/puppetlabs/beaker/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/beaker/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/beaker/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/beaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/beaker/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/beaker/releases{/id}","created_at":"2013-08-16T17:57:03Z","updated_at":"2014-06-25T13:44:55Z","pushed_at":"2014-06-24T16:44:12Z","git_url":"git://github.com/puppetlabs/beaker.git","ssh_url":"git@github.com:puppetlabs/beaker.git","clone_url":"https://github.com/puppetlabs/beaker.git","svn_url":"https://github.com/puppetlabs/beaker","homepage":null,"size":13837,"stargazers_count":72,"watchers_count":72,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":50,"mirror_url":null,"open_issues_count":28,"forks":50,"open_issues":28,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/316"},"html":{"href":"https://github.com/puppetlabs/beaker/pull/316"},"issue":{"href":"https://api.github.com/repos/puppetlabs/beaker/issues/316"},"comments":{"href":"https://api.github.com/repos/puppetlabs/beaker/issues/316/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/316/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/316/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/beaker/statuses/4fe80670f53919c10abf9642bf2156d3d8d1347c"}}}}