GutoVeronezi commented on a change in pull request #5297:
URL: https://github.com/apache/cloudstack/pull/5297#discussion_r818671764
##########
File path: scripts/storage/qcow2/managesnapshot.sh
##########
@@ -226,34 +226,10 @@ backup_snapshot() {
return 2
fi
elif [ -f ${disk} ]; then
- # Does the snapshot exist?
- qemuimg_ret=$($qemu_img snapshot $forceShareFlag -l $disk 2>&1)
- ret_code=$?
- if [ $ret_code -gt 0 ] && [[ $qemuimg_ret == *"snapshot: invalid option --
'U'"* ]]
- then
- forceShareFlag=""
- qemuimg_ret=$($qemu_img snapshot $forceShareFlag -l $disk)
- ret_code=$?
- fi
- if [ $ret_code -gt 0 ] || [[ ! $qemuimg_ret == *"$snapshotname"* ]]
- then
- printf "there is no $snapshotname on disk $disk\n" >&2
- return 1
- fi
- qemuimg_ret=$($qemu_img convert $forceShareFlag -f qcow2 -O qcow2 -l
snapshot.name=$snapshotname $disk $destPath/$destName 2>&1 > /dev/null)
+ cp "$disk" "${destPath}/${destName}"
Review comment:
If you check the snapshot creation workflow, it creates a delta of the
disk, copies it to another folder and then `blockcommit` the delta with the
original file. This way, we only have a single file, which will be copied to
the secondary storage later. If you look at the whole snapshot workflow, you
will notice that there is no need to convert the image to another format.
--
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]