sureshanaparti commented on code in PR #11490:
URL: https://github.com/apache/cloudstack/pull/11490#discussion_r2291588233
##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -579,19 +579,18 @@ public VolumeInfo createVolumeFromSnapshot(Volume volume,
Snapshot snapshot, Use
VolumeInfo vol = volFactory.getVolume(volume.getId());
long zoneId = volume.getDataCenterId();
DataStore store = dataStoreMgr.getDataStore(pool.getId(),
DataStoreRole.Primary);
- DataStoreRole dataStoreRole =
snapshotHelper.getDataStoreRole(snapshot);
+ DataStoreRole dataStoreRole =
snapshotHelper.getDataStoreRole(snapshot, zoneId);
SnapshotInfo snapInfo =
snapshotFactory.getSnapshotWithRoleAndZone(snapshot.getId(), dataStoreRole,
zoneId);
- boolean kvmSnapshotOnlyInPrimaryStorage =
snapshotHelper.isKvmSnapshotOnlyInPrimaryStorage(snapshot, dataStoreRole);
+ boolean kvmSnapshotOnlyInPrimaryStorage =
snapshotHelper.isKvmSnapshotOnlyInPrimaryStorage(snapshot, dataStoreRole,
zoneId);
logger.debug("Creating volume from snapshot, with dataStore role {}
and on primary storage: {}", dataStoreRole, kvmSnapshotOnlyInPrimaryStorage);
boolean storageSupportSnapshotToTemplateEnabled =
snapshotHelper.isStorageSupportSnapshotToTemplate(snapInfo);
Review Comment:
```suggestion
boolean storageSupportSnapshotToTemplateEnabled =
snapshotHelper.isStorageSupportSnapshotToTemplate(snapInfo);
// storageSupportSnapshotToTemplateEnabled is true only for StorPool
now [TODO: Update to check storage supports snapshot to volume
(DataStoreCapabilities.CAN_CREATE_VOLUME_FROM_SNAPSHOT) - may impact other
storages, or check for StorPool storage type only]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]