apache / cloudstack-primate

Primate - modern role-base progressive UI for Apache CloudStack
https://cloudstack.apache.org/
Apache License 2.0
39 stars 37 forks source link

[BUG] Migration of a VM (local storage) stuck on UI #906

Closed GabrielBrascher closed 3 years ago

GabrielBrascher commented 3 years ago

Describe the bug When migrating a VM that is running on local storage the UI hangs on the VM migration pop-up; additionally, it is presented an error on UI and an event Error while migrating VMis created.

When closing the migration tab and refreshing the instance page then it is possible to see that the VM was correctly migrated.

To Reproduce Steps to reproduce the behavior:

  1. Log in as Admin
  2. Migrate a VM
  3. See error message thrown at UI
  4. VM's migration tab hangs while waiting for completing migration (which has already completed)
  5. Close migration pop-up and refresh VM page
  6. Assert that VM was correctly migrated, despite UI saing otherwise at first

Screenshots Example of the VM migration pop-up that stays waiting for migration:

image

shwstppr commented 3 years ago

@GabrielBrascher not completely sure but this PR, https://github.com/apache/cloudstack-primate/pull/789, might solve the issue But changes in the PR also rely on some backend changes which might fail with master

GabrielBrascher commented 3 years ago

Thanks for the hint, @shwstppr.

I am not sure if #789 tackles this issue; from what I understood that PR deals only with stopped VMs being migrated on VMware clusters? Please correct me if I am wrong.

Adding a bit of information here, this issue was created due to tests on live migration of VMs running in KVM with local storage volumes; the migration itself worked fine, except by the fact of UI not dealing with the command response. The problem seems to be related to the UI not dealing with the expected response.

davidjumani commented 3 years ago

@GabrielBrascher Could you share a screenshot of the error as well as the API response ? The form should be frozen while hitting the migrate API and then close since it is async and doesn't have to wait long. It might freeze if the API call returned an error which can be fixed

rohityadavcloud commented 3 years ago

@GabrielBrascher can you check and close against next RC/master?

GabrielBrascher commented 3 years ago

Thanks @rhtyd and @davidjumani for the update, I will check against next master.

rohityadavcloud commented 3 years ago

@GabrielBrascher we're going to cut RC4 later today/tomorrow, can you test before that for possible blockers?

GabrielBrascher commented 3 years ago

@rhtyd @davidjumani It still migrates succesfully on backend but keeps locked on the migration screen with an error message.

image

rohityadavcloud commented 3 years ago

@davidjumani pl check on priority - did you PR introduce any regression?

davidjumani commented 3 years ago

@GabrielBrascher Could you send a screenshot of the API response? @rhtyd Think it might be because migrateVirtualMachineWithVolume was called instead of migrateVirtualMachine since while testing the previous PR there weren't any issues

GabrielBrascher commented 3 years ago

@davidjumani you are right, the command called is migrateVirtualMachineWithVolume; therefore, the response is migratevirtualmachinewithvolumeresponse.

davidjumani commented 3 years ago

@GabrielBrascher Could you try it with https://github.com/apache/cloudstack-primate/pull/913 ?

GabrielBrascher commented 3 years ago

Applying changes from #913 the message is response.migratevirtualmachineresponse is undefined

image

davidjumani commented 3 years ago

@GabrielBrascher Could you try checking again? It's working fine on my end for migrating with volumes as well

GabrielBrascher commented 3 years ago

@davidjumani re-packed my test env and now it works, you are right. Thanks!