{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/25970475","id":25970475,"diff_hunk":"@@ -0,0 +1,189 @@\n+/*\n+Copyright 2015 Google Inc. 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 iscsi_pd\n+\n+import (\n+\t\"fmt\"\n+\t\"strconv\"\n+\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/api\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/pd\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/types\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util/exec\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util/mount\"\n+\t\"github.com/golang/glog\"\n+)\n+\n+// This is the primary entrypoint for volume plugins.\n+func ProbeVolumePlugins() []volume.Plugin {\n+\treturn []volume.Plugin{&ISCSIDiskPlugin{nil, false, \"\", \"\", \"\"},\n+\t\t&ISCSIDiskPlugin{nil, true, \"\", \"\", \"\"}}\n+}\n+\n+type ISCSIDiskPlugin struct {\n+\thost       volume.Host\n+\tlegacyMode bool // if set, plugin answers to the legacy name\n+\tportal     string\n+\tiqn        string\n+\tlun        string\n+}\n+\n+var _ volume.Plugin = &ISCSIDiskPlugin{}\n+\n+const (\n+\tISCSIDiskPluginName       = \"kubernetes.io/iscsi-pd\"\n+\tISCSIDiskPluginLegacyName = \"iscsi-pd\"\n+)\n+\n+func (plugin *ISCSIDiskPlugin) Init(host volume.Host) {\n+\tplugin.host = host\n+}\n+\n+func (plugin *ISCSIDiskPlugin) Name() string {\n+\tif plugin.legacyMode {","path":"pkg/kubelet/volume/iscsi_pd/iscsi_pd.go","position":58,"original_position":58,"commit_id":"17646fa7aa2c77b1c17a8d95db0aa0baba147338","original_commit_id":"17646fa7aa2c77b1c17a8d95db0aa0baba147338","user":{"login":"pmorie","id":366488,"avatar_url":"https://avatars.githubusercontent.com/u/366488?v=3","gravatar_id":"","url":"https://api.github.com/users/pmorie","html_url":"https://github.com/pmorie","followers_url":"https://api.github.com/users/pmorie/followers","following_url":"https://api.github.com/users/pmorie/following{/other_user}","gists_url":"https://api.github.com/users/pmorie/gists{/gist_id}","starred_url":"https://api.github.com/users/pmorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmorie/subscriptions","organizations_url":"https://api.github.com/users/pmorie/orgs","repos_url":"https://api.github.com/users/pmorie/repos","events_url":"https://api.github.com/users/pmorie/events{/privacy}","received_events_url":"https://api.github.com/users/pmorie/received_events","type":"User","site_admin":false},"body":"IMO: new plugins do not need legacy mode, since you cannot create new volumes with a legacy mode plugin.","created_at":"2015-03-06T19:28:56Z","updated_at":"2015-03-06T19:28:56Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4612#discussion_r25970475","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4612","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/25970475"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4612#discussion_r25970475"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4612"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4612","id":29642438,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4612","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4612.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4612.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/4612","number":4612,"state":"open","locked":false,"title":"implement iscsi persistent disk volume plugin","user":{"login":"rootfs","id":7062400,"avatar_url":"https://avatars.githubusercontent.com/u/7062400?v=3","gravatar_id":"","url":"https://api.github.com/users/rootfs","html_url":"https://github.com/rootfs","followers_url":"https://api.github.com/users/rootfs/followers","following_url":"https://api.github.com/users/rootfs/following{/other_user}","gists_url":"https://api.github.com/users/rootfs/gists{/gist_id}","starred_url":"https://api.github.com/users/rootfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rootfs/subscriptions","organizations_url":"https://api.github.com/users/rootfs/orgs","repos_url":"https://api.github.com/users/rootfs/repos","events_url":"https://api.github.com/users/rootfs/events{/privacy}","received_events_url":"https://api.github.com/users/rootfs/received_events","type":"User","site_admin":false},"body":"This pull request implemented an iSCSI disk volume plugin. The idea is to allow on-premise kube setup to persist data in a block volume through iSCSI channel and help DevOps run test in house even without access to GCE.\r\n\r\nThe code is heavily inspired by GCE Persistent Disk.\r\n\r\nA sample pod is provided. This pod runs on a Fedora 21 based node and persists to iSCSI backed volume.\r\n\r\nBackground information, use cases,  high level design, and how-to can be found [here](http://rootfs.github.io/iSCSI-Kubernetes/)\r\n\r\n@thockin @markturansky @smarterclayton @eparis ","created_at":"2015-02-19T19:45:59Z","updated_at":"2015-03-06T19:28:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ccb855912ca02930e2b17f82b45c5c40c8fa966","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4612/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4612/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/4612/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/17646fa7aa2c77b1c17a8d95db0aa0baba147338","head":{"label":"rootfs:iscsi-pd-merge","ref":"iscsi-pd-merge","sha":"17646fa7aa2c77b1c17a8d95db0aa0baba147338","user":{"login":"rootfs","id":7062400,"avatar_url":"https://avatars.githubusercontent.com/u/7062400?v=3","gravatar_id":"","url":"https://api.github.com/users/rootfs","html_url":"https://github.com/rootfs","followers_url":"https://api.github.com/users/rootfs/followers","following_url":"https://api.github.com/users/rootfs/following{/other_user}","gists_url":"https://api.github.com/users/rootfs/gists{/gist_id}","starred_url":"https://api.github.com/users/rootfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rootfs/subscriptions","organizations_url":"https://api.github.com/users/rootfs/orgs","repos_url":"https://api.github.com/users/rootfs/repos","events_url":"https://api.github.com/users/rootfs/events{/privacy}","received_events_url":"https://api.github.com/users/rootfs/received_events","type":"User","site_admin":false},"repo":{"id":29694119,"name":"kubernetes","full_name":"rootfs/kubernetes","owner":{"login":"rootfs","id":7062400,"avatar_url":"https://avatars.githubusercontent.com/u/7062400?v=3","gravatar_id":"","url":"https://api.github.com/users/rootfs","html_url":"https://github.com/rootfs","followers_url":"https://api.github.com/users/rootfs/followers","following_url":"https://api.github.com/users/rootfs/following{/other_user}","gists_url":"https://api.github.com/users/rootfs/gists{/gist_id}","starred_url":"https://api.github.com/users/rootfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rootfs/subscriptions","organizations_url":"https://api.github.com/users/rootfs/orgs","repos_url":"https://api.github.com/users/rootfs/repos","events_url":"https://api.github.com/users/rootfs/events{/privacy}","received_events_url":"https://api.github.com/users/rootfs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rootfs/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/rootfs/kubernetes","forks_url":"https://api.github.com/repos/rootfs/kubernetes/forks","keys_url":"https://api.github.com/repos/rootfs/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rootfs/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rootfs/kubernetes/teams","hooks_url":"https://api.github.com/repos/rootfs/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/rootfs/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/rootfs/kubernetes/events","assignees_url":"https://api.github.com/repos/rootfs/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/rootfs/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/rootfs/kubernetes/tags","blobs_url":"https://api.github.com/repos/rootfs/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rootfs/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rootfs/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/rootfs/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rootfs/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/rootfs/kubernetes/languages","stargazers_url":"https://api.github.com/repos/rootfs/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/rootfs/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/rootfs/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/rootfs/kubernetes/subscription","commits_url":"https://api.github.com/repos/rootfs/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/rootfs/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/rootfs/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/rootfs/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/rootfs/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/rootfs/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rootfs/kubernetes/merges","archive_url":"https://api.github.com/repos/rootfs/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rootfs/kubernetes/downloads","issues_url":"https://api.github.com/repos/rootfs/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/rootfs/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/rootfs/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/rootfs/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rootfs/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/rootfs/kubernetes/releases{/id}","created_at":"2015-01-22T18:48:37Z","updated_at":"2015-02-18T16:20:17Z","pushed_at":"2015-03-06T16:15:46Z","git_url":"git://github.com/rootfs/kubernetes.git","ssh_url":"git@github.com:rootfs/kubernetes.git","clone_url":"https://github.com/rootfs/kubernetes.git","svn_url":"https://github.com/rootfs/kubernetes","homepage":"http://kubernetes.io","size":33214,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"2700871b049d5498167671cea6de8317099ad406","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","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-03-06T19:09:38Z","pushed_at":"2015-03-06T19:09:38Z","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":93558,"stargazers_count":6465,"watchers_count":6465,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1152,"mirror_url":null,"open_issues_count":773,"forks":1152,"open_issues":773,"watchers":6465,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4612"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/4612"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/4612"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/4612/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4612/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/4612/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/17646fa7aa2c77b1c17a8d95db0aa0baba147338"}}}}