Skip to content

Fix for VMware VM migration with volume in local storage - #6483

Merged
sureshanaparti merged 6 commits into
4.17from
VMwareVMMigrationWithVolumeInLocalStorage
Jul 1, 2022
Merged

sureshanaparti merged 6 commits into
4.17from
VMwareVMMigrationWithVolumeInLocalStorage

Conversation

@harikrishna-patnala

@harikrishna-patnala harikrishna-patnala commented Jun 22, 2022

Copy link
Copy Markdown
Member

Description

This PR fixes issue #6270 where VMmigration along with volumes API fails in case of local storage in VMware.

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)
  • 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
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  1. Create a VM with root disk and data disk, make sure disks are created in local storage
  2. Stop the VM
  3. From UI/API migrate the VM along with disks to a different local storage.
  4. Migration is successful after this fix.

@acs-robot

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

1 similar comment
@blueorangutan

Copy link
Copy Markdown

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

@harikrishna-patnala
harikrishna-patnala force-pushed the VMwareVMMigrationWithVolumeInLocalStorage branch from be57f6a to a1cbe0f Compare June 22, 2022 06:37
@yadvr

yadvr commented Jun 22, 2022

Copy link
Copy Markdown
Member

Thanks @harikrishna-patnala for the bugfix PR, should this be raised for 4.17 branch?

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6483 (SL-JID-1806)

@blueorangutan

Copy link
Copy Markdown

UI build: ✖️
(SL-JID-10)

@harikrishna-patnala
harikrishna-patnala force-pushed the VMwareVMMigrationWithVolumeInLocalStorage branch from a1cbe0f to 50ca91a Compare June 22, 2022 07:20
@harikrishna-patnala

Copy link
Copy Markdown
Member Author

Thanks @harikrishna-patnala for the bugfix PR, should this be raised for 4.17 branch?

Yes @rohityadavcloud , changed the base branch to 4.17. Thanks

@harikrishna-patnala harikrishna-patnala added this to the 4.17.1.0 milestone Jun 22, 2022

@shwstppr shwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm, one minor comment

Comment on lines +1078 to +1087
for (Map.Entry<Volume, StoragePool> entry : volumeToPool.entrySet()) {
Volume volume = entry.getKey();
StoragePool pool = entry.getValue();
if (volume.getVolumeType().equals(Volume.Type.ROOT) && pool.isLocal()) {
List<StoragePoolHostVO> storagePoolHostVOs = storagePoolHostDao.listByPoolId(pool.getId());
StoragePoolHostVO storagePoolHostVO = storagePoolHostVOs.get(0);
HostVO hostVO = _hostDao.findById(storagePoolHostVO.getHostId());
hostGuidInTargetCluster = hostVO.getGuid();
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harikrishna-patnala do we need to continue traversing through all entries, we can return the first found?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @shwstppr, added a break. Thanks.

@shwstppr

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@shwstppr 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

Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3626

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 8

@harikrishna-patnala

Copy link
Copy Markdown
Member Author

Addressed the review comments @sureshanaparti, please review

@acs-robot

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6483 (SL-JID-1849)

@sureshanaparti sureshanaparti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@DaanHoogland

Copy link
Copy Markdown
Contributor

SonarCloud Quality Gate failed. Quality Gate failed

Bug A 0 Bugs Vulnerability A 0 Vulnerabilities Security Hotspot A 0 Security Hotspots Code Smell A 2 Code Smells

0.0% 0.0% Coverage 0.0% 0.0% Duplication

please have a look at those @harikrishna-patnala , they make sense.

@acs-robot

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6483 (SL-JID-1860)

@acs-robot

Copy link
Copy Markdown

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

@acs-robot

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6483 (SL-JID-1862)

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti 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

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3663

@sonarqubecloud

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

private String getTargetHostGuid(StoragePool targetLocalPoolForVM, Long destClusterId, boolean isInterClusterMigration) {
String targetHostGuid = null;
if (targetLocalPoolForVM != null) {
// Get the target host for local storage migration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😁 this comment says kind of exactly what the code line below says as well. not sure we need it, but hey ...

@yadvr

yadvr commented Jun 30, 2022

Copy link
Copy Markdown
Member

@blueorangutan test centos7 vmware-67u3

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-4409)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39824 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6483-t4409-vmware-67u3.zip
Smoke tests completed. 98 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@sureshanaparti

Copy link
Copy Markdown
Contributor

Merging this based on the approvals, and test results.

@sureshanaparti
sureshanaparti merged commit 637a102 into 4.17 Jul 1, 2022
@DaanHoogland
DaanHoogland deleted the VMwareVMMigrationWithVolumeInLocalStorage branch March 14, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants