cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Fix allocation of VMs with multiple clusters

Open BryanMLima opened this issue 1 year ago • 8 comments

Description

This PR fixes a scenario where if the first cluster verified by ACS does not have any compatible hosts, an exception is thrown, ignoring the verification of possible compatible hosts in other clusters.

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] 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

Feature/Enhancement Scale or Bug Severity

Bug Severity

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

Screenshots (if appropriate):

How Has This Been Tested?

  • Cluster 1: Host A
  • Cluster 2: Host B

Using the environment above, I added the flexible host tag false to Host A, and tried to deploy a VM; which would always result on an incompatible host for Cluster 1. Prior to this patch, the CloudRuntimeException is thrown with the message No suitable host found for vm [...]. and Host B is not verified.

After applying this patch, the message No suitable host found for VM [%s] in %s. is still logged, however, Host B is verified for compatibility and the VM is deployed as expected.

How did you try to break this feature and the system with this change?

BryanMLima avatar Feb 05 '24 13:02 BryanMLima

@BryanMLima target to main or 4.18/4.19 ?

weizhouapache avatar Feb 05 '24 13:02 weizhouapache

@BryanMLima target to main or 4.18/4.19 ?

Thanks, I rebased to 4.19 as the problem arose from PR #7489.

BryanMLima avatar Feb 05 '24 14:02 BryanMLima

@blueorangutan package

BryanMLima avatar Feb 05 '24 14:02 BryanMLima

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

blueorangutan avatar Feb 05 '24 14:02 blueorangutan

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c795547) 20.99% compared to head (710c848) 4.38%. Report is 16 commits behind head on 4.19.

:exclamation: Current head 710c848 differs from pull request most recent head 6676a4b. Consider uploading reports for the commit 6676a4b to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #8611       +/-   ##
============================================
- Coverage     20.99%   4.38%   -16.62%     
============================================
  Files          4849     361     -4488     
  Lines        324441   28700   -295741     
  Branches      45573    5004    -40569     
============================================
- Hits          68121    1258    -66863     
+ Misses       246563   27303   -219260     
+ Partials       9757     139     -9618     
Flag Coverage Δ
simulator-marvin-tests ?
uitests 4.38% <ø> (?)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 05 '24 15:02 codecov[bot]

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

blueorangutan avatar Feb 05 '24 15:02 blueorangutan

@blueorangutan test

DaanHoogland avatar Feb 06 '24 10:02 DaanHoogland

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

blueorangutan avatar Feb 06 '24 10:02 blueorangutan

@blueorangutan package

BryanMLima avatar Feb 29 '24 17:02 BryanMLima

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

blueorangutan avatar Feb 29 '24 17:02 blueorangutan

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

blueorangutan avatar Feb 29 '24 18:02 blueorangutan

@blueorangutan test

DaanHoogland avatar Mar 04 '24 10:03 DaanHoogland

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

blueorangutan avatar Mar 04 '24 10:03 blueorangutan

[SF] Trillian test result (tid-9375) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 47115 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8611-t9375-kvm-centos7.zip Smoke tests completed. 128 look OK, 1 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.69 test_safe_shutdown.py

blueorangutan avatar Mar 04 '24 23:03 blueorangutan

@blueorangutan package

BryanMLima avatar May 22 '24 14:05 BryanMLima

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

blueorangutan avatar May 22 '24 14:05 blueorangutan

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

blueorangutan avatar May 22 '24 15:05 blueorangutan