mirror of https://github.com/apache/cloudstack.git
Merge branch '4.9'
This commit is contained in:
commit
dbe57c3e50
|
|
@ -268,7 +268,9 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase {
|
|||
SnapshotDataStoreVO snapshotOnPrimary = snapshotStoreDao.findBySnapshot(snapshotId, DataStoreRole.Primary);
|
||||
if (snapshotOnPrimary != null) {
|
||||
SnapshotInfo snapshotOnPrimaryInfo = snapshotDataFactory.getSnapshot(snapshotId, DataStoreRole.Primary);
|
||||
if (((PrimaryDataStoreImpl)snapshotOnPrimaryInfo.getDataStore()).getPoolType() == StoragePoolType.RBD) {
|
||||
long volumeId = snapshotOnPrimary.getVolumeId();
|
||||
VolumeVO volumeVO = volumeDao.findById(volumeId);
|
||||
if (((PrimaryDataStoreImpl)snapshotOnPrimaryInfo.getDataStore()).getPoolType() == StoragePoolType.RBD && volumeVO != null) {
|
||||
snapshotSvr.deleteSnapshot(snapshotOnPrimaryInfo);
|
||||
}
|
||||
snapshotOnPrimary.setState(State.Destroyed);
|
||||
|
|
|
|||
Loading…
Reference in New Issue