slavkap commented on code in PR #8575:
URL: https://github.com/apache/cloudstack/pull/8575#discussion_r1500316315
##########
plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/datastore/driver/StorPoolPrimaryDataStoreDriver.java:
##########
@@ -632,22 +590,17 @@ public void copyAsync(DataObject srcData, DataObject
dstData, AsyncCompletionCal
err = String.format("Could not create Storpool volume
for CS template %s. Error: %s", name, resp.getError());
} else {
String volumeNameToSnapshot =
StorPoolUtil.getNameFromResponse(resp, true);
- SpApiResponse resp2 =
StorPoolUtil.volumeFreeze(volumeNameToSnapshot, conn);
- if (resp2.getError() != null) {
- err = String.format("Could not freeze Storpool
volume %s. Error: %s", name, resp2.getError());
- } else {
- StorPoolUtil.spLog("Storpool snapshot [%s] for a
template exists. Creating template on Storpool with name [%s]",
tinfo.getUuid(), name);
- TemplateObjectTO dstTO = (TemplateObjectTO)
dstData.getTO();
-
dstTO.setPath(StorPoolUtil.devPath(StorPoolUtil.getNameFromResponse(resp,
false)));
- dstTO.setSize(size);
- answer = new CopyCmdAnswer(dstTO);
- }
+ TemplateObjectTO dstTO = (TemplateObjectTO)
dstData.getTO();
+
+ answer = createVolumeSnapshot(cmd, size, conn,
volumeNameToSnapshot, dstTO);
Review Comment:
@sureshanaparti, yes, we should delete the volume regardless of the result
--
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]