slavkap commented on code in PR #9270:
URL: https://github.com/apache/cloudstack/pull/9270#discussion_r1728856189
##########
server/src/main/java/org/apache/cloudstack/snapshot/SnapshotHelper.java:
##########
@@ -264,4 +264,12 @@ protected Set<Long>
getSnapshotIdsOnlyInPrimaryStorage(long volumeId) {
return snapshotIdsOnlyInPrimaryStorage;
}
+
+ public SnapshotInfo convertSnapshotIfNeeded(SnapshotInfo snapshotInfo) {
+ if (snapshotInfo.getParent() == null) {
Review Comment:
@JoaoJandre, if a snapshot (that has a parent) is copied to a second zone
and create a template from it on that zone when you try to deploy a VM it fails
because the qemu attempts to access the secondary storage of the first zone
> [qemu-img convert -O qcow2 -U --image-opts
driver=qcow2,file.filename=/mnt/b5fc4e51-bfea-36d8-b2db-557f84a9f353/aa60ba30-a8cc-44d7-a603-709a50bac890.qcow2
--bitmaps
/mnt/b206833c-4a77-3b14-9de5-3ac91cc6c417/ba4e0f05-12e3-4d10-b051-62cf5264c70f
] encountered the error: [qemu-img: Could not open
'driver=qcow2,file.filename=/mnt/b5fc4e51-bfea-36d8-b2db-557f84a9f353/aa60ba30-a8cc-44d7-a603-709a50bac890.qcow2':
Could not open backing file: Could not open
'/mnt/dc75bca1-2951-366c-88a2-bb4c840b0148/snapshots/2/994/9f53b6b3-4018-4c45-a82b-73f30dc570aa':
No such file or directory].
I'm still exploring this feature but my guess for this issue is that the
copies on the second zone don't have parent ID and aren't converted.
--
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]