{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/136262468","pull_request_review_id":59773986,"id":136262468,"diff_hunk":"@@ -0,0 +1,205 @@\n+// +build windows\n+\n+/*\n+Copyright 2017 The Kubernetes Authors.\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 mount\n+\n+import (\n+\t\"fmt\"\n+\t\"os\"\n+\t\"path/filepath\"\n+\t\"strconv\"\n+\t\"strings\"\n+\n+\t\"k8s.io/utils/exec\"\n+\n+\t\"github.com/golang/glog\"\n+)\n+\n+type Mounter struct {\n+\tmounterPath string\n+}\n+\n+// New returns a mount.Interface for the current system.\n+// It provides options to override the default mounter behavior.\n+// mounterPath allows using an alternative to `/bin/mount` for mounting.\n+func New(mounterPath string) Interface {\n+\treturn &Mounter{\n+\t\tmounterPath: mounterPath,\n+\t}\n+}\n+\n+func (mounter *Mounter) Mount(source string, target string, fstype string, options []string) error {","path":"pkg/util/mount/mount_windows.go","position":46,"original_position":46,"commit_id":"a9eec64ea18794eb8b94c0e3c1e6c0440b2fcb71","original_commit_id":"f9efd706f329a9526dfcd781037b0cade78b06b4","user":{"login":"andyzhangx","id":4178417,"avatar_url":"https://avatars1.githubusercontent.com/u/4178417?v=4","gravatar_id":"","url":"https://api.github.com/users/andyzhangx","html_url":"https://github.com/andyzhangx","followers_url":"https://api.github.com/users/andyzhangx/followers","following_url":"https://api.github.com/users/andyzhangx/following{/other_user}","gists_url":"https://api.github.com/users/andyzhangx/gists{/gist_id}","starred_url":"https://api.github.com/users/andyzhangx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyzhangx/subscriptions","organizations_url":"https://api.github.com/users/andyzhangx/orgs","repos_url":"https://api.github.com/users/andyzhangx/repos","events_url":"https://api.github.com/users/andyzhangx/events{/privacy}","received_events_url":"https://api.github.com/users/andyzhangx/received_events","type":"User","site_admin":false},"body":"done","created_at":"2017-08-31T07:19:55Z","updated_at":"2017-08-31T07:19:55Z","html_url":"https://github.com/kubernetes/kubernetes/pull/51252#discussion_r136262468","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/51252","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/136262468"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/51252#discussion_r136262468"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/51252"}},"in_reply_to_id":135820587},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/51252","id":137387559,"html_url":"https://github.com/kubernetes/kubernetes/pull/51252","diff_url":"https://github.com/kubernetes/kubernetes/pull/51252.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/51252.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/51252","number":51252,"state":"open","locked":false,"title":"Azuredisk mount on windows node","user":{"login":"andyzhangx","id":4178417,"avatar_url":"https://avatars1.githubusercontent.com/u/4178417?v=4","gravatar_id":"","url":"https://api.github.com/users/andyzhangx","html_url":"https://github.com/andyzhangx","followers_url":"https://api.github.com/users/andyzhangx/followers","following_url":"https://api.github.com/users/andyzhangx/following{/other_user}","gists_url":"https://api.github.com/users/andyzhangx/gists{/gist_id}","starred_url":"https://api.github.com/users/andyzhangx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyzhangx/subscriptions","organizations_url":"https://api.github.com/users/andyzhangx/orgs","repos_url":"https://api.github.com/users/andyzhangx/repos","events_url":"https://api.github.com/users/andyzhangx/events{/privacy}","received_events_url":"https://api.github.com/users/andyzhangx/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\nThis PR will enable azure disk on windows node, customer could create a pod mounted with azure disk on windows node. \r\nThere are a few pending items still left:\r\n1) Current fstype would be forced as NTFS, will change if there is such requirement\r\n2) GetDeviceNameFromMount function is not implemented(empty) because in Linux, we could use \"cat /proc/mounts\" to read all mounting points in OS easily, but in Windows, there is no such place, I am still figuring out. The empty function would cause a few warning logging, but it will not affect the main logic now.\r\n\r\n**Special notes for your reviewer**:\r\nThis PR depends on https://github.com/kubernetes/kubernetes/pull/51240, which allow windows mount path in config validation\r\n\r\nThe example pod with mount path is like below:\r\n\r\n```\r\nkind: Pod\r\napiVersion: v1\r\nmetadata:\r\n  name: pod-uses-shared-hdd-5g\r\n  labels:\r\n    name: storage\r\nspec:\r\n  containers:\r\n  - image: microsoft/iis\r\n    name: az-c-01\r\n    volumeMounts:\r\n    - name: blobdisk01\r\n      mountPath: 'F:'\r\n  nodeSelector:\r\n    beta.kubernetes.io/os: windows\r\n  volumes:\r\n  - name: blobdisk01\r\n    persistentVolumeClaim:\r\n      claimName: pv-dd-shared-hdd-5\r\n```\r\n\r\n**Release note**:\r\n<!--  Steps to write your release note:\r\n1. Use the release-note-* labels to set the release note state (if you have access)\r\n2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`.\r\n-->\r\n```release-note\r\n","created_at":"2017-08-24T07:35:42Z","updated_at":"2017-08-31T07:19:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fd61c84f69ee5a972cb5bf80e2d7f387c894168","assignee":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars0.githubusercontent.com/u/1163175?v=4","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"assignees":[{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars0.githubusercontent.com/u/1163175?v=4","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars2.githubusercontent.com/u/5751682?v=4","gravatar_id":"","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},{"login":"davidopp","id":8264113,"avatar_url":"https://avatars2.githubusercontent.com/u/8264113?v=4","gravatar_id":"","url":"https://api.github.com/users/davidopp","html_url":"https://github.com/davidopp","followers_url":"https://api.github.com/users/davidopp/followers","following_url":"https://api.github.com/users/davidopp/following{/other_user}","gists_url":"https://api.github.com/users/davidopp/gists{/gist_id}","starred_url":"https://api.github.com/users/davidopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidopp/subscriptions","organizations_url":"https://api.github.com/users/davidopp/orgs","repos_url":"https://api.github.com/users/davidopp/repos","events_url":"https://api.github.com/users/davidopp/events{/privacy}","received_events_url":"https://api.github.com/users/davidopp/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/51252/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/51252/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/51252/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/a9eec64ea18794eb8b94c0e3c1e6c0440b2fcb71","head":{"label":"andyzhangx:azuredisk-windows","ref":"azuredisk-windows","sha":"a9eec64ea18794eb8b94c0e3c1e6c0440b2fcb71","user":{"login":"andyzhangx","id":4178417,"avatar_url":"https://avatars1.githubusercontent.com/u/4178417?v=4","gravatar_id":"","url":"https://api.github.com/users/andyzhangx","html_url":"https://github.com/andyzhangx","followers_url":"https://api.github.com/users/andyzhangx/followers","following_url":"https://api.github.com/users/andyzhangx/following{/other_user}","gists_url":"https://api.github.com/users/andyzhangx/gists{/gist_id}","starred_url":"https://api.github.com/users/andyzhangx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyzhangx/subscriptions","organizations_url":"https://api.github.com/users/andyzhangx/orgs","repos_url":"https://api.github.com/users/andyzhangx/repos","events_url":"https://api.github.com/users/andyzhangx/events{/privacy}","received_events_url":"https://api.github.com/users/andyzhangx/received_events","type":"User","site_admin":false},"repo":{"id":85799482,"name":"kubernetes","full_name":"andyzhangx/kubernetes","owner":{"login":"andyzhangx","id":4178417,"avatar_url":"https://avatars1.githubusercontent.com/u/4178417?v=4","gravatar_id":"","url":"https://api.github.com/users/andyzhangx","html_url":"https://github.com/andyzhangx","followers_url":"https://api.github.com/users/andyzhangx/followers","following_url":"https://api.github.com/users/andyzhangx/following{/other_user}","gists_url":"https://api.github.com/users/andyzhangx/gists{/gist_id}","starred_url":"https://api.github.com/users/andyzhangx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyzhangx/subscriptions","organizations_url":"https://api.github.com/users/andyzhangx/orgs","repos_url":"https://api.github.com/users/andyzhangx/repos","events_url":"https://api.github.com/users/andyzhangx/events{/privacy}","received_events_url":"https://api.github.com/users/andyzhangx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andyzhangx/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/andyzhangx/kubernetes","forks_url":"https://api.github.com/repos/andyzhangx/kubernetes/forks","keys_url":"https://api.github.com/repos/andyzhangx/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andyzhangx/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andyzhangx/kubernetes/teams","hooks_url":"https://api.github.com/repos/andyzhangx/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/andyzhangx/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/andyzhangx/kubernetes/events","assignees_url":"https://api.github.com/repos/andyzhangx/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/andyzhangx/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/andyzhangx/kubernetes/tags","blobs_url":"https://api.github.com/repos/andyzhangx/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andyzhangx/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andyzhangx/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/andyzhangx/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andyzhangx/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/andyzhangx/kubernetes/languages","stargazers_url":"https://api.github.com/repos/andyzhangx/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/andyzhangx/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/andyzhangx/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/andyzhangx/kubernetes/subscription","commits_url":"https://api.github.com/repos/andyzhangx/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/andyzhangx/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/andyzhangx/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/andyzhangx/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/andyzhangx/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/andyzhangx/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andyzhangx/kubernetes/merges","archive_url":"https://api.github.com/repos/andyzhangx/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andyzhangx/kubernetes/downloads","issues_url":"https://api.github.com/repos/andyzhangx/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/andyzhangx/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/andyzhangx/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/andyzhangx/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andyzhangx/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/andyzhangx/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/andyzhangx/kubernetes/deployments","created_at":"2017-03-22T07:45:13Z","updated_at":"2017-03-22T07:45:48Z","pushed_at":"2017-08-31T03:22:56Z","git_url":"git://github.com/andyzhangx/kubernetes.git","ssh_url":"git@github.com:andyzhangx/kubernetes.git","clone_url":"https://github.com/andyzhangx/kubernetes.git","svn_url":"https://github.com/andyzhangx/kubernetes","homepage":"http://kubernetes.io","size":464718,"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":"kubernetes:master","ref":"master","sha":"b2f3244032563936817f532a0605bbe056b5b5e1","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2017-08-31T06:32:36Z","pushed_at":"2017-08-31T07:09:45Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":684547,"stargazers_count":26437,"watchers_count":26437,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9428,"mirror_url":null,"open_issues_count":5388,"forks":9428,"open_issues":5388,"watchers":26437,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/51252"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/51252"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/51252"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/51252/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/51252/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/51252/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/a9eec64ea18794eb8b94c0e3c1e6c0440b2fcb71"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"andyzhangx"}}