Skip to content

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

@MertkanOzlu

Description

@MertkanOzlu

problem

When updating a network offering with multiple domains using the updatenetworkoffering API, the request fails with HTTP 431 error if the combined length of domain IDs exceeds 255 characters.

Error message:
Unable to execute API command updatenetworkoffering due to invalid value. Value greater than max allowed length 255 for param: domainIds

Since each UUID is 36 characters, this effectively limits domain selection to approximately 7 domains (including comma separators), which is insufficient for enterprise environments with many domains/tenants.

versions

CloudStack: 4.20
Hypervisor: VMware
Database: MySQL

The steps to reproduce the bug

  1. Navigate to Service Offerings → Network Offerings
  2. Select an existing network offering and click "Edit" (or use API directly)
  3. Try to assign the offering to more than 7 domains (where total UUID string length exceeds 255 characters)
  4. Click "Save" or execute updatenetworkoffering API call
  5. Observe HTTP 431 error with message: "Value greater than max allowed length 255 for param: domainIds"

What to do about it?

Suggested fix:
Increase the domainIds parameter length limit from 255 to at least 4096 characters (or make it TEXT type) in the API parameter validation.

The limitation appears to be in the API parameter validation layer. Since domain assignments are a legitimate enterprise use case, the character limit should accommodate at least 50-100 domains.

Affected code (probable location):

  • API command validation for updatenetworkoffering
  • Similar commands like updatevpcoffering, updatediskoffering, updateserviceoffering may have the same limitation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions