Skip to content

Commit c720340

Browse files
author
Pearl Dsilva
committed
fallback to full snapshots for clvm-ng - incremental not supported in 4.23
1 parent 76a5e0a commit c720340

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,11 +2132,13 @@ private SnapshotObjectTO takeIncrementalVolumeSnapshotOfStoppedVm(SnapshotObject
21322132
ObjectUtils.defaultIfNull(secondaryPool, primaryPool));
21332133
try {
21342134
// For CLVM_NG incremental snapshots, validate bitmap before proceeding
2135+
/*
21352136
SnapshotObjectTO bitmapValidationResult = validateClvmNgBitmapAndFallbackIfNeeded(snapshotObjectTO, primaryPool,
21362137
secondaryPool, secondaryPoolUrl, snapshotName, volumeObjectTo, conn, wait);
21372138
if (bitmapValidationResult != null) {
21382139
return bitmapValidationResult;
21392140
}
2141+
*/
21402142

21412143
String vmName = String.format("DUMMY-VM-%s", snapshotName);
21422144

server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,9 +1634,8 @@ public SnapshotInfo takeSnapshot(VolumeInfo volume) throws ResourceAllocationExc
16341634
boolean backupSnapToSecondary = isBackupSnapshotToSecondaryForZone(volume.getDataCenterId());
16351635

16361636
StoragePoolType poolType = volume.getStoragePoolType();
1637-
boolean isClvmNgIncrementalCandidate = StoragePoolType.CLVM_NG == poolType
1638-
&& kvmIncrementalSnapshot.valueIn(clusterId);
1639-
if ((isKvmAndFileBasedStorage || isClvmNgIncrementalCandidate) && backupSnapToSecondary) {
1637+
1638+
if ((isKvmAndFileBasedStorage) && backupSnapToSecondary) {
16401639
DataStore imageStore = snapshotSrv.findSnapshotImageStore(snapshot);
16411640
if (imageStore == null) {
16421641
throw new CloudRuntimeException(String.format("Could not find any secondary storage to allocate snapshot [%s].", snapshot));
@@ -1660,7 +1659,7 @@ public SnapshotInfo takeSnapshot(VolumeInfo volume) throws ResourceAllocationExc
16601659
SnapshotInfo snapshotOnPrimary = snapshotStrategy.takeSnapshot(snapshot);
16611660

16621661
if (backupSnapToSecondary) {
1663-
if (!isKvmAndFileBasedStorage && !isClvmNgIncrementalCandidate) {
1662+
if (!isKvmAndFileBasedStorage) {
16641663
backupSnapshotToSecondary(payload.getAsyncBackup(), snapshotStrategy, snapshotOnPrimary, payload.getZoneIds(), payload.getStoragePoolIds());
16651664
if (storagePool.getPoolType() == StoragePoolType.CLVM || storagePool.getPoolType() == StoragePoolType.CLVM_NG) {
16661665
_snapshotStoreDao.removeBySnapshotStore(snapshotId, snapshotOnPrimary.getDataStore().getId(), snapshotOnPrimary.getDataStore().getRole());
@@ -1860,7 +1859,8 @@ private void updateSnapshotPayload(long storagePoolId, CreateSnapshotPayload pay
18601859
payload.setLocationType(null);
18611860
}
18621861

1863-
if ((isKvmAndFileBasedStorage || StoragePoolType.CLVM_NG == poolType) && kvmIncrementalSnapshot.valueIn(clusterId)) {
1862+
// CLVM_NG excluded: incremental snapshots not supported in this release (handled in takeSnapshot).
1863+
if (isKvmAndFileBasedStorage && kvmIncrementalSnapshot.valueIn(clusterId)) {
18641864
payload.setKvmIncrementalSnapshot(true);
18651865
}
18661866
}

0 commit comments

Comments
 (0)