414 Request-Too-Long when using _get_sharing_providers with a large number of UUIDs

Bug #2068893 reported by Sahid Orentino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unassigned

Bug Description

The scheduler is reporting error when calling placement in situation of hosts running into many aggregates

The web server returns a 414 Request-Too-Long error because the size of the URL in the GET request exceeds the allowed limit.

The proposed fix is some modifications in _get_sharing_providers function to divide the agg_uuids list into groups of a maximum of 100 UUIDs per GET request. The division ensures that the size of each request remains below the allowed limit, resolving the issue of the 414 Request-Too-Long error.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/921665

Changed in nova:
status: New → In Progress
Revision history for this message
sean mooney (sean-k-mooney) wrote :

this is a feature not a bug setting the triage state to opinion

Changed in nova:
status: In Progress → Opinion
Revision history for this message
sean mooney (sean-k-mooney) wrote :

talksing about this a little more on irc

this issue is in the resource tracker not the scheduled as i orgianlly thought
this is similar to https://bugzilla.redhat.com/show_bug.cgi?id=2283075

currently the resource tracker is caching the set of sharing agggates it is a part of.

in some cases this is very large and can hit limits in the loadblancer or webserver.

sahid's proposal is to paginate the request which may be valided.

currently its not clear that the cached data in the resouce tracker is actually required and as such removal of this cached data might also be an option.

setting this to medium as the work around for now is to increase the max request size on the webserver or loadbalnacer.

the current limit is deployment tool specififc.

tags: added: resource-tracker
Changed in nova:
importance: Undecided → Medium
status: Opinion → Triaged
Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/921665
Committed: https://opendev.org/openstack/nova/commit/f254729a565222be00cf2fe1edc44e6cf10bfae6
Submitter: "Zuul (22348)"
Branch: master

commit f254729a565222be00cf2fe1edc44e6cf10bfae6
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Mon Jun 10 15:11:31 2024 +0200

    scheduler: fix _get_sharing_providers to support unlimited aggr

    A Request-Too-Long error can be raised in case of too many aggregates
    are attached to a host. The fix is to split the requests.

    The request is executed by host via a periodic task. Result is set in
    cache so no performances impact is expected.

    The change introduce a new compute configuration option
    `compute.sharing_providers_max_uuids_per_request = 200`.

    Closes-bug: #2068893

    Change-Id: I1355c0813cb99067ead60f9835938566289beb20
    Signed-off-by: Sahid Orentino Ferdjaoui <email address hidden>

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 30.0.0.0rc1

This issue was fixed in the openstack/nova 30.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/2024.1)

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/nova/+/946538

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/nova/+/946539

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (unmaintained/2023.1)

Fix proposed to branch: unmaintained/2023.1
Review: https://review.opendev.org/c/openstack/nova/+/946540

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/2024.1)

Reviewed: https://review.opendev.org/c/openstack/nova/+/946538
Committed: https://opendev.org/openstack/nova/commit/f91d1e0565fc62f4715c744eb60f1137001589b1
Submitter: "Zuul (22348)"
Branch: stable/2024.1

commit f91d1e0565fc62f4715c744eb60f1137001589b1
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Mon Jun 10 15:11:31 2024 +0200

    scheduler: fix _get_sharing_providers to support unlimited aggr

    A Request-Too-Long error can be raised in case of too many aggregates
    are attached to a host. The fix is to split the requests.

    The request is executed by host via a periodic task. Result is set in
    cache so no performances impact is expected.

    The change introduce a new compute configuration option
    `compute.sharing_providers_max_uuids_per_request = 200`.

    Closes-bug: #2068893

    Depends-On: https://review.opendev.org/c/openstack/cinder/+/946101

    Change-Id: I1355c0813cb99067ead60f9835938566289beb20
    Signed-off-by: Sahid Orentino Ferdjaoui <email address hidden>
    (cherry picked from commit f254729a565222be00cf2fe1edc44e6cf10bfae6)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/nova/+/946539
Committed: https://opendev.org/openstack/nova/commit/91805854af9fa20cb502c7243d2f9258cc58b045
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 91805854af9fa20cb502c7243d2f9258cc58b045
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Mon Jun 10 15:11:31 2024 +0200

    scheduler: fix _get_sharing_providers to support unlimited aggr

    A Request-Too-Long error can be raised in case of too many aggregates
    are attached to a host. The fix is to split the requests.

    The request is executed by host via a periodic task. Result is set in
    cache so no performances impact is expected.

    The change introduce a new compute configuration option
    `compute.sharing_providers_max_uuids_per_request = 200`.

    Closes-bug: #2068893

    Change-Id: I1355c0813cb99067ead60f9835938566289beb20
    Signed-off-by: Sahid Orentino Ferdjaoui <email address hidden>
    (cherry picked from commit f254729a565222be00cf2fe1edc44e6cf10bfae6)
    (cherry picked from commit f91d1e0565fc62f4715c744eb60f1137001589b1)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 28.3.1

This issue was fixed in the openstack/nova 28.3.1 Bobcat release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 29.2.1

This issue was fixed in the openstack/nova 29.2.1 Caracal release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.