@@ -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