rg9975 commented on code in PR #7889:
URL: https://github.com/apache/cloudstack/pull/7889#discussion_r1374808883
##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java:
##########
@@ -1685,13 +1777,17 @@ private CopyCmdAnswer copyImageToVolume(DataObject
srcDataObject, VolumeInfo des
* resign the SR and the VDI that should be inside of the snapshot before
copying the VHD file to secondary storage.
*/
private void createVolumeFromSnapshot(SnapshotInfo snapshotInfo) {
- SnapshotDetailsVO snapshotDetails =
handleSnapshotDetails(snapshotInfo.getId(), "create");
-
- try {
-
snapshotInfo.getDataStore().getDriver().createAsync(snapshotInfo.getDataStore(),
snapshotInfo, null);
- }
- finally {
- _snapshotDetailsDao.remove(snapshotDetails.getId());
+ if
("true".equalsIgnoreCase(snapshotInfo.getDataStore().getDriver().getCapabilities().get("CAN_CREATE_TEMP_VOLUME_FROM_SNAPSHOT")))
{
+ prepTempVolumeForCopyFromSnapshot(snapshotInfo);
+ // fallback to original behavior of sending magic ddata to the create
function
Review Comment:
Updated in upcoming commit.
--
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]