cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Add live migration of system VMs

Open BryanMLima opened this issue 2 years ago • 36 comments

Description

Currently, there is no way to migrate running system VMs with volumes; this means, we cannot move their volumes to a new storage pool in runtime. This PR aims to add this feature by altering the behavior of the migrateVirtualMachineWithVolume API to support system VMs. Furthermore, the listVolumes API was changed to also return system VMs root volumes, to provide easy access to the system VMs volume's UUID to the root admins. Moreover, it was added unit test for MigrateVirtualMachineWithVolumeCmd class.

Furthermore, the changes made by this feature required some tweaking in the UI as the system VM's volumes were now available. When these volumes were accessed, the path led to /vm/<vm-uuid>. However, ACS has a different path to VRs and system VMs resulting in a 404 page. This bug was fixed with the new changes; moreover, it was added a Volumes tab to system VMs and VRs as well.

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [x] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

VR volume's tab:
image

System volume's tab: image

How Has This Been Tested?

This was tested on a local lab through CloudMonkey, using the command migrate virtualmachinewithvolume with the UUID of a system VM and migrating its volume to another storage pool. The command ran as expected. Furthermore, it was added unit test to verify the API behavior.

For the UI, I tried to access the volumes of system VMs and VRs as well as the volumes of user VMs to check if nothing was broken. I did not find any errors.

BryanMLima avatar Jun 23 '22 16:06 BryanMLima

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Jun 23 '22 16:06 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Jun 23 '22 16:06 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6491 (SL-JID-1828)

blueorangutan avatar Jun 23 '22 16:06 blueorangutan

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Jun 27 '22 18:06 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Jun 27 '22 18:06 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6491 (SL-JID-1856)

blueorangutan avatar Jun 27 '22 18:06 blueorangutan

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Jun 29 '22 18:06 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Jun 29 '22 18:06 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6491 (SL-JID-1873)

blueorangutan avatar Jun 29 '22 18:06 blueorangutan

@GabrielBrascher @RodrigoDLopez are your concerns all met?

DaanHoogland avatar Aug 02 '22 06:08 DaanHoogland

@GabrielBrascher @RodrigoDLopez are your concerns all met?

Yes, I do agree with this proposal. Before I approved this one, I ran some manual tests in a local lab, and everything was good, I think we are good to go.

RodrigoDLopez avatar Aug 02 '22 12:08 RodrigoDLopez

@GabrielBrascher @RodrigoDLopez are your concerns all met?

Yes, I do agree with this proposal. Before I approved this one, I ran some manual tests in a local lab, and everything was good, I think we are good to go.

ah, your approval status is still ¨left review comments¨. I understand you have tested this. Let's wait for @GabrielBrascher 's reply and then merge.

DaanHoogland avatar Aug 03 '22 06:08 DaanHoogland

amend: let's run smoke tests as well; @blueorangutan package

DaanHoogland avatar Aug 03 '22 06:08 DaanHoogland

@DaanHoogland 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.

blueorangutan avatar Aug 03 '22 06:08 blueorangutan

Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3889

blueorangutan avatar Aug 03 '22 07:08 blueorangutan

@blueorangutan package

DaanHoogland avatar Aug 03 '22 14:08 DaanHoogland

@DaanHoogland 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.

blueorangutan avatar Aug 03 '22 14:08 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3895

blueorangutan avatar Aug 03 '22 14:08 blueorangutan

@blueorangutan test matrix

DaanHoogland avatar Aug 04 '22 07:08 DaanHoogland

@DaanHoogland a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

blueorangutan avatar Aug 04 '22 07:08 blueorangutan

@Pearl1594 @rohityadavcloud could you shine your lights on this, please?

DaanHoogland avatar Aug 04 '22 07:08 DaanHoogland

Trillian test result (tid-4614) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 39017 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6491-t4614-kvm-centos7.zip Smoke tests completed. 101 look OK, 0 have errors Only failed tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Aug 04 '22 18:08 blueorangutan

Trillian test result (tid-4613) Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7 Total time taken: 39371 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6491-t4613-xenserver-71.zip Smoke tests completed. 101 look OK, 0 have errors Only failed tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Aug 04 '22 18:08 blueorangutan

Trillian test result (tid-4615) Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7 Total time taken: 39770 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6491-t4615-vmware-65u2.zip Smoke tests completed. 101 look OK, 0 have errors Only failed tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Aug 04 '22 19:08 blueorangutan

Hey @DaanHoogland, could you take a look on this one again? I think it already has the required number of approvals. EDIT: I will add some changes, to keep the UI consistent.

BryanMLima avatar Aug 30 '22 15:08 BryanMLima

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Sep 01 '22 21:09 github-actions[bot]

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Sep 01 '22 21:09 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Sep 01 '22 21:09 blueorangutan

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Sep 01 '22 21:09 acs-robot