Skip to content

Conversation

@eduardovra
Copy link
Contributor

Description

This fixes an issue with the listStoragePoolsMetrics command where the capacity threshold flag is being evaluated incorrectly.

Reference issue #11364

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
  • test (unit or integration test code)

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?

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

@boring-cyborg
Copy link

boring-cyborg bot commented Jul 31, 2025

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@DaanHoogland DaanHoogland added this to the 4.19.4 milestone Aug 1, 2025
@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@eduardovra , I think I get what you are trying to fix here and the change makes sense. I do not think it will have the effect you desire though. What you change here is only affecting a response on an API call and not on the behaviour of the system.

@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 15.17%. Comparing base (3850445) to head (7581c82).
⚠️ Report is 4 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../apache/cloudstack/metrics/MetricsServiceImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #11366   +/-   ##
=========================================
  Coverage     15.17%   15.17%           
+ Complexity    11365    11363    -2     
=========================================
  Files          5415     5415           
  Lines        476050   476050           
  Branches      58119    58119           
=========================================
+ Hits          72254    72257    +3     
+ Misses       395710   395708    -2     
+ Partials       8086     8085    -1     
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.90% <0.00%> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

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

@eduardovra
Copy link
Contributor Author

@eduardovra , I think I get what you are trying to fix here and the change makes sense. I do not think it will have the effect you desire though. What you change here is only affecting a response on an API call and not on the behaviour of the system.

Since you've mentioned, is there an API that reports if the system still has capacity to take in new deployments?

@rohityadavcloud
Copy link
Member

@sureshanaparti good to have, if you want to consider for 4.21

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor

@eduardovra , I think I get what you are trying to fix here and the change makes sense. I do not think it will have the effect you desire though. What you change here is only affecting a response on an API call and not on the behaviour of the system.

Since you've mentioned, is there an API that reports if the system still has capacity to take in new deployments?

there is https://cloudstack.apache.org/api/apidocs-4.20/apis/listCapacity.html but I think it just returns the used and available capacities and does not take into account any thresholds. You would have to retrieve those separately.

@sureshanaparti sureshanaparti merged commit de5188e into apache:4.19 Aug 4, 2025
24 of 25 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 4, 2025

Awesome work, congrats on your first merged pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants