mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4454:object_store - Not able to delete secondary storage when
existing snapshots are deleted.
This commit is contained in:
parent
75be7a9ac4
commit
2611ac75c1
|
|
@ -68,6 +68,7 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO
|
|||
storeSearch = createSearchBuilder();
|
||||
storeSearch.and("store_id", storeSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ);
|
||||
storeSearch.and("store_role", storeSearch.entity().getRole(), SearchCriteria.Op.EQ);
|
||||
storeSearch.and("state", storeSearch.entity().getState(), SearchCriteria.Op.NEQ);
|
||||
storeSearch.done();
|
||||
|
||||
destroyedSearch = createSearchBuilder();
|
||||
|
|
@ -147,6 +148,7 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO
|
|||
SearchCriteria<SnapshotDataStoreVO> sc = storeSearch.create();
|
||||
sc.setParameters("store_id", id);
|
||||
sc.setParameters("store_role", role);
|
||||
sc.setParameters("state", ObjectInDataStoreStateMachine.State.Destroyed);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue