-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CLOUDSTACK-8597. Failed to migrate volume from zone-wide to cluster-w… #541
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
Conversation
…ide storage. While live migrating a volume, CS chooses the endpoint to perform the migration by selecting any host that has the storage containing the volume mounted on it. Instead, if the volume is attached to a running VM, the endpoint chosen by CS should be the host that contains the VM.
|
cloudstack-pull-requests #674 SUCCESS |
|
@wilderrodrigues ,
Now in the mentioned issue, say a host that doesn't contain the VM is chosen as the endpoint. As mentioned above, it could happen because today CS chooses any host that has the source storage mounted on it. In that case migration will fail because this host cant see the target datastore. By picking the host containing the volume's VM as endpoint we ensure that both the source and target storage pools are visible to the VM irrespective of the scope of the storage pool. Previously, similar fixes have been made for other operations like volume deletion, snapshot creation because in these cases as well the underlying resource needs the VM of the volume to be visible to the host endpoint. |
|
Hi @likitha I understood what the issue says, but what I really meant concerns what the code does. The only practical change in the code was this: if (volume.getHypervisorType() == Hypervisor.HypervisorType.Hyperv || volume.getHypervisorType() == Hypervisor.HypervisorType.VMware) { Which means that now it will also get in the IF when the Hypervisor is of HypervisorType.VMware type. So, what you really want is: support volume migration from zone-wide to cluster-wide storage when hypervisor is VMware. Is that correct? If you look further at the code, when CS will do DELETEVOLUME, it would take into account only VMware. So, HyperV wouldn't be supported. Cheers, |
|
Yes, now in addition to HyperV, even in case of VMware we want CS to chose the host containing the VM as the endpoint when the storage actions is 'MIGRATEVOLUME'. |
|
LGTM |
|
Hi @likitha And what about DeleteVolume? It now supports only VMware, but the MigrateVolume supports both VMware and HyperV. It would be nice to keep it consistent. I have 2 suggestions:
You got my LGTM based on the explanations you gave. Cheers, |
|
Thanks for taking the time to review @wilderrodrigues. |
Signed-off-by: Rohit Yadav <[email protected]>

…ide storage.
While live migrating a volume, CS chooses the endpoint to perform the migration by selecting any host that has the storage containing the volume mounted on it.
Instead, if the volume is attached to a running VM, the endpoint chosen by CS should be the host that contains the VM.