Skip to content

Conversation

@nvazquez
Copy link
Contributor

@nvazquez nvazquez commented Jan 15, 2026

Description

This PR fixes the updateNetworkOffering API in case the domainid parameter exceeds 255 characters (default String value size), by increasing the parameter size to 4096 characters. UUIDs are 36 characters strings, the PR increases the possible domains from ~7 domains to +100 domains, useful for large environments.

Before the fix (tested with 10 domains):

(localcloud) 🐱 > update networkoffering id=3e34e242-ba35-4a69-a42c-840b582b6ae2 domainid=014c077e-7607-475f-a8c0-e5c09d2d1dfd,10c152f5-6ee6-45ff-88ec-0852d084c5b5,51134a69-dc61-41cc-8c36-8b7f0f2ede12,684d20fe-491b-4667-9c51-4c258d9fd4af,7b42bcde-7348-41e9-99fc-6a86941d12fc,aa330251-65a5-4da1-afe7-6610d50545ef,dc28b4f9-f08a-440a-835a-9ef7910922fa,e049720c-c73a-482e-830e-3a16ab19f992,e42bb23f-026f-4d7e-bbc2-19d02fec0264,f17f96ef-749c-46e8-80b9-36cbbef65eef 
🙈 Error: (HTTP 431, error code 9999) Unable to execute API command updatenetworkoffering due to invalid value. Value greater than max allowed length 255 for param: domainIds

After the fix (same operation succeeded)

Fixes: #12399

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?

@nvazquez nvazquez added this to the 4.20.3 milestone Jan 15, 2026
@nvazquez nvazquez changed the title 420 updatenetworkoffering domainid Fix update network offering domainids size limitation and API response Jan 15, 2026
@nvazquez nvazquez changed the title Fix update network offering domainids size limitation and API response Fix update network offering domainids size limitation Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.23%. Comparing base (aba3285) to head (09acc2a).
⚠️ Report is 1 commits behind head on 4.20.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12431      +/-   ##
============================================
- Coverage     16.23%   16.23%   -0.01%     
+ Complexity    13382    13380       -2     
============================================
  Files          5657     5657              
  Lines        498997   498997              
  Branches      60566    60566              
============================================
- Hits          81032    81030       -2     
- Misses       408929   408931       +2     
  Partials       9036     9036              
Flag Coverage Δ
uitests 4.03% <ø> (ø)
unittests 17.09% <ø> (-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.

@abh1sar
Copy link
Collaborator

abh1sar commented Jan 15, 2026

I found some more occurrences where the zoneIds parameter is used without the length annotation (There was only one for domainIds which is fixed here). @nvazquez would you please fix these as well?

UpdateVPCOfferingCmd
    
    @Parameter(name = ApiConstants.ZONE_ID,
            type = CommandType.STRING,
            description = "The ID of the containing zone(s) as comma separated string, all for all zones offerings",
            since = "4.13")
    private String zoneIds;
UpdateServiceOfferingCmd

    @Parameter(name = ApiConstants.ZONE_ID,
            type = CommandType.STRING,
            description = "The ID of the containing zone(s) as comma separated string, all for all zones offerings",
            since = "4.13")
    private String zoneIds;
UpdateDiskOfferingCmd

    @Parameter(name = ApiConstants.ZONE_ID,
            type = CommandType.STRING,
            description = "The ID of the containing zone(s) as comma separated string, all for all zones offerings",
            since = "4.13")
    private String zoneIds;

Copy link
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

@DaanHoogland
Copy link
Contributor

@abh1sar do we need to support a lot of zones?

@nvazquez
Copy link
Contributor Author

Thanks @abh1sar @DaanHoogland - I can address those in a separate PR so we keep domainIds on this one fixing the reported issue

@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@abh1sar
Copy link
Collaborator

abh1sar commented Jan 15, 2026

@abh1sar do we need to support a lot of zones?

It might not be required, but there are other places where we use the length annotation with zoneIds. So this will keep the behaviour consistent.

Copy link
Collaborator

@abh1sar abh1sar left a comment

Choose a reason for hiding this comment

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

LGTM

@nvazquez
Copy link
Contributor Author

@abh1sar I've created the PR #12440 to address your comments, thanks

@blueorangutan
Copy link

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

@nvazquez
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

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.

domainIds parameter in updatenetworkoffering API limited to 255 characters, preventing multi-domain offerings

4 participants