New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix extract snapshot from vm snapshot on kvm #6422
Fix extract snapshot from vm snapshot on kvm #6422
Conversation
@blueorangutan package |
@blueorangutan package |
@nvazquez a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
fi | ||
else | ||
# Backup VM snapshot | ||
qemuimg_ret=$($qemu_img snapshot $forceShareFlag -l $disk 2>&1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GutoVeronezi
can this be replaced with qemu-img -V
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weizhouapache, as this is a fix of PR #5297 (specifically this commit: f5180dd), and I'm only returning the removed code to VM snapshots, I'd rather not refactoring anything right now.
In other hand, this entire script could be removed and the workflow implemented via Java, with documentation and unit tests. We could create an issue to do this in the future. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GutoVeronezi
looks good to me. let's fix the issue now and refactor in next releases.
Kudos, SonarCloud Quality Gate passed! |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3502 |
@blueorangutan test |
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - manually tested on KVM+CentOS7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
Trillian test result (tid-4265)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, manually tested on Rocky
Description
PR #5297 introduced the disk-only snapshot feature for KVM, which changed the whole snapshot workflow for KVM. While taking a volume snapshot and the global setting
snapshot.backup.to.secondary
istrue
, ACS will backup the snapshot from the primary storage to the secondary storage. As the disk-only snapshot process generates an external file, the backup process only copies it to the secondary storage.The extract snapshot from VM snapshot feature uses the same backup workflow to extract the snapshot from the VM directly to the secondary storage. However, as the process was changed to only copy the file, the following error occurs when trying to extract a snapshot from a VM snapshot:
As the VM snapshot is internal, the backup workflow has to be different. This PR address the fix for the situation, by using the previous backup workflow when a snapshot is being extracted from a VM snapshot.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
How Has This Been Tested?
In a local lab I created a VM and took a VM snapshot. With the changes I could extract the VM snapshot and do other operations with it (create volume, create template and so on).
I also took a volume snapshot and tested the operations (create volume, create template and so on).