Skip to content

Conversation

@abh1sar
Copy link
Collaborator

@abh1sar abh1sar commented Dec 3, 2025

Description

This PR fixes #11937

When a primary storage is added to a Datastore cluster, the op_host_capacity table contains entries for both the Primary storage and the Datastore cluster. ListCapacity counts the allocated capacity twice because of this.
Fix is to skip any storage pool that has children from capacity calculation.

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?

Primary storage ...pri2 is added to Datastore Cluster DC1.

Screenshot 2025-12-03 at 5 44 15 PM Screenshot 2025-12-03 at 5 59 15 PM

Before Fix :
Screenshot 2025-12-03 at 2 44 01 PM

After Fix :
Screenshot 2025-12-03 at 6 05 02 PM

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

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.17%. Comparing base (028dd86) to head (a3daddb).
⚠️ Report is 4 commits behind head on 4.20.

Files with missing lines Patch % Lines
...n/java/com/cloud/capacity/dao/CapacityDaoImpl.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12181      +/-   ##
============================================
- Coverage     16.18%   16.17%   -0.01%     
  Complexity    13298    13298              
============================================
  Files          5657     5657              
  Lines        498470   498482      +12     
  Branches      60493    60501       +8     
============================================
- Hits          80660    80652       -8     
- Misses       408830   408852      +22     
+ Partials       8980     8978       -2     
Flag Coverage Δ
uitests 4.00% <ø> (-0.01%) ⬇️
unittests 17.03% <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.

@DaanHoogland
Copy link
Contributor

@blueorangutan package

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

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test ol9 vmware-80u3e

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol9 mgmt + vmware-80u3e) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-14907)

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.

3 participants