-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
migrateVolume does not copy the template #5759
Comments
is this what you are fixing in #5758, @GutoVeronezi ? or do you mean that more improvement is needed after that? |
@DaanHoogland it will need more improvement after that. |
Hi @GutoVeronezi are you working on this issue or planning to? |
Hi, @nvazquez, I have other priorities at the moment, this issue is not in my plannings for now. |
Thanks for clarifying @GutoVeronezi |
Moving this to next milestone |
I've hit this @GutoVeronezi for local storage (but not shared storage). Did you reproduce this only for KVM + local storage (or any other hypervisor/storage type)? |
@rohityadavcloud, at the time I created this issue, I was running ACS with 4.15 or 4.16 (I do not remember quite well). I will test it again and verify if the situation still happens with the current version. |
@rohityadavcloud @GutoVeronezi The migrateVolume will firstly copy the image to secondary storage (full clone) and then copy to another primary storage. The whole process can be improved of course. |
Thanks for the tests, @weizhouapache. |
@GutoVeronezi |
@weizhouapache there are some issues; cc @DaanHoogland @GutoVeronezi
root@kvm1:/var/lib/libvirt/images# qemu-img info f9a311bb-509c-4f01-ad55-29eb8ff6166a
root@kvm2:/var/lib/libvirt/images# qemu-img info 6b4add3f-9014-4c76-ae45-cb19f830c3be
root@kvm1:/var/lib/libvirt/images# qemu-img info f919f5e7-eee8-4a64-ac6f-a4361dfcaa1b
2023-07-10 19:17:42,074 WARN [cloud.agent.Agent] (agentRequest-Handler-2:null) (logid:22f93a95) Caught: I think in #4 when/if it fails, it's because somehow it's trying to use/find the local storage pool on the dest. host which does not exist. |
I suppose the primarily issue seems to be when during offline migration, the backing file information is lost as the KVM local storage/root disk(s) are melded in a way it no longer needs the template. In edge cases, the VM migration can crash the running VM when on the destination host when for whatever reason it find the domain isn't running. We need perhaps a round of investigation/reproduction, and if possible (a) avoid using secondary storage for offline local storage migration (or document the behaviour) and (b) backing file context isn't lost. /cc @weizhouapache @DaanHoogland |
this might be related to #7615 |
@GutoVeronezi |
@rohityadavcloud @weizhouapache Considering that the migration consolidates the volume and template (at least when using KVM), I think now that it makes sense not copying the template when migrating the volume, as the migrated volume will already contain the template data. However, we should do some tests to pinpoint use cases that could be affected by this behavior or are not working as expected.
Unfortunately, I will not be able to dedicate my efforts to this right now. @gpordeus, as you are already working on #7615, could take a look at this? |
@GutoVeronezi Yes, I'm now available. I'll assemble a use case table, test it and share the results as soon as they are ready. |
moved to 4.18.2.0 |
Is this fixed ? |
@gpordeus (cc @GutoVeronezi ) is work going on on this? |
When a volume is copied to another storage pool, if the template does not exist in the destination storage pool yet, it should be copied. The API
migrateVirtualMachineWithVolume
already does it; however, when migrating the volume withmigrateVolume
(VM stopped), the template is not copied, which causes inconsistencies in the database and primary storage systems.The text was updated successfully, but these errors were encountered: