{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/31141596","id":31141596,"diff_hunk":"@@ -0,0 +1,171 @@\n+/*\n+Copyright 2015 The Kubernetes Authors All rights reserved.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package dockertools\n+\n+import (\n+\t\"fmt\"\n+\t\"io\"\n+\t\"os\"\n+\t\"os/exec\"\n+\t\"sync\"\n+\t\"time\"\n+\n+\tkubecontainer \"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/container\"\n+\t\"github.com/fsouza/go-dockerclient\"\n+\t\"github.com/golang/glog\"\n+)\n+\n+// DockerExecHandler knows how to execute a command in a running Docker container.\n+type DockerExecHandler func(client DockerInterface, container *docker.Container, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool) error\n+\n+var handlers map[string]DockerExecHandler = make(map[string]DockerExecHandler)\n+var lock sync.Mutex\n+\n+// RegisterExecHandler registers a DockerExecHandler.\n+func RegisterExecHandler(name string, h DockerExecHandler) {\n+\tlock.Lock()","path":"pkg/kubelet/dockertools/exec.go","position":40,"original_position":40,"commit_id":"8b3618b4fb44ac55cdafe2aeba0f9831edff96de","original_commit_id":"8b3618b4fb44ac55cdafe2aeba0f9831edff96de","user":{"login":"vishh","id":7063592,"avatar_url":"https://avatars.githubusercontent.com/u/7063592?v=3","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false},"body":"ok to test\n","created_at":"2015-05-27T14:52:36Z","updated_at":"2015-05-27T14:52:36Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8864#discussion_r31141596","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8864","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/31141596"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8864#discussion_r31141596"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8864"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8864","id":36308894,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8864","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8864.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8864.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8864","number":8864,"state":"open","locked":false,"title":"Add support for pluggable Docker exec handlers","user":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"body":"Add support for pluggable Docker exec handlers. The default handler is\r\nnow Docker's native exec API call. The previous default, nsenter, can be\r\nselected by passing --docker-exec-handler=nsenter when starting the\r\nkubelet.\r\n\r\nFixes #6342","created_at":"2015-05-27T14:24:07Z","updated_at":"2015-05-27T14:52:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5dd1c0c5f937999b41f6fa8e048ce703d663dee7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8864/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8864/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8864/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/8b3618b4fb44ac55cdafe2aeba0f9831edff96de","head":{"label":"ncdc:pluggable-docker-exec","ref":"pluggable-docker-exec","sha":"8b3618b4fb44ac55cdafe2aeba0f9831edff96de","user":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"repo":{"id":22116483,"name":"kubernetes","full_name":"ncdc/kubernetes","owner":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ncdc/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/ncdc/kubernetes","forks_url":"https://api.github.com/repos/ncdc/kubernetes/forks","keys_url":"https://api.github.com/repos/ncdc/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ncdc/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ncdc/kubernetes/teams","hooks_url":"https://api.github.com/repos/ncdc/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ncdc/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ncdc/kubernetes/events","assignees_url":"https://api.github.com/repos/ncdc/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ncdc/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ncdc/kubernetes/tags","blobs_url":"https://api.github.com/repos/ncdc/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ncdc/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ncdc/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ncdc/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ncdc/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ncdc/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ncdc/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ncdc/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ncdc/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ncdc/kubernetes/subscription","commits_url":"https://api.github.com/repos/ncdc/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ncdc/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ncdc/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ncdc/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ncdc/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ncdc/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ncdc/kubernetes/merges","archive_url":"https://api.github.com/repos/ncdc/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ncdc/kubernetes/downloads","issues_url":"https://api.github.com/repos/ncdc/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ncdc/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ncdc/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ncdc/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ncdc/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ncdc/kubernetes/releases{/id}","created_at":"2014-07-22T18:49:30Z","updated_at":"2015-04-13T16:38:08Z","pushed_at":"2015-05-27T14:21:04Z","git_url":"git://github.com/ncdc/kubernetes.git","ssh_url":"git@github.com:ncdc/kubernetes.git","clone_url":"https://github.com/ncdc/kubernetes.git","svn_url":"https://github.com/ncdc/kubernetes","homepage":null,"size":45541,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":"GoogleCloudPlatform:master","ref":"master","sha":"0ede6dc4215163eb2d8878f962d18d0864bc0825","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-05-27T13:36:10Z","pushed_at":"2015-05-27T14:48:06Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":292856,"stargazers_count":7937,"watchers_count":7937,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1654,"mirror_url":null,"open_issues_count":1257,"forks":1654,"open_issues":1257,"watchers":7937,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8864"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/8864"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8864"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/8864/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8864/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/8864/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/8b3618b4fb44ac55cdafe2aeba0f9831edff96de"}}}}