{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/176616030","pull_request_review_id":106352662,"id":176616030,"diff_hunk":"@@ -175,7 +179,35 @@ func (f *FakeMounter) PathIsDevice(pathname string) (bool, error) {\n }\n \n func (f *FakeMounter) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {\n-\treturn getDeviceNameFromMount(f, mountPath, pluginDir)\n+\tif runtime.GOOS == \"darwin\" {\n+\t\treturn GetDeviceNameFromMountDarwin(f, mountPath, pluginDir)\n+\t} else {\n+\t\treturn getDeviceNameFromMount(f, mountPath, pluginDir)\n+\t}\n+}\n+\n+// getDeviceNameFromMount find the device name from /proc/mounts in which\n+// the mount path reference should match the given plugin directory. In case no mount path reference\n+// matches, returns the volume name taken from its given mountPath\n+func GetDeviceNameFromMountDarwin(mounter Interface, mountPath, pluginDir string) (string, error) {","path":"pkg/util/mount/fake.go","position":28,"original_position":28,"commit_id":"f2d56f3547f5572e46749c84f516814b31f7dc76","original_commit_id":"f2d56f3547f5572e46749c84f516814b31f7dc76","user":{"login":"ianchakeres","id":4367440,"avatar_url":"https://avatars0.githubusercontent.com/u/4367440?v=4","gravatar_id":"","url":"https://api.github.com/users/ianchakeres","html_url":"https://github.com/ianchakeres","followers_url":"https://api.github.com/users/ianchakeres/followers","following_url":"https://api.github.com/users/ianchakeres/following{/other_user}","gists_url":"https://api.github.com/users/ianchakeres/gists{/gist_id}","starred_url":"https://api.github.com/users/ianchakeres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianchakeres/subscriptions","organizations_url":"https://api.github.com/users/ianchakeres/orgs","repos_url":"https://api.github.com/users/ianchakeres/repos","events_url":"https://api.github.com/users/ianchakeres/events{/privacy}","received_events_url":"https://api.github.com/users/ianchakeres/received_events","type":"User","site_admin":false},"body":"@liggitt - I want to make sure I understand your recommendation. I should create `fake_darwin.go`, and maybe other `fake_<os>.go` files (e.g. linux and unsupported) if needed.","created_at":"2018-03-23T01:06:04Z","updated_at":"2018-03-23T01:06:05Z","html_url":"https://github.com/kubernetes/kubernetes/pull/61570#discussion_r176616030","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/61570","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/176616030"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/61570#discussion_r176616030"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/61570"}},"in_reply_to_id":176613828},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/61570","id":176942541,"html_url":"https://github.com/kubernetes/kubernetes/pull/61570","diff_url":"https://github.com/kubernetes/kubernetes/pull/61570.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/61570.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/61570","number":61570,"state":"open","locked":false,"title":"Fixed volume/rbd unit test on osx.","user":{"login":"ianchakeres","id":4367440,"avatar_url":"https://avatars0.githubusercontent.com/u/4367440?v=4","gravatar_id":"","url":"https://api.github.com/users/ianchakeres","html_url":"https://github.com/ianchakeres","followers_url":"https://api.github.com/users/ianchakeres/followers","following_url":"https://api.github.com/users/ianchakeres/following{/other_user}","gists_url":"https://api.github.com/users/ianchakeres/gists{/gist_id}","starred_url":"https://api.github.com/users/ianchakeres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianchakeres/subscriptions","organizations_url":"https://api.github.com/users/ianchakeres/orgs","repos_url":"https://api.github.com/users/ianchakeres/repos","events_url":"https://api.github.com/users/ianchakeres/events{/privacy}","received_events_url":"https://api.github.com/users/ianchakeres/received_events","type":"User","site_admin":false},"body":"`volume/rbd` unit tests fail on osx.\r\n\r\n```\r\n$ pwd\r\n<snip>/gopath/src/k8s.io/kubernetes/pkg/volume/rbd\r\n$ go test\r\n--- FAIL: TestConstructVolumeSpec (0.00s)\r\n\trbd_test.go:575: ConstructVolumeSpec failed: directory /var/folders/59/yc7_f4fd53nbyw868zqpk78cn7shx9/T/rbd_test144865306/pods/pod123/volumes/kubernetes.io~rbd/vol is not mounted\r\n\trbd_test.go:575: ConstructVolumeSpec failed: directory /var/folders/59/yc7_f4fd53nbyw868zqpk78cn7shx9/T/rbd_test144865306/pods/pod123/volumes/kubernetes.io~rbd/vol is not mounted\r\nFAIL\r\nexit status 1\r\nFAIL\tk8s.io/kubernetes/pkg/volume/rbd\t0.063s\r\n```\r\n\r\n**Which issue(s) this PR fixes**:\r\nFixes #61571\r\n\r\n**Special notes for your reviewer**:\r\n\r\nTo see this unit test fail, you need to run `go test` on an osx machine.\r\n\r\n**Release note**:\r\n```release-note\r\nNONE\r\n```\r\n","created_at":"2018-03-23T00:08:48Z","updated_at":"2018-03-23T01:06:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d9dea116f4ee64abb690818dee0feca3b357e29","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rootfs","id":7062400,"avatar_url":"https://avatars0.githubusercontent.com/u/7062400?v=4","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},{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars1.githubusercontent.com/u/10052848?v=4","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":169428334,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/storage","name":"sig/storage","color":"d2b48c","default":false},{"id":253450934,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/M","name":"size/M","color":"eebb00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/61570/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/61570/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/61570/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/f2d56f3547f5572e46749c84f516814b31f7dc76","head":{"label":"ianchakeres:osx-test-rbd-fix","ref":"osx-test-rbd-fix","sha":"f2d56f3547f5572e46749c84f516814b31f7dc76","user":{"login":"ianchakeres","id":4367440,"avatar_url":"https://avatars0.githubusercontent.com/u/4367440?v=4","gravatar_id":"","url":"https://api.github.com/users/ianchakeres","html_url":"https://github.com/ianchakeres","followers_url":"https://api.github.com/users/ianchakeres/followers","following_url":"https://api.github.com/users/ianchakeres/following{/other_user}","gists_url":"https://api.github.com/users/ianchakeres/gists{/gist_id}","starred_url":"https://api.github.com/users/ianchakeres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianchakeres/subscriptions","organizations_url":"https://api.github.com/users/ianchakeres/orgs","repos_url":"https://api.github.com/users/ianchakeres/repos","events_url":"https://api.github.com/users/ianchakeres/events{/privacy}","received_events_url":"https://api.github.com/users/ianchakeres/received_events","type":"User","site_admin":false},"repo":{"id":86729813,"name":"kubernetes","full_name":"ianchakeres/kubernetes","owner":{"login":"ianchakeres","id":4367440,"avatar_url":"https://avatars0.githubusercontent.com/u/4367440?v=4","gravatar_id":"","url":"https://api.github.com/users/ianchakeres","html_url":"https://github.com/ianchakeres","followers_url":"https://api.github.com/users/ianchakeres/followers","following_url":"https://api.github.com/users/ianchakeres/following{/other_user}","gists_url":"https://api.github.com/users/ianchakeres/gists{/gist_id}","starred_url":"https://api.github.com/users/ianchakeres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianchakeres/subscriptions","organizations_url":"https://api.github.com/users/ianchakeres/orgs","repos_url":"https://api.github.com/users/ianchakeres/repos","events_url":"https://api.github.com/users/ianchakeres/events{/privacy}","received_events_url":"https://api.github.com/users/ianchakeres/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ianchakeres/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/ianchakeres/kubernetes","forks_url":"https://api.github.com/repos/ianchakeres/kubernetes/forks","keys_url":"https://api.github.com/repos/ianchakeres/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ianchakeres/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ianchakeres/kubernetes/teams","hooks_url":"https://api.github.com/repos/ianchakeres/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ianchakeres/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ianchakeres/kubernetes/events","assignees_url":"https://api.github.com/repos/ianchakeres/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ianchakeres/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ianchakeres/kubernetes/tags","blobs_url":"https://api.github.com/repos/ianchakeres/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ianchakeres/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ianchakeres/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ianchakeres/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ianchakeres/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ianchakeres/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ianchakeres/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ianchakeres/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ianchakeres/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ianchakeres/kubernetes/subscription","commits_url":"https://api.github.com/repos/ianchakeres/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ianchakeres/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ianchakeres/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ianchakeres/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ianchakeres/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ianchakeres/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ianchakeres/kubernetes/merges","archive_url":"https://api.github.com/repos/ianchakeres/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ianchakeres/kubernetes/downloads","issues_url":"https://api.github.com/repos/ianchakeres/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ianchakeres/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ianchakeres/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ianchakeres/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ianchakeres/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ianchakeres/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/ianchakeres/kubernetes/deployments","created_at":"2017-03-30T17:26:21Z","updated_at":"2018-02-09T00:24:51Z","pushed_at":"2018-03-23T00:02:47Z","git_url":"git://github.com/ianchakeres/kubernetes.git","ssh_url":"git@github.com:ianchakeres/kubernetes.git","clone_url":"https://github.com/ianchakeres/kubernetes.git","svn_url":"https://github.com/ianchakeres/kubernetes","homepage":"http://kubernetes.io","size":540802,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"4dd4cbe8e3434053259192d97ee5f7ed2f33b7f6","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":"2018-03-23T00:49:59Z","pushed_at":"2018-03-23T00:29:28Z","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":766363,"stargazers_count":34089,"watchers_count":34089,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12101,"mirror_url":null,"archived":false,"open_issues_count":3491,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":12101,"open_issues":3491,"watchers":34089,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/61570"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/61570"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/61570"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/61570/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/61570/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/61570/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/f2d56f3547f5572e46749c84f516814b31f7dc76"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ianchakeres"}}