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

ASF GitHub Bot commented on CLOUDSTACK-8415:
--------------------------------------------

Github user wilderrodrigues commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/540#discussion_r34767521
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -1120,14 +1123,60 @@ public void cleanupStorage(boolean recurring) {
                         }
     
                         // remove snapshots in Error state
    -                    List<SnapshotVO> snapshots = 
_snapshotDao.listAllByStatus(Snapshot.State.Error);
    +                    List<SnapshotVO> snapshots = 
_snapshotDao.listAllByStatusIncludingRemoved(Snapshot.State.Error);
                         for (SnapshotVO snapshotVO : snapshots) {
                             try {
                                 List<SnapshotDataStoreVO> storeRefs = 
_snapshotStoreDao.findBySnapshotId(snapshotVO.getId());
    +                            boolean isVMware = 
snapshotVO.getHypervisorType().equals(HypervisorType.VMware);
    +                            boolean removeSnapshot = true;
                                 for (SnapshotDataStoreVO ref : storeRefs) {
    -                                _snapshotStoreDao.expunge(ref.getId());
    +                                // Cleanup corresponding items (if any) 
from secondary storage.
    +                                if (isVMware) {
    --- End diff --
    
    Good catch!
    
    We would have to get the PR in and test it, without the IF, against Xen and 
KVM, at least. What do you think?


> [VMware] SSVM shutdown during snapshot operation results in disks to be left 
> behind 
> ------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8415
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8415
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Likitha Shetty
>            Assignee: Likitha Shetty
>             Fix For: 4.6.0
>
>
> Partial disks are residue of a failed snapshot operation caused by SSVM 
> reboot/shutdown. The disks do not get cleaned up on secondary storage and 
> need to be cleaned up manually to release storage.
> +Steps to reproduce+
> 1. Initiate a volume snapshot operation.
> 2. Destroy SSVM while the operation is in progress.
> 3. Check the snapshot folder in secondary storage - Files including disks are 
> present in the folder and are never cleaned up. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to