FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix KVM import and list unmanaged VMs by slavkap · Pull Request #8445 · apache/cloudstack · GitHub

Repository navigation

Fix KVM import and list unmanaged VMs - #8445

Merged
shwstppr merged 2 commits into
apache:mainfrom
storpool:fix-vm-ingestion
Jan 10, 2024
Merged

shwstppr merged 2 commits into
apache:mainfrom
storpool:fix-vm-ingestion

Conversation

slavkap commented Jan 4, 2024 •
edited
Loading

Copy link
Copy Markdown
Contributor

Description

This PR fixes part (issues 2 and3) of #8439 and depends on #8433

1 - Fix of VM insert for VMs with StorPool volumes
2 - Fix of the list/insert unmanaged VMs with RBD volumes

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)
  • build/CI

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

manually tested

codecov Bot commented Jan 4, 2024 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (d6ac91f) 30.74% compared to head (8921119) 22.98%.
Report is 3 commits behind head on main.

Files Patch % Lines
...er/LibvirtGetUnmanagedInstancesCommandWrapper.java 0.00% 11 Missing ⚠️
.../apache/cloudstack/vm/UnmanagedVMsManagerImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8445      +/-   ##
============================================
- Coverage     30.74%   22.98%   -7.77%     
+ Complexity    33930    23732   -10198     
============================================
  Files          5341     5209     -132     
  Lines        374918   352870   -22048     
  Branches      54534    50543    -3991     
============================================
- Hits         115286    81100   -34186     
- Misses       244374   260108   +15734     
+ Partials      15258    11662    -3596     
Flag Coverage Δ
simulator-marvin-tests 24.62% <0.00%> (-0.01%) ⬇️
uitests 4.39% <ø> (ø)
unit-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

shwstppr commented Jan 4, 2024

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

@shwstppr a [SL] 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.

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8202

shwstppr commented Jan 4, 2024

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

@shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

shwstppr added this to the 4.19.0.0 milestone Jan 5, 2024

Copy link
Copy Markdown

[SF] Trillian test result (tid-8725)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 46357 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8445-t8725-kvm-centos7.zip
Smoke tests completed. 119 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_trigger_shutdown Failure 336.70 test_safe_shutdown.py
test_07_deploy_kubernetes_ha_cluster Failure 3611.63 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 42.62 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 90.87 test_kubernetes_clusters.py

pools.addAll(primaryDataStoreDao.listByDataCenterId(zone.getId()));
for (StoragePool pool : pools) {
if (pool.getPath().endsWith(dsName)) {
if (StringUtils.containsAny(pool.getPath(), dsName, dsPath)) {

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

aren't we replacing a bug with a bug here (nitpicking maybe but genuine question)
path.endswith("bla") is different from StringUtils.containsAny(path, "bla", "blob")
considder paths:

  • "bla/blah"
  • "bla/blob"
  • "bla/bleb"
    Neither would match the first condition, and though the first is supposed to match the second condition (as I understand) the other two seem false positives to me.

Am I misinterpreting this @slavkap ?

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Adding to @DaanHoogland's comment, perhaps we can add a condition to keep the current check for non RBD disks? Raising a concern since the Vmware import of unmanaged instances uses the same code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

thanks @DaanHoogland, @nvazquez! I've changed it to check only path vs dsPath. Neither for KVM/VMware we need to check for the datastore name in the primary storage path

pools.addAll(primaryDataStoreDao.listByDataCenterId(zone.getId()));
for (StoragePool pool : pools) {
if (pool.getPath().endsWith(dsName)) {
if (StringUtils.containsAny(pool.getPath(), dsName, dsPath)) {

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Adding to @DaanHoogland's comment, perhaps we can add a condition to keep the current check for non RBD disks? Raising a concern since the Vmware import of unmanaged instances uses the same code

shwstppr commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

@shwstppr a [SL] 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.

1 - Fix of VM insert for VMs with StorPool volumes
2 - Fix of list/insert unmanaged VMs with RBD volumes

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8251

Chech if the pool path contains the datastore path. There is no need to
check for the datastore name because for VMware it get the datastore
UUID which isn't relevant with the primary storage path in CS

nvazquez commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

@nvazquez a [SL] 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.

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8256

nvazquez 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM - tested OK on a mixed Vmware+KVM env and observe no regressions on KVM or Vmware import

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

clgtm and did similar tests to @nvazquez (not well communicated but very well tested.) of course we might have missed some corner cases still. Let's merge however.

shwstppr merged commit c569fe9 into apache:main Jan 10, 2024
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jan 12, 2024
VM import fixes

1 - Fix of VM insert for VMs with StorPool volumes
2 - Fix of list/insert unmanaged VMs with RBD volumes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

5 participants


Back | FazBrowse Home | New Git URL