cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Fix ordering of secondary storages with the algorithm `firstfitleastconsumed`

Open GaOrtiga opened this issue 1 year ago • 22 comments

The algorithm firstfitleastconsumed orders the secondary storages based on how much free capacity each has and returns the first item of the list that has enough free capacity. However, the ordering of this list is inverted, putting the storages with the least free capacity at the top.

This behaviour has been adjusted, altering the order of the list to guarantee that the secondary storages with the most free capacity get allocated first.

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

Feature/Enhancement Scale

  • [ ] Major
  • [ ] Minor

Bug Severity

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

GaOrtiga avatar Jan 23 '24 18:01 GaOrtiga

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 15.46%. Comparing base (3a0c312) to head (2032c78). Report is 36 commits behind head on main.

Files Patch % Lines
...e/image/manager/ImageStoreProviderManagerImpl.java 0.00% 11 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8557      +/-   ##
============================================
+ Coverage     15.42%   15.46%   +0.03%     
- Complexity    11818    11819       +1     
============================================
  Files          5474     5476       +2     
  Lines        478602   479855    +1253     
  Branches      62097    59002    -3095     
============================================
+ Hits          73823    74188     +365     
- Misses       396649   397511     +862     
- Partials       8130     8156      +26     
Flag Coverage Δ
uitests 4.89% <ø> (+0.70%) :arrow_up:
unittests 16.18% <0.00%> (+<0.01%) :arrow_up:

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 Jan 24 '24 04:01 codecov[bot]

@blueorangutan package

sureshanaparti avatar Jan 24 '24 06:01 sureshanaparti

@sureshanaparti 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 Jan 24 '24 06:01 blueorangutan

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

blueorangutan avatar Jan 24 '24 07:01 blueorangutan

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

github-actions[bot] avatar Feb 08 '24 13:02 github-actions[bot]

@blueorangutan package

GaOrtiga avatar Mar 01 '24 17:03 GaOrtiga

@GaOrtiga 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 Mar 01 '24 17:03 blueorangutan

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

blueorangutan avatar Mar 01 '24 18:03 blueorangutan

@sureshanaparti is this ok now? do we need more testing?

DaanHoogland avatar Mar 04 '24 10:03 DaanHoogland

@blueorangutan package

JoaoJandre avatar Apr 16 '24 12:04 JoaoJandre

@JoaoJandre 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 Apr 16 '24 12:04 blueorangutan

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

blueorangutan avatar Apr 16 '24 14:04 blueorangutan

@DaanHoogland @sureshanaparti @rohityadavcloud @shwstppr could we run the CI here?

JoaoJandre avatar Apr 16 '24 14:04 JoaoJandre

ping @sureshanaparti

DaanHoogland avatar Apr 16 '24 15:04 DaanHoogland

@sureshanaparti could you trigger the CI here? cc @DaanHoogland

BryanMLima avatar Apr 24 '24 13:04 BryanMLima

@sureshanaparti could you trigger the CI here? cc @DaanHoogland

sorry @BryanMLima , our lab is a bit tired at the moment. I first wanted to hear from @sureshanaparti if he is alright with the current state of the PR

DaanHoogland avatar Apr 25 '24 06:04 DaanHoogland

@blueorangutan test

DaanHoogland avatar Apr 25 '24 06:04 DaanHoogland

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

blueorangutan avatar Apr 25 '24 06:04 blueorangutan

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

Test Result Time (s) Test File
test_01_events_resource Error 312.05 test_events_resource.py
test_01_events_resource Error 312.06 test_events_resource.py
test_04_deploy_vm_for_other_user_and_test_vm_operations Failure 94.86 test_network_permissions.py
ContextSuite context=TestNetworkPermissions>:teardown Error 1.50 test_network_permissions.py
test_hostha_enable_ha_when_host_disabled Error 4.99 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 304.10 test_hostha_kvm.py

blueorangutan avatar Apr 25 '24 21:04 blueorangutan

@DaanHoogland @sureshanaparti, could you trigger the CI here?

BryanMLima avatar Jun 12 '24 18:06 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 Jun 25 '24 14:06 github-actions[bot]

@BryanMLima @GaOrtiga pls resolve the conflicts. thanks.

sureshanaparti avatar Jun 25 '24 15:06 sureshanaparti

@blueorangutan package

JoaoJandre avatar Jul 24 '24 12:07 JoaoJandre

@JoaoJandre 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 Jul 24 '24 12:07 blueorangutan

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

blueorangutan avatar Jul 24 '24 15:07 blueorangutan

@blueorangutan package

JoaoJandre avatar Aug 13 '24 19:08 JoaoJandre

@JoaoJandre 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 Aug 13 '24 19:08 blueorangutan

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 10639

blueorangutan avatar Aug 13 '24 20:08 blueorangutan

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 10657

blueorangutan avatar Aug 14 '24 14:08 blueorangutan