Skip to content

server: fix listing resource limits#12188

Merged
DaanHoogland merged 3 commits intoapache:4.22from
shapeblue:fix-listreslimits
Jan 29, 2026
Merged

server: fix listing resource limits#12188
DaanHoogland merged 3 commits intoapache:4.22from
shapeblue:fix-listreslimits

Conversation

@shwstppr
Copy link
Copy Markdown
Contributor

@shwstppr shwstppr commented Dec 4, 2025

Description

Fixes #12179

Recently behaviour for updating resource limits for account/domain has changed with adding entries only for those types which don't have a default value. This results in listResourceLimits API returning only a single entry for a resource type. This PR fixes the behaviour.

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):

image

How Has This Been Tested?

> list resourcelimits account=d1user domainid=cc2f671f-9702-478b-95cb-9c417f48c9e8 (d1) filter=resourcetypename,tag
{
  "count": 19,
  "resourcelimit": [
    {
      "resourcetypename": "user_vm"
    },
    {
      "resourcetypename": "public_ip"
    },
    {
      "resourcetypename": "volume"
    },
    {
      "resourcetypename": "volume",
      "tag": "t1"
    },
    {
      "resourcetypename": "snapshot"
    },
    {
      "resourcetypename": "template"
    },
    {
      "resourcetypename": "project"
    },
    {
      "resourcetypename": "network"
    },
    {
      "resourcetypename": "vpc"
    },
    {
      "resourcetypename": "cpu"
    },
    {
      "resourcetypename": "memory"
    },
    {
      "resourcetypename": "primary_storage"
    },
    {
      "resourcetypename": "primary_storage",
      "tag": "t1"
    },
    {
      "resourcetypename": "secondary_storage"
    },
    {
      "resourcetypename": "backup"
    },
    {
      "resourcetypename": "backup_storage"
    },
    {
      "resourcetypename": "bucket"
    },
    {
      "resourcetypename": "object_storage"
    },
    {
      "resourcetypename": "gpu"
    }
  ]
}

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

Fixes apache#12179

Recently behaviour for updating resource limits for account/domain has
changed with adding entries only for those types which don't have a
default value. This results in listResourceLimits API returning only a
single entry for a resource type. This PR fixes the behaviour.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Copy Markdown
Contributor Author

shwstppr commented Dec 4, 2025

Will have to check if this is also needed in 4.20 branch
Not needed

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 76.92308% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.59%. Comparing base (4379666) to head (e28ec68).
⚠️ Report is 151 commits behind head on 4.22.

Files with missing lines Patch % Lines
.../cloud/resourcelimit/ResourceLimitManagerImpl.java 76.92% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              4.22   #12188       +/-   ##
============================================
+ Coverage     3.58%   17.59%   +14.01%     
- Complexity       0    15603    +15603     
============================================
  Files          445     5910     +5465     
  Lines        37536   529826   +492290     
  Branches      6905    64726    +57821     
============================================
+ Hits          1346    93240    +91894     
- Misses       36024   426090   +390066     
- Partials       166    10496    +10330     
Flag Coverage Δ
uitests 3.60% <ø> (+0.01%) ⬆️
unittests 18.66% <76.92%> (?)

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 DaanHoogland linked an issue Dec 10, 2025 that may be closed by this pull request
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr shwstppr marked this pull request as ready for review January 20, 2026 06:11
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@apache apache deleted a comment from blueorangutan Jan 20, 2026
@apache apache deleted a comment from blueorangutan Jan 20, 2026
@apache apache deleted a comment from blueorangutan Jan 20, 2026
@shwstppr
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

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

@blueorangutan
Copy link
Copy Markdown

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

@Pearl1594 Pearl1594 added this to the 4.22.1 milestone Jan 28, 2026
@Pearl1594
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_03_deploy_and_scale_kubernetes_cluster Failure 26.86 test_kubernetes_clusters.py

@nvazquez nvazquez self-assigned this Jan 29, 2026
Copy link
Copy Markdown
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

LGTM - Tested OK

  • Tried updating domain limits on tagged resources as in the reported issue: #12179 -> Persisted successfully
Image
  • Updated untagged domain limits successfully

@nvazquez nvazquez removed their assignment Jan 29, 2026
@DaanHoogland DaanHoogland merged commit 3626c51 into apache:4.22 Jan 29, 2026
40 of 43 checks passed
@DaanHoogland DaanHoogland deleted the fix-listreslimits branch January 29, 2026 11:36
sandeeplocharla pushed a commit to NetApp/cloudstack that referenced this pull request Feb 6, 2026
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Configure Primary Storage Tag quota disappear after edit

6 participants