| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## 4.18 #7615 +/- ##
============================================
+ Coverage 13.02% 13.04% +0.02%
- Complexity 9026 9054 +28
============================================
Files 2719 2720 +1
Lines 256867 257067 +200
Branches 40051 40088 +37
============================================
+ Hits 33445 33534 +89
- Misses 219233 219339 +106
- Partials 4189 4194 +5
... and 34 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sorry, something went wrong.
|
thanks @gpordeus for the fix (or enhancement even) . |
Sorry, something went wrong.
|
is it applicable for 4.18 ? |
Sorry, something went wrong.
@DaanHoogland I have added the integration test.
@weizhouapache Yes |
Sorry, something went wrong.
There was a problem hiding this comment.
test code looks good, but uses some out of date constructs. suggestions added.
Sorry, something went wrong.
good work, i left some comments, but nothing serious.
can you rebase the change on the 4.18 branch than? |
Sorry, something went wrong.
|
@gpordeus all of a sudden all kinds of unrelated files are changed in your PR. Can you have a look? |
Sorry, something went wrong.
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
Sorry, something went wrong.
|
@weizhouapache a [SF] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests |
Sorry, something went wrong.
|
[SF] Trillian test result (tid-7536)
|
Sorry, something went wrong.
|
[SF] Trillian test result (tid-7537)
|
Sorry, something went wrong.
|
@gpordeus
the qcow2 image does not have a backing file # qemu-img info -U /mnt/c2876c2e-5312-3cf9-b332-64d597086dc9/1a6593ad-8d02-4b10-a520-3eeefb336b13
image: /mnt/c2876c2e-5312-3cf9-b332-64d597086dc9/1a6593ad-8d02-4b10-a520-3eeefb336b13
file format: qcow2
virtual size: 50 MiB (52428800 bytes)
disk size: 1.06 MiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: false
image of vm B does not have backing file either, but it works (the disk size is much bigger than vm A) # qemu-img info -U /mnt/c2876c2e-5312-3cf9-b332-64d597086dc9/408948d1-cedd-4de4-87a9-311501343000
image: /mnt/c2876c2e-5312-3cf9-b332-64d597086dc9/408948d1-cedd-4de4-87a9-311501343000
file format: qcow2
virtual size: 50 MiB (52428800 bytes)
disk size: 41.6 MiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: false
|
Sorry, something went wrong.
|
@DaanHoogland @rohityadavcloud @gpordeus my summary: if template is removed, Before this PR,
With this PR:
I would rather get an NPE exception than vm corruption , as data loss is a more critical issue for users. |
Sorry, something went wrong.
There was a problem hiding this comment.
@gpordeus
can you please fix the vm corruption issue in our testing ?
Sorry, something went wrong.
|
moved to 4.18.2.0 |
Sorry, something went wrong.
@weizhouapache Great, thank you for testing and for pointing out the disk size. I hadn't been able to replicate it before last week because I was testing from and to iSCSI and NFS storages, while this error only happens in NFS to NFS.
Yes, I agree and I'm already working on it. The problem is a flag that is passed to libvirt migration only when it's NFS to NFS, for some reason, which makes it so that only the last layer of the vm is copied and, since the template was deleted and wasn't copied first, it corrupts them. Getting rid of the flag makes it work, but I'm testing if there are any other side effects or if there is a better way of going about it. |
Sorry, something went wrong.
|
@gpordeus any progress? can we add this to 4.19? |
Sorry, something went wrong.
@DaanHoogland Sorry for the delay, it's being a little trickier than I anticipated. It won't take much longer, but not enough to make it to 4.19. |
Sorry, something went wrong.
|
@gpordeus when you get to this, will it include a fix for #5759 ? |
Sorry, something went wrong.
|
@gpordeus should we still try to merge this? (as 4.18 is coming to end of maintemnance) |
Sorry, something went wrong.
@DaanHoogland I suppose not, especially with #8911. I'm closing this, but I'll still be working on #5759. I was sidetracked, but I'll give it priority now. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
If you try to migrate a VM with volume and its template was removed, it results in a NullPointerException and the migration doesn't occur.
If the template is already in both pools, the NPE happens in getVolumeBackingFile, when _vmTemplateDao.findById() returns null and it then tries to call from it. The fix was to check if it is null (and since it can only be null if it was removed, since srcVolumeInfo has templateId) and return null so it does a FullClone Migration.
If the template is not in both pools, the NPE happens in copyTemplateToTargetFilesystemStorageIfNeeded, when TemplateObjectTO tries to getInstallPath() on a null object. The fix was the same, check if findById() returns null and, if so, don't copy it.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
All migrations were successful.