[jira] [Resolved] (CLOUDSTACK-10223) Snapshots are not getting deleted when domain is deleted

2018-08-12 Thread JIRA


 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rafael Weingärtner resolved CLOUDSTACK-10223.
-
   Resolution: Fixed
Fix Version/s: 4.12

> Snapshots are not getting deleted when domain is deleted
> 
>
> Key: CLOUDSTACK-10223
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10223
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Sowjanya_Patha
>Priority: Minor
> Fix For: 4.12
>
>
> After domain deletion, snapshot taken by the domain remains undeleted.
> Steps to reproduce:
> ---
> 1. Create a test domain
> 2. Create test account with admin privileges.
> 3. Login as "test" acoount.
> 4. Create 3 instances - few having root disk and rest with root and data 
> disks both.
> 5. For 2 instances take snapshots of root and data disks
> 6. Expunge above instances from ACP UI.
> 7. Make sure that those vm's should not be shown in ACP UI.
> 8. Login as root user again
> 9. Delete the test account
> 10. Delete the test domain
> Snapshots taken for root volume in step 5 are not deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10223) Snapshots are not getting deleted when domain is deleted

2018-08-12 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577589#comment-16577589
 ] 

ASF subversion and git services commented on CLOUDSTACK-10223:
--

Commit 35e008df6c551b2a0de3e7b175c738b4342eae31 in cloudstack's branch 
refs/heads/master from SowjanyaPatha
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=35e008d ]

CLOUDSTACK-10223 Snapshots are not getting deleted when domain is deleted 
(#2399)



> Snapshots are not getting deleted when domain is deleted
> 
>
> Key: CLOUDSTACK-10223
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10223
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Sowjanya_Patha
>Priority: Minor
>
> After domain deletion, snapshot taken by the domain remains undeleted.
> Steps to reproduce:
> ---
> 1. Create a test domain
> 2. Create test account with admin privileges.
> 3. Login as "test" acoount.
> 4. Create 3 instances - few having root disk and rest with root and data 
> disks both.
> 5. For 2 instances take snapshots of root and data disks
> 6. Expunge above instances from ACP UI.
> 7. Make sure that those vm's should not be shown in ACP UI.
> 8. Login as root user again
> 9. Delete the test account
> 10. Delete the test domain
> Snapshots taken for root volume in step 5 are not deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10223) Snapshots are not getting deleted when domain is deleted

2018-08-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577588#comment-16577588
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10223:
-

rafaelweingartner closed pull request #2399: CLOUDSTACK-10223 delete snapshots 
when deleting domain
URL: https://github.com/apache/cloudstack/pull/2399
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDao.java 
b/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDao.java
index a05dc1f560d..0fc217c700b 100644
--- a/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDao.java
+++ b/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDao.java
@@ -34,6 +34,8 @@
 
 List findByAccount(long accountId);
 
+List findIncludingRemovedByAccount(long accountId);
+
 Pair getCountAndTotalByPool(long poolId);
 
 Pair getNonDestroyedCountAndTotalByPool(long poolId);
diff --git 
a/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java 
b/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java
index f691e30c743..529e8e66b8b 100644
--- a/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -99,6 +99,13 @@
 return listBy(sc);
 }
 
+@Override
+public List findIncludingRemovedByAccount(long accountId) {
+SearchCriteria sc = AllFieldsSearch.create();
+sc.setParameters("accountId", accountId);
+return listIncludingRemovedBy(sc);
+}
+
 @Override
 public List findByInstance(long id) {
 SearchCriteria sc = AllFieldsSearch.create();
diff --git 
a/server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java 
b/server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java
index bd49c05f43e..f1adf0ae271 100755
--- a/server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -715,7 +715,7 @@ public String getSecondaryStorageURL(SnapshotVO snapshot) {
 @Override
 public boolean deleteSnapshotDirsForAccount(long accountId) {
 
-List volumes = _volsDao.findByAccount(accountId);
+List volumes = 
_volsDao.findIncludingRemovedByAccount(accountId);
 // The above call will list only non-destroyed volumes.
 // So call this method before marking the volumes as destroyed.
 // i.e Call them before the VMs for those volumes are destroyed.


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Snapshots are not getting deleted when domain is deleted
> 
>
> Key: CLOUDSTACK-10223
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10223
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Sowjanya_Patha
>Priority: Minor
>
> After domain deletion, snapshot taken by the domain remains undeleted.
> Steps to reproduce:
> ---
> 1. Create a test domain
> 2. Create test account with admin privileges.
> 3. Login as "test" acoount.
> 4. Create 3 instances - few having root disk and rest with root and data 
> disks both.
> 5. For 2 instances take snapshots of root and data disks
> 6. Expunge above instances from ACP UI.
> 7. Make sure that those vm's should not be shown in ACP UI.
> 8. Login as root user again
> 9. Delete the test account
> 10. Delete the test domain
> Snapshots taken for root volume in step 5 are not deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)