mirror of https://github.com/apache/cloudstack.git
Recurring snapshot issue post upgrade from 3.0.7 to 4.5
This closes #486
This commit is contained in:
parent
9044a02d9a
commit
84d4c9bf4c
|
|
@ -237,7 +237,10 @@ public class SnapshotServiceImpl implements SnapshotService {
|
|||
// Note that DataStore information in parentSnapshot is for primary
|
||||
// data store here, we need to
|
||||
// find the image store where the parent snapshot backup is located
|
||||
SnapshotDataStoreVO parentSnapshotOnBackupStore = _snapshotStoreDao.findBySnapshot(parentSnapshot.getId(), DataStoreRole.Image);
|
||||
SnapshotDataStoreVO parentSnapshotOnBackupStore = null;
|
||||
if (parentSnapshot != null) {
|
||||
parentSnapshotOnBackupStore = _snapshotStoreDao.findBySnapshot(parentSnapshot.getId(), DataStoreRole.Image);
|
||||
}
|
||||
if (parentSnapshotOnBackupStore == null) {
|
||||
return dataStoreMgr.getImageStore(snapshot.getDataCenterId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,8 +111,9 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase {
|
|||
|
||||
boolean fullBackup = true;
|
||||
SnapshotDataStoreVO parentSnapshotOnBackupStore = snapshotStoreDao.findLatestSnapshotForVolume(snapshot.getVolumeId(), DataStoreRole.Image);
|
||||
SnapshotDataStoreVO parentSnapshotOnPrimaryStore = snapshotStoreDao.findLatestSnapshotForVolume(snapshot.getVolumeId(), DataStoreRole.Primary);
|
||||
HypervisorType hypervisorType = snapshot.getBaseVolume().getHypervisorType();
|
||||
if (parentSnapshotOnBackupStore != null && hypervisorType == Hypervisor.HypervisorType.XenServer) { // CS does incremental backup only for XenServer
|
||||
if (parentSnapshotOnPrimaryStore != null && parentSnapshotOnBackupStore != null && hypervisorType == Hypervisor.HypervisorType.XenServer) { // CS does incremental backup only for XenServer
|
||||
|
||||
// In case of volume migration from one pool to other pool, CS should take full snapshot to avoid any issues with delta chain,
|
||||
// to check if this is a migrated volume, compare the current pool id of volume and store_id of oldest snapshot on primary for this volume.
|
||||
|
|
|
|||
Loading…
Reference in New Issue