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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to