{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/comments/122892146","pull_request_review_id":45044553,"id":122892146,"diff_hunk":"@@ -530,6 +534,13 @@ public boolean deleteSnapshot(long snapshotId) {\n             return false;\n         }\n \n+        List<VolumeDetailVO> volumeCheck;\n+        volumeCheck = _volumeDetailsDaoImpl.findDetails(\"SNAPSHOT_ID\", String.valueOf(snapshotId), null);\n+\n+        if (volumeCheck.size() > 0) {\n+            throw new InvalidParameterValueException(\"Unable to perform delete operation, Snapshot with id: \" + snapshotId + \" is in use  \");\n+        }\n+","path":"server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java","position":28,"original_position":28,"commit_id":"53f4353265d1808c135c151428282aaa32a7093e","original_commit_id":"53f4353265d1808c135c151428282aaa32a7093e","user":{"login":"sureshanaparti","id":12028987,"avatar_url":"https://avatars0.githubusercontent.com/u/12028987?v=3","gravatar_id":"","url":"https://api.github.com/users/sureshanaparti","html_url":"https://github.com/sureshanaparti","followers_url":"https://api.github.com/users/sureshanaparti/followers","following_url":"https://api.github.com/users/sureshanaparti/following{/other_user}","gists_url":"https://api.github.com/users/sureshanaparti/gists{/gist_id}","starred_url":"https://api.github.com/users/sureshanaparti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sureshanaparti/subscriptions","organizations_url":"https://api.github.com/users/sureshanaparti/orgs","repos_url":"https://api.github.com/users/sureshanaparti/repos","events_url":"https://api.github.com/users/sureshanaparti/events{/privacy}","received_events_url":"https://api.github.com/users/sureshanaparti/received_events","type":"User","site_admin":false},"body":"Any other approach to check the volumes creating from a given snapshot?","created_at":"2017-06-20T06:46:04Z","updated_at":"2017-06-20T06:46:04Z","html_url":"https://github.com/apache/cloudstack/pull/2149#discussion_r122892146","pull_request_url":"https://api.github.com/repos/apache/cloudstack/pulls/2149","_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments/122892146"},"html":{"href":"https://github.com/apache/cloudstack/pull/2149#discussion_r122892146"},"pull_request":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/2149"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/2149","id":125783728,"html_url":"https://github.com/apache/cloudstack/pull/2149","diff_url":"https://github.com/apache/cloudstack/pull/2149.diff","patch_url":"https://github.com/apache/cloudstack/pull/2149.patch","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/2149","number":2149,"state":"open","locked":false,"title":"CLOUDSTACK-9932 snapshot is getting deleted while volume is in creating state","user":{"login":"pavanaravapalli","id":25006824,"avatar_url":"https://avatars1.githubusercontent.com/u/25006824?v=3","gravatar_id":"","url":"https://api.github.com/users/pavanaravapalli","html_url":"https://github.com/pavanaravapalli","followers_url":"https://api.github.com/users/pavanaravapalli/followers","following_url":"https://api.github.com/users/pavanaravapalli/following{/other_user}","gists_url":"https://api.github.com/users/pavanaravapalli/gists{/gist_id}","starred_url":"https://api.github.com/users/pavanaravapalli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavanaravapalli/subscriptions","organizations_url":"https://api.github.com/users/pavanaravapalli/orgs","repos_url":"https://api.github.com/users/pavanaravapalli/repos","events_url":"https://api.github.com/users/pavanaravapalli/events{/privacy}","received_events_url":"https://api.github.com/users/pavanaravapalli/received_events","type":"User","site_admin":false},"body":"Added validation to check if any volume(s) are in creating state ,  before performing delete snapshot.","created_at":"2017-06-15T09:52:23Z","updated_at":"2017-06-20T06:46:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc8d8d99d47191d47b010424e74022dfd4585cdc","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/cloudstack/pulls/2149/commits","review_comments_url":"https://api.github.com/repos/apache/cloudstack/pulls/2149/comments","review_comment_url":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/2149/comments","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/53f4353265d1808c135c151428282aaa32a7093e","head":{"label":"Accelerite:CLOUDSTACK-9932","ref":"CLOUDSTACK-9932","sha":"53f4353265d1808c135c151428282aaa32a7093e","user":{"login":"Accelerite","id":10110160,"avatar_url":"https://avatars0.githubusercontent.com/u/10110160?v=3","gravatar_id":"","url":"https://api.github.com/users/Accelerite","html_url":"https://github.com/Accelerite","followers_url":"https://api.github.com/users/Accelerite/followers","following_url":"https://api.github.com/users/Accelerite/following{/other_user}","gists_url":"https://api.github.com/users/Accelerite/gists{/gist_id}","starred_url":"https://api.github.com/users/Accelerite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Accelerite/subscriptions","organizations_url":"https://api.github.com/users/Accelerite/orgs","repos_url":"https://api.github.com/users/Accelerite/repos","events_url":"https://api.github.com/users/Accelerite/events{/privacy}","received_events_url":"https://api.github.com/users/Accelerite/received_events","type":"Organization","site_admin":false},"repo":{"id":74649660,"name":"cloudstack","full_name":"Accelerite/cloudstack","owner":{"login":"Accelerite","id":10110160,"avatar_url":"https://avatars0.githubusercontent.com/u/10110160?v=3","gravatar_id":"","url":"https://api.github.com/users/Accelerite","html_url":"https://github.com/Accelerite","followers_url":"https://api.github.com/users/Accelerite/followers","following_url":"https://api.github.com/users/Accelerite/following{/other_user}","gists_url":"https://api.github.com/users/Accelerite/gists{/gist_id}","starred_url":"https://api.github.com/users/Accelerite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Accelerite/subscriptions","organizations_url":"https://api.github.com/users/Accelerite/orgs","repos_url":"https://api.github.com/users/Accelerite/repos","events_url":"https://api.github.com/users/Accelerite/events{/privacy}","received_events_url":"https://api.github.com/users/Accelerite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Accelerite/cloudstack","description":"Mirror of Apache Cloudstack","fork":true,"url":"https://api.github.com/repos/Accelerite/cloudstack","forks_url":"https://api.github.com/repos/Accelerite/cloudstack/forks","keys_url":"https://api.github.com/repos/Accelerite/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Accelerite/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Accelerite/cloudstack/teams","hooks_url":"https://api.github.com/repos/Accelerite/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/Accelerite/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/Accelerite/cloudstack/events","assignees_url":"https://api.github.com/repos/Accelerite/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/Accelerite/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/Accelerite/cloudstack/tags","blobs_url":"https://api.github.com/repos/Accelerite/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Accelerite/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Accelerite/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Accelerite/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Accelerite/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/Accelerite/cloudstack/languages","stargazers_url":"https://api.github.com/repos/Accelerite/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/Accelerite/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/Accelerite/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/Accelerite/cloudstack/subscription","commits_url":"https://api.github.com/repos/Accelerite/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Accelerite/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Accelerite/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Accelerite/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Accelerite/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/Accelerite/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Accelerite/cloudstack/merges","archive_url":"https://api.github.com/repos/Accelerite/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Accelerite/cloudstack/downloads","issues_url":"https://api.github.com/repos/Accelerite/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/Accelerite/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/Accelerite/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/Accelerite/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Accelerite/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/Accelerite/cloudstack/releases{/id}","deployments_url":"https://api.github.com/repos/Accelerite/cloudstack/deployments","created_at":"2016-11-24T07:44:02Z","updated_at":"2016-11-24T07:44:25Z","pushed_at":"2017-06-20T05:35:00Z","git_url":"git://github.com/Accelerite/cloudstack.git","ssh_url":"git@github.com:Accelerite/cloudstack.git","clone_url":"https://github.com/Accelerite/cloudstack.git","svn_url":"https://github.com/Accelerite/cloudstack","homepage":null,"size":515398,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"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":"ed376fcad6a107fdb495a2c310fd4d1fe431c4dd","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-06-18T18:53:04Z","pushed_at":"2017-06-20T05:38:24Z","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":514587,"stargazers_count":466,"watchers_count":466,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":578,"mirror_url":"git://git.apache.org/cloudstack.git","open_issues_count":193,"forks":578,"open_issues":193,"watchers":466,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/2149"},"html":{"href":"https://github.com/apache/cloudstack/pull/2149"},"issue":{"href":"https://api.github.com/repos/apache/cloudstack/issues/2149"},"comments":{"href":"https://api.github.com/repos/apache/cloudstack/issues/2149/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/2149/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/2149/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cloudstack/statuses/53f4353265d1808c135c151428282aaa32a7093e"}}}}
{"actor":{"display_login":"sureshanaparti"}}