{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/77779599","id":77779599,"diff_hunk":"@@ -1067,11 +1067,20 @@ func (ctrl *PersistentVolumeController) deleteVolumeOperation(arg interface{}) {\n \tif err = ctrl.doDeleteVolume(volume); err != nil {\n \t\t// Delete failed, update the volume and emit an event.\n \t\tglog.V(3).Infof(\"deletion of volume %q failed: %v\", volume.Name, err)\n-\t\tif _, err = ctrl.updateVolumePhaseWithEvent(volume, api.VolumeFailed, api.EventTypeWarning, \"VolumeFailedDelete\", err.Error()); err != nil {\n-\t\t\tglog.V(4).Infof(\"deleteVolumeOperation [%s]: failed to mark volume as failed: %v\", volume.Name, err)\n-\t\t\t// Save failed, retry on the next deletion attempt\n-\t\t\treturn\n+\t\tif vol.IsTryAgain(err) {","path":"pkg/controller/volume/persistentvolume/controller.go","position":8,"original_position":8,"commit_id":"3197036995b98c81dd68b3298d97837e511e5a45","original_commit_id":"3197036995b98c81dd68b3298d97837e511e5a45","user":{"login":"jsafrane","id":1745006,"avatar_url":"https://avatars.githubusercontent.com/u/1745006?v=3","gravatar_id":"","url":"https://api.github.com/users/jsafrane","html_url":"https://github.com/jsafrane","followers_url":"https://api.github.com/users/jsafrane/followers","following_url":"https://api.github.com/users/jsafrane/following{/other_user}","gists_url":"https://api.github.com/users/jsafrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jsafrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsafrane/subscriptions","organizations_url":"https://api.github.com/users/jsafrane/orgs","repos_url":"https://api.github.com/users/jsafrane/repos","events_url":"https://api.github.com/users/jsafrane/events{/privacy}","received_events_url":"https://api.github.com/users/jsafrane/received_events","type":"User","site_admin":false},"body":"Every controller sync, which is 15 seconds by default. And it does not start new delete until an old one (on the same PV) returns.","created_at":"2016-09-07T08:29:47Z","updated_at":"2016-09-07T08:29:47Z","html_url":"https://github.com/kubernetes/kubernetes/pull/31978#discussion_r77779599","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31978","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/77779599"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/31978#discussion_r77779599"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31978"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31978","id":83813368,"html_url":"https://github.com/kubernetes/kubernetes/pull/31978","diff_url":"https://github.com/kubernetes/kubernetes/pull/31978.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/31978.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/31978","number":31978,"state":"open","locked":false,"title":"Do not report error when deleting an attached volume","user":{"login":"jsafrane","id":1745006,"avatar_url":"https://avatars.githubusercontent.com/u/1745006?v=3","gravatar_id":"","url":"https://api.github.com/users/jsafrane","html_url":"https://github.com/jsafrane","followers_url":"https://api.github.com/users/jsafrane/followers","following_url":"https://api.github.com/users/jsafrane/following{/other_user}","gists_url":"https://api.github.com/users/jsafrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jsafrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsafrane/subscriptions","organizations_url":"https://api.github.com/users/jsafrane/orgs","repos_url":"https://api.github.com/users/jsafrane/repos","events_url":"https://api.github.com/users/jsafrane/events{/privacy}","received_events_url":"https://api.github.com/users/jsafrane/received_events","type":"User","site_admin":false},"body":"Persistent volume controller should not send warning events to a PV and mark the PV as failed when the volume is still attached.\r\n\r\nThis happens when a user quickly deletes a pod and associated PVC - PV is slowly detaching, while the PVC is already deleted and the PV enters Failed phase.\r\n\r\n`Deleter.Deleter` can now return `tryAgainError`, which is sent as INFO to the PV to let the user know we did not forget to delete the PV, however the PV stays in Released state. The controller tries again in the next sync (15 seconds by default).\r\n\r\nFixes #31511\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/31978)\n<!-- Reviewable:end -->\n","created_at":"2016-09-02T14:43:08Z","updated_at":"2016-09-07T08:29:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a6855e3fe9f3a9856c337ce5761e976c3721a98","assignee":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","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},"assignees":[{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","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}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31978/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31978/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/31978/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/3197036995b98c81dd68b3298d97837e511e5a45","head":{"label":"jsafrane:detach-before-delete","ref":"detach-before-delete","sha":"3197036995b98c81dd68b3298d97837e511e5a45","user":{"login":"jsafrane","id":1745006,"avatar_url":"https://avatars.githubusercontent.com/u/1745006?v=3","gravatar_id":"","url":"https://api.github.com/users/jsafrane","html_url":"https://github.com/jsafrane","followers_url":"https://api.github.com/users/jsafrane/followers","following_url":"https://api.github.com/users/jsafrane/following{/other_user}","gists_url":"https://api.github.com/users/jsafrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jsafrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsafrane/subscriptions","organizations_url":"https://api.github.com/users/jsafrane/orgs","repos_url":"https://api.github.com/users/jsafrane/repos","events_url":"https://api.github.com/users/jsafrane/events{/privacy}","received_events_url":"https://api.github.com/users/jsafrane/received_events","type":"User","site_admin":false},"repo":{"id":33241093,"name":"kubernetes","full_name":"jsafrane/kubernetes","owner":{"login":"jsafrane","id":1745006,"avatar_url":"https://avatars.githubusercontent.com/u/1745006?v=3","gravatar_id":"","url":"https://api.github.com/users/jsafrane","html_url":"https://github.com/jsafrane","followers_url":"https://api.github.com/users/jsafrane/followers","following_url":"https://api.github.com/users/jsafrane/following{/other_user}","gists_url":"https://api.github.com/users/jsafrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jsafrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsafrane/subscriptions","organizations_url":"https://api.github.com/users/jsafrane/orgs","repos_url":"https://api.github.com/users/jsafrane/repos","events_url":"https://api.github.com/users/jsafrane/events{/privacy}","received_events_url":"https://api.github.com/users/jsafrane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsafrane/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/jsafrane/kubernetes","forks_url":"https://api.github.com/repos/jsafrane/kubernetes/forks","keys_url":"https://api.github.com/repos/jsafrane/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsafrane/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsafrane/kubernetes/teams","hooks_url":"https://api.github.com/repos/jsafrane/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/jsafrane/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/jsafrane/kubernetes/events","assignees_url":"https://api.github.com/repos/jsafrane/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/jsafrane/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/jsafrane/kubernetes/tags","blobs_url":"https://api.github.com/repos/jsafrane/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsafrane/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsafrane/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsafrane/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsafrane/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/jsafrane/kubernetes/languages","stargazers_url":"https://api.github.com/repos/jsafrane/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/jsafrane/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/jsafrane/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/jsafrane/kubernetes/subscription","commits_url":"https://api.github.com/repos/jsafrane/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsafrane/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsafrane/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsafrane/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsafrane/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/jsafrane/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsafrane/kubernetes/merges","archive_url":"https://api.github.com/repos/jsafrane/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsafrane/kubernetes/downloads","issues_url":"https://api.github.com/repos/jsafrane/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/jsafrane/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/jsafrane/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/jsafrane/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsafrane/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/jsafrane/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/jsafrane/kubernetes/deployments","created_at":"2015-04-01T10:16:41Z","updated_at":"2016-01-15T18:08:52Z","pushed_at":"2016-09-07T08:11:28Z","git_url":"git://github.com/jsafrane/kubernetes.git","ssh_url":"git@github.com:jsafrane/kubernetes.git","clone_url":"https://github.com/jsafrane/kubernetes.git","svn_url":"https://github.com/jsafrane/kubernetes","homepage":"http://kubernetes.io","size":313426,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"921ab5070f5b21f0dd27149df0a22615f38f2b5a","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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://avatars.githubusercontent.com/u/13629408?v=3","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":"2016-09-07T07:58:48Z","pushed_at":"2016-09-07T08:19:03Z","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":557632,"stargazers_count":16571,"watchers_count":16571,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5346,"mirror_url":null,"open_issues_count":4406,"forks":5346,"open_issues":4406,"watchers":16571,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31978"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/31978"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/31978"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/31978/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31978/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/31978/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/3197036995b98c81dd68b3298d97837e511e5a45"}}}}
{"actor":{"display_login":"jsafrane"}}