{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/comments/106386503","pull_request_review_id":27304213,"id":106386503,"diff_hunk":"@@ -194,18 +194,22 @@ protected boolean deleteSnapshotChain(SnapshotInfo snapshot) {\n                     }\n                 }\n                 if (!deleted) {\n-                    boolean r = snapshotSvr.deleteSnapshot(snapshot);\n-                    if (r) {\n-                        // delete snapshot in cache if there is\n-                        List<SnapshotInfo> cacheSnaps = snapshotDataFactory.listSnapshotOnCache(snapshot.getId());\n-                        for (SnapshotInfo cacheSnap : cacheSnaps) {\n-                            s_logger.debug(\"Delete snapshot \" + snapshot.getId() + \" from image cache store: \" + cacheSnap.getDataStore().getName());\n-                            cacheSnap.delete();\n+                    try {\n+                        boolean r = snapshotSvr.deleteSnapshot(snapshot);\n+                        if (r) {\n+                            // delete snapshot in cache if there is\n+                            List<SnapshotInfo> cacheSnaps = snapshotDataFactory.listSnapshotOnCache(snapshot.getId());\n+                            for (SnapshotInfo cacheSnap : cacheSnaps) {\n+                                s_logger.debug(\"Delete snapshot \" + snapshot.getId() + \" from image cache store: \" + cacheSnap.getDataStore().getName());\n+                                cacheSnap.delete();\n+                            }\n                         }\n-                    }\n-                    if (!resultIsSet) {\n-                        result = r;\n-                        resultIsSet = true;\n+                        if (!resultIsSet) {\n+                            result = r;\n+                            resultIsSet = true;\n+                        }\n+                    } catch (Exception e){","path":"engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java","position":29,"original_position":29,"commit_id":"1c04b30143c84cd4c5fabf9467d2509e78b49f06","original_commit_id":"1c04b30143c84cd4c5fabf9467d2509e78b49f06","user":{"login":"anshul1886","id":1712815,"avatar_url":"https://avatars1.githubusercontent.com/u/1712815?v=3","gravatar_id":"","url":"https://api.github.com/users/anshul1886","html_url":"https://github.com/anshul1886","followers_url":"https://api.github.com/users/anshul1886/followers","following_url":"https://api.github.com/users/anshul1886/following{/other_user}","gists_url":"https://api.github.com/users/anshul1886/gists{/gist_id}","starred_url":"https://api.github.com/users/anshul1886/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshul1886/subscriptions","organizations_url":"https://api.github.com/users/anshul1886/orgs","repos_url":"https://api.github.com/users/anshul1886/repos","events_url":"https://api.github.com/users/anshul1886/events{/privacy}","received_events_url":"https://api.github.com/users/anshul1886/received_events","type":"User","site_admin":false},"body":"@koushik-das Its a catch all as we will retry to delete snapshot again in next attempt if it fails to delete so just logging in and carry on. Also it is introduced to make sure that all snapshots gets chance to delete.","created_at":"2017-03-16T10:46:10Z","updated_at":"2017-03-16T10:46:10Z","html_url":"https://github.com/apache/cloudstack/pull/1867#discussion_r106386503","pull_request_url":"https://api.github.com/repos/apache/cloudstack/pulls/1867","_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments/106386503"},"html":{"href":"https://github.com/apache/cloudstack/pull/1867#discussion_r106386503"},"pull_request":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/1867"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/1867","id":99351870,"html_url":"https://github.com/apache/cloudstack/pull/1867","diff_url":"https://github.com/apache/cloudstack/pull/1867.diff","patch_url":"https://github.com/apache/cloudstack/pull/1867.patch","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/1867","number":1867,"state":"open","locked":false,"title":"CLOUDSTACK-9706: Added snapshots cleanup in start and storage GC thre…","user":{"login":"anshul1886","id":1712815,"avatar_url":"https://avatars1.githubusercontent.com/u/1712815?v=3","gravatar_id":"","url":"https://api.github.com/users/anshul1886","html_url":"https://github.com/anshul1886","followers_url":"https://api.github.com/users/anshul1886/followers","following_url":"https://api.github.com/users/anshul1886/following{/other_user}","gists_url":"https://api.github.com/users/anshul1886/gists{/gist_id}","starred_url":"https://api.github.com/users/anshul1886/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshul1886/subscriptions","organizations_url":"https://api.github.com/users/anshul1886/orgs","repos_url":"https://api.github.com/users/anshul1886/repos","events_url":"https://api.github.com/users/anshul1886/events{/privacy}","received_events_url":"https://api.github.com/users/anshul1886/received_events","type":"User","site_admin":false},"body":"…ad if they are failed to cleanup during DeleteSnapshot command","created_at":"2016-12-26T08:48:26Z","updated_at":"2017-03-16T10:46:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6c252a80f5d181b11300005e8b986de737433a8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/cloudstack/pulls/1867/commits","review_comments_url":"https://api.github.com/repos/apache/cloudstack/pulls/1867/comments","review_comment_url":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/1867/comments","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/1c04b30143c84cd4c5fabf9467d2509e78b49f06","head":{"label":"anshul1886:CLOUDSTACK-9706","ref":"CLOUDSTACK-9706","sha":"1c04b30143c84cd4c5fabf9467d2509e78b49f06","user":{"login":"anshul1886","id":1712815,"avatar_url":"https://avatars1.githubusercontent.com/u/1712815?v=3","gravatar_id":"","url":"https://api.github.com/users/anshul1886","html_url":"https://github.com/anshul1886","followers_url":"https://api.github.com/users/anshul1886/followers","following_url":"https://api.github.com/users/anshul1886/following{/other_user}","gists_url":"https://api.github.com/users/anshul1886/gists{/gist_id}","starred_url":"https://api.github.com/users/anshul1886/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshul1886/subscriptions","organizations_url":"https://api.github.com/users/anshul1886/orgs","repos_url":"https://api.github.com/users/anshul1886/repos","events_url":"https://api.github.com/users/anshul1886/events{/privacy}","received_events_url":"https://api.github.com/users/anshul1886/received_events","type":"User","site_admin":false},"repo":{"id":25956790,"name":"cloudstack-1","full_name":"anshul1886/cloudstack-1","owner":{"login":"anshul1886","id":1712815,"avatar_url":"https://avatars1.githubusercontent.com/u/1712815?v=3","gravatar_id":"","url":"https://api.github.com/users/anshul1886","html_url":"https://github.com/anshul1886","followers_url":"https://api.github.com/users/anshul1886/followers","following_url":"https://api.github.com/users/anshul1886/following{/other_user}","gists_url":"https://api.github.com/users/anshul1886/gists{/gist_id}","starred_url":"https://api.github.com/users/anshul1886/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshul1886/subscriptions","organizations_url":"https://api.github.com/users/anshul1886/orgs","repos_url":"https://api.github.com/users/anshul1886/repos","events_url":"https://api.github.com/users/anshul1886/events{/privacy}","received_events_url":"https://api.github.com/users/anshul1886/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anshul1886/cloudstack-1","description":"Mirror of Apache Cloudstack","fork":true,"url":"https://api.github.com/repos/anshul1886/cloudstack-1","forks_url":"https://api.github.com/repos/anshul1886/cloudstack-1/forks","keys_url":"https://api.github.com/repos/anshul1886/cloudstack-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anshul1886/cloudstack-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anshul1886/cloudstack-1/teams","hooks_url":"https://api.github.com/repos/anshul1886/cloudstack-1/hooks","issue_events_url":"https://api.github.com/repos/anshul1886/cloudstack-1/issues/events{/number}","events_url":"https://api.github.com/repos/anshul1886/cloudstack-1/events","assignees_url":"https://api.github.com/repos/anshul1886/cloudstack-1/assignees{/user}","branches_url":"https://api.github.com/repos/anshul1886/cloudstack-1/branches{/branch}","tags_url":"https://api.github.com/repos/anshul1886/cloudstack-1/tags","blobs_url":"https://api.github.com/repos/anshul1886/cloudstack-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anshul1886/cloudstack-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anshul1886/cloudstack-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/anshul1886/cloudstack-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anshul1886/cloudstack-1/statuses/{sha}","languages_url":"https://api.github.com/repos/anshul1886/cloudstack-1/languages","stargazers_url":"https://api.github.com/repos/anshul1886/cloudstack-1/stargazers","contributors_url":"https://api.github.com/repos/anshul1886/cloudstack-1/contributors","subscribers_url":"https://api.github.com/repos/anshul1886/cloudstack-1/subscribers","subscription_url":"https://api.github.com/repos/anshul1886/cloudstack-1/subscription","commits_url":"https://api.github.com/repos/anshul1886/cloudstack-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/anshul1886/cloudstack-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/anshul1886/cloudstack-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/anshul1886/cloudstack-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/anshul1886/cloudstack-1/contents/{+path}","compare_url":"https://api.github.com/repos/anshul1886/cloudstack-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anshul1886/cloudstack-1/merges","archive_url":"https://api.github.com/repos/anshul1886/cloudstack-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anshul1886/cloudstack-1/downloads","issues_url":"https://api.github.com/repos/anshul1886/cloudstack-1/issues{/number}","pulls_url":"https://api.github.com/repos/anshul1886/cloudstack-1/pulls{/number}","milestones_url":"https://api.github.com/repos/anshul1886/cloudstack-1/milestones{/number}","notifications_url":"https://api.github.com/repos/anshul1886/cloudstack-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anshul1886/cloudstack-1/labels{/name}","releases_url":"https://api.github.com/repos/anshul1886/cloudstack-1/releases{/id}","deployments_url":"https://api.github.com/repos/anshul1886/cloudstack-1/deployments","created_at":"2014-10-30T05:52:06Z","updated_at":"2014-11-18T06:08:32Z","pushed_at":"2017-03-09T19:58:33Z","git_url":"git://github.com/anshul1886/cloudstack-1.git","ssh_url":"git@github.com:anshul1886/cloudstack-1.git","clone_url":"https://github.com/anshul1886/cloudstack-1.git","svn_url":"https://github.com/anshul1886/cloudstack-1","homepage":null,"size":505604,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"50147a4208f5047a6ec69239b5c8099082523eb5","user":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":9759448,"name":"cloudstack","full_name":"apache/cloudstack","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cloudstack","description":"Mirror of Apache Cloudstack","fork":false,"url":"https://api.github.com/repos/apache/cloudstack","forks_url":"https://api.github.com/repos/apache/cloudstack/forks","keys_url":"https://api.github.com/repos/apache/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cloudstack/teams","hooks_url":"https://api.github.com/repos/apache/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/apache/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cloudstack/events","assignees_url":"https://api.github.com/repos/apache/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cloudstack/tags","blobs_url":"https://api.github.com/repos/apache/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cloudstack/languages","stargazers_url":"https://api.github.com/repos/apache/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/apache/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/apache/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/apache/cloudstack/subscription","commits_url":"https://api.github.com/repos/apache/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cloudstack/merges","archive_url":"https://api.github.com/repos/apache/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cloudstack/downloads","issues_url":"https://api.github.com/repos/apache/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/apache/cloudstack/releases{/id}","deployments_url":"https://api.github.com/repos/apache/cloudstack/deployments","created_at":"2013-04-29T22:27:12Z","updated_at":"2017-03-10T22:15:21Z","pushed_at":"2017-03-16T10:32:48Z","git_url":"git://github.com/apache/cloudstack.git","ssh_url":"git@github.com:apache/cloudstack.git","clone_url":"https://github.com/apache/cloudstack.git","svn_url":"https://github.com/apache/cloudstack","homepage":null,"size":512294,"stargazers_count":447,"watchers_count":447,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":563,"mirror_url":"git://git.apache.org/cloudstack.git","open_issues_count":235,"forks":563,"open_issues":235,"watchers":447,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/1867"},"html":{"href":"https://github.com/apache/cloudstack/pull/1867"},"issue":{"href":"https://api.github.com/repos/apache/cloudstack/issues/1867"},"comments":{"href":"https://api.github.com/repos/apache/cloudstack/issues/1867/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/1867/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/1867/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cloudstack/statuses/1c04b30143c84cd4c5fabf9467d2509e78b49f06"}}}}
{"actor":{"display_login":"anshul1886"}}