Skip to content

Commit 8afce02

Browse files
authored
Merge pull request #133
CSTACKEX-362:ONTAP NFS snapshot of detached volume is incorrectly processed as an image-store snapshot
2 parents fc7c2e0 + 41669ac commit 8afce02

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,20 +1775,18 @@ private void postSnapshotDirectlyToSecondary(SnapshotInfo snapshot, SnapshotInfo
17751775
}
17761776

17771777
/**
1778-
* Returns true when a volume snapshot on NetApp ONTAP is explicitly kept on managed primary/array storage.
1778+
* Returns true for volume snapshots on NetApp ONTAP managed primary/array storage.
17791779
*
1780-
* <p>For ONTAP managed pools, {@link #updateSnapshotPayload} defaults {@code locationType} to
1781-
* {@link Snapshot.LocationType#PRIMARY}. ONTAP volume snapshots therefore stay on the FlexVol
1782-
* on primary — they are not moved or mirrored to secondary storage. The primary
1783-
* {@code snapshot_data_store} row must remain so volume-snapshot DELETE uses
1784-
* {@code StorageSystemSnapshotStrategy} and the primary datastore driver.</p>
1780+
* <p>ONTAP volume snapshots stay on the FlexVol on primary — they are not moved or
1781+
* mirrored to secondary storage. The primary {@code snapshot_data_store} row must
1782+
* remain so volume-snapshot DELETE uses {@code StorageSystemSnapshotStrategy} and
1783+
* the primary datastore driver.</p>
17851784
*
17861785
* <p>Other managed storage providers are not affected by this check.</p>
17871786
*/
17881787
private boolean isManagedPrimaryLocationSnapshot(StoragePool storagePool, CreateSnapshotPayload payload) {
17891788
return storagePool != null && storagePool.isManaged()
1790-
&& DataStoreProvider.ONTAP_PLUGIN_NAME.equals(storagePool.getStorageProviderName())
1791-
&& Snapshot.LocationType.PRIMARY.equals(payload.getLocationType());
1789+
&& DataStoreProvider.ONTAP_PLUGIN_NAME.equals(storagePool.getStorageProviderName());
17921790
}
17931791

17941792
@Override

0 commit comments

Comments
 (0)