{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments/87077668","pull_request_review_id":7704526,"id":87077668,"diff_hunk":"@@ -402,8 +402,15 @@ def vol_info(vol_meta, vol_size_info, datastore):\n # Return error, or None for OK\n def removeVMDK(vmdk_path):\n     logging.info(\"*** removeVMDK: %s\", vmdk_path)\n-    cmd = \"{0} {1}\".format(VMDK_DELETE_CMD, vmdk_path)\n \n+    # Check the current volume status\n+    attached, uuid, attach_as = getStatusAttached(vmdk_path)\n+    if attached:","path":"esx_service/vmdk_ops.py","position":8,"original_position":8,"commit_id":"a8bbccc73749c76db461b228f6312fed43e08160","original_commit_id":"a8bbccc73749c76db461b228f6312fed43e08160","user":{"login":"pdhamdhere","id":16676511,"avatar_url":"https://avatars.githubusercontent.com/u/16676511?v=3","gravatar_id":"","url":"https://api.github.com/users/pdhamdhere","html_url":"https://github.com/pdhamdhere","followers_url":"https://api.github.com/users/pdhamdhere/followers","following_url":"https://api.github.com/users/pdhamdhere/following{/other_user}","gists_url":"https://api.github.com/users/pdhamdhere/gists{/gist_id}","starred_url":"https://api.github.com/users/pdhamdhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdhamdhere/subscriptions","organizations_url":"https://api.github.com/users/pdhamdhere/orgs","repos_url":"https://api.github.com/users/pdhamdhere/repos","events_url":"https://api.github.com/users/pdhamdhere/events{/privacy}","received_events_url":"https://api.github.com/users/pdhamdhere/received_events","type":"User","site_admin":false},"body":"Information in KV file could be stale thus preventing user from deleting volume ever. I believe this is a workaround to real bug where Unlink/Delete deletes sidecar (VMFD) but leaves VMDK behind if VMDK is already in use. Does this bug exist with API too?\r\n\r\nAlso would it be better to query underlying system rather than relying on KV? For e.g. \"vmkfstools -D\"  tells you whether file is locked and by whom. If it is locked, fail delete?","created_at":"2016-11-08T20:34:22Z","updated_at":"2016-11-08T20:34:40Z","html_url":"https://github.com/vmware/docker-volume-vsphere/pull/720#discussion_r87077668","pull_request_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/720","_links":{"self":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments/87077668"},"html":{"href":"https://github.com/vmware/docker-volume-vsphere/pull/720#discussion_r87077668"},"pull_request":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/720"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/720","id":92764638,"html_url":"https://github.com/vmware/docker-volume-vsphere/pull/720","diff_url":"https://github.com/vmware/docker-volume-vsphere/pull/720.diff","patch_url":"https://github.com/vmware/docker-volume-vsphere/pull/720.patch","issue_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/720","number":720,"state":"open","locked":false,"title":"Check attached status in removeVMDK before trying to remove volume","user":{"login":"brunotm","id":6328334,"avatar_url":"https://avatars.githubusercontent.com/u/6328334?v=3","gravatar_id":"","url":"https://api.github.com/users/brunotm","html_url":"https://github.com/brunotm","followers_url":"https://api.github.com/users/brunotm/followers","following_url":"https://api.github.com/users/brunotm/following{/other_user}","gists_url":"https://api.github.com/users/brunotm/gists{/gist_id}","starred_url":"https://api.github.com/users/brunotm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunotm/subscriptions","organizations_url":"https://api.github.com/users/brunotm/orgs","repos_url":"https://api.github.com/users/brunotm/repos","events_url":"https://api.github.com/users/brunotm/events{/privacy}","received_events_url":"https://api.github.com/users/brunotm/received_events","type":"User","site_admin":false},"body":"fixes #719 #716 ","created_at":"2016-11-08T11:59:36Z","updated_at":"2016-11-08T20:34:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ebd147b81e02038f64c2c53fe4a42a2c0240faf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/720/commits","review_comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/720/comments","review_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/720/comments","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/a8bbccc73749c76db461b228f6312fed43e08160","head":{"label":"brunotm:brunotm.issue719","ref":"brunotm.issue719","sha":"a8bbccc73749c76db461b228f6312fed43e08160","user":{"login":"brunotm","id":6328334,"avatar_url":"https://avatars.githubusercontent.com/u/6328334?v=3","gravatar_id":"","url":"https://api.github.com/users/brunotm","html_url":"https://github.com/brunotm","followers_url":"https://api.github.com/users/brunotm/followers","following_url":"https://api.github.com/users/brunotm/following{/other_user}","gists_url":"https://api.github.com/users/brunotm/gists{/gist_id}","starred_url":"https://api.github.com/users/brunotm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunotm/subscriptions","organizations_url":"https://api.github.com/users/brunotm/orgs","repos_url":"https://api.github.com/users/brunotm/repos","events_url":"https://api.github.com/users/brunotm/events{/privacy}","received_events_url":"https://api.github.com/users/brunotm/received_events","type":"User","site_admin":false},"repo":{"id":67714149,"name":"docker-volume-vsphere","full_name":"brunotm/docker-volume-vsphere","owner":{"login":"brunotm","id":6328334,"avatar_url":"https://avatars.githubusercontent.com/u/6328334?v=3","gravatar_id":"","url":"https://api.github.com/users/brunotm","html_url":"https://github.com/brunotm","followers_url":"https://api.github.com/users/brunotm/followers","following_url":"https://api.github.com/users/brunotm/following{/other_user}","gists_url":"https://api.github.com/users/brunotm/gists{/gist_id}","starred_url":"https://api.github.com/users/brunotm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunotm/subscriptions","organizations_url":"https://api.github.com/users/brunotm/orgs","repos_url":"https://api.github.com/users/brunotm/repos","events_url":"https://api.github.com/users/brunotm/events{/privacy}","received_events_url":"https://api.github.com/users/brunotm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brunotm/docker-volume-vsphere","description":"Docker Volume Driver for vSphere.","fork":true,"url":"https://api.github.com/repos/brunotm/docker-volume-vsphere","forks_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/forks","keys_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/teams","hooks_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/hooks","issue_events_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/events","assignees_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/tags","blobs_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/languages","stargazers_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/stargazers","contributors_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/contributors","subscribers_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/subscribers","subscription_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/subscription","commits_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/merges","archive_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/downloads","issues_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/brunotm/docker-volume-vsphere/deployments","created_at":"2016-09-08T15:11:03Z","updated_at":"2016-09-08T15:11:05Z","pushed_at":"2016-11-08T12:48:35Z","git_url":"git://github.com/brunotm/docker-volume-vsphere.git","ssh_url":"git@github.com:brunotm/docker-volume-vsphere.git","clone_url":"https://github.com/brunotm/docker-volume-vsphere.git","svn_url":"https://github.com/brunotm/docker-volume-vsphere","homepage":"https://vmware.github.io/docker-volume-vsphere","size":7975,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"vmware:master","ref":"master","sha":"1024227e45c2b4e7e9ea9fc7006c236de05aee3d","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49599693,"name":"docker-volume-vsphere","full_name":"vmware/docker-volume-vsphere","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/docker-volume-vsphere","description":"Docker Volume Driver for vSphere.","fork":false,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere","forks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/forks","keys_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/teams","hooks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/hooks","issue_events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/events","assignees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/tags","blobs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/languages","stargazers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/stargazers","contributors_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contributors","subscribers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscribers","subscription_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscription","commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/merges","archive_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/downloads","issues_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/deployments","created_at":"2016-01-13T20:25:36Z","updated_at":"2016-11-08T15:59:05Z","pushed_at":"2016-11-08T20:10:54Z","git_url":"git://github.com/vmware/docker-volume-vsphere.git","ssh_url":"git@github.com:vmware/docker-volume-vsphere.git","clone_url":"https://github.com/vmware/docker-volume-vsphere.git","svn_url":"https://github.com/vmware/docker-volume-vsphere","homepage":"https://vmware.github.io/docker-volume-vsphere","size":8554,"stargazers_count":81,"watchers_count":81,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":20,"mirror_url":null,"open_issues_count":109,"forks":20,"open_issues":109,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/720"},"html":{"href":"https://github.com/vmware/docker-volume-vsphere/pull/720"},"issue":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/720"},"comments":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/720/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/720/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/720/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/a8bbccc73749c76db461b228f6312fed43e08160"}}}}
{"actor":{"display_login":"pdhamdhere"}}