Skip to content

Commit 636867e

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

2 files changed

Lines changed: 15 additions & 1 deletion

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: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,6 +1636,17 @@ public SnapshotInfo takeSnapshot(VolumeInfo volume) throws ResourceAllocationExc
16361636
StoragePoolType poolType = volume.getStoragePoolType();
16371637
boolean isClvmNgIncrementalCandidate = StoragePoolType.CLVM_NG == poolType
16381638
&& kvmIncrementalSnapshot.valueIn(clusterId);
1639+
1640+
// CLVM-NG incremental snapshots are not supported in this release.
1641+
// Warn and fall back to a full snapshot so the job still succeeds.
1642+
if (isClvmNgIncrementalCandidate) {
1643+
logger.warn("Incremental snapshots are not supported for CLVM-NG storage pools in this release. " +
1644+
"Falling back to a full snapshot for volume [{}]. " +
1645+
"Please disable the '{}' setting for CLVM-NG clusters.",
1646+
volume.getUuid(), kvmIncrementalSnapshot.key());
1647+
isClvmNgIncrementalCandidate = false;
1648+
}
1649+
16391650
if ((isKvmAndFileBasedStorage || isClvmNgIncrementalCandidate) && backupSnapToSecondary) {
16401651
DataStore imageStore = snapshotSrv.findSnapshotImageStore(snapshot);
16411652
if (imageStore == null) {
@@ -1860,7 +1871,8 @@ private void updateSnapshotPayload(long storagePoolId, CreateSnapshotPayload pay
18601871
payload.setLocationType(null);
18611872
}
18621873

1863-
if ((isKvmAndFileBasedStorage || StoragePoolType.CLVM_NG == poolType) && kvmIncrementalSnapshot.valueIn(clusterId)) {
1874+
// CLVM_NG excluded: incremental snapshots not supported in this release (handled in takeSnapshot).
1875+
if (isKvmAndFileBasedStorage && kvmIncrementalSnapshot.valueIn(clusterId)) {
18641876
payload.setKvmIncrementalSnapshot(true);
18651877
}
18661878
}

0 commit comments

Comments
 (0)