)]}'
{"id":"openstack%2Fplacement~998876","triplet_id":"openstack%2Fplacement~stable%2F2025.2~I9bac03b0162009cdcea024f091bf63b177eaa279","project":"openstack/placement","branch":"stable/2025.2","topic":"bug/2160721","hashtags":[],"change_id":"I9bac03b0162009cdcea024f091bf63b177eaa279","subject":"Check overall capacity before generating candidates","status":"NEW","created":"2026-07-28 08:05:03.000000000","updated":"2026-07-28 10:02:18.000000000","submit_type":"MERGE_IF_NECESSARY","mergeable":true,"submittable":false,"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"a8da646f96c4cc1cfcd8b2d515ef100b79bb4a0b","_number":998876,"virtual_id_number":998876,"owner":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"actions":{},"labels":{"Verified":{"recommended":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"tag":"autogenerated:zuul:check","value":1,"date":"2026-07-28 10:02:18.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":1,"default_value":0,"optional":true},"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"all":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"permitted_voting_range":{"min":0,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{" 0":"Default Priority","+1":"Contributor Review Promise","+2":"Core Review Promise"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2026-07-28 10:02:18.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"ad89ac1fdaffa0953c1aad407df3a9b178039fda","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2026-07-28 08:05:03.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"a8da646f96c4cc1cfcd8b2d515ef100b79bb4a0b","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-07-28 10:02:18.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/035fe8e63bc14287b266a88400470d44\n\n- grenade https://zuul.opendev.org/t/openstack/build/a122a6d308e845919f7969263b80ce1a : SUCCESS in 1h 13m 17s\n- tempest-integrated-placement https://zuul.opendev.org/t/openstack/build/b0c1f3d63be444a5accdbf418ffbe687 : SUCCESS in 1h 50m 26s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/98e8a00a82e342aea6125a10fc34065f : SUCCESS in 1h 00m 11s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/eb484d9255fa4fb0bd07a38a91454ae4 : SUCCESS in 11m 45s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/927dfa40a4ba4e33a1b1688816418a77 : SUCCESS in 3m 55s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/5f0825e83a314830af06d75b682af1fe : SUCCESS in 5m 07s\n- openstack-tox-py312 https://zuul.opendev.org/t/openstack/build/58dcec2229644b6b88ecd0ffb4875548 : SUCCESS in 5m 46s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/8c7a52b8874a4e4c8ad70821bf9c03fb : FAILURE in 7m 17s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/09d8b90c4d0148df815479a78fce2f64 : SUCCESS in 10m 21s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/8d9399db0ea74a1d95365eef7883bbe3 : SUCCESS in 9m 31s\n- openstack-tox-functional-py310 https://zuul.opendev.org/t/openstack/build/b522d413f028467385329a48260af355 : SUCCESS in 6m 40s\n- openstack-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/de5349c3aefd494fbb39d9a274f3f941 : SUCCESS in 6m 49s\n- placement-nova-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/d5c43c34a4fa45b8aa41c491f7614753 : SUCCESS in 23m 28s\n- placement-nested-perfload https://zuul.opendev.org/t/openstack/build/aa6d14f594e34c90a16a97ff3686982e : FAILURE in 3m 20s (non-voting)\n- placement-perfload https://zuul.opendev.org/t/openstack/build/dbc6f1c06fe24145aefb2a1a7343f217 : FAILURE in 3m 16s (non-voting)\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/2297562f6e9d4e708d6493a40915ebd1 : SUCCESS in 50m 07s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"122307ee25d69c42f33e19755033eeb473612451","revisions":{"122307ee25d69c42f33e19755033eeb473612451":{"kind":"REWORK","_number":1,"created":"2026-07-28 08:05:03.000000000","uploader":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"ref":"refs/changes/76/998876/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/76/998876/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/76/998876/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/76/998876/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/76/998876/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/76/998876/1"}}},"commit":{"parents":[{"commit":"faa9ea91161c3a421f4d788d957cce87596ee341","subject":"Reproduce bug 2160721","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/faa9ea91161c3a421f4d788d957cce87596ee341"}]}],"author":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2026-07-16 16:19:09.000000000","tz":120},"committer":{"name":"Balazs Gibizer","email":"gibi@redhat.com","date":"2026-07-28 08:04:57.000000000","tz":120},"subject":"Check overall capacity before generating candidates","message":"Check overall capacity before generating candidates\n\nThis is a performance optimization for an edge case where\n* We have wide, symmetric provider trees. E.g. 10+ children RPs within a\n  tree providing the same type of resources\n* A GET allocation_candidates request that asks for 10+ request groups\n  of such resources\n* But the tree has less available resources left than the number of\n  requested groups by a small amount. I.e. the request almost fits but\n  does not.\n\nIn this case even the wide tree optimized allocation candidate\ngeneration algorithm produces a lot of partially valid candidates before\nit finds that the last (couple of) group in the request cannot be\nfulfilled. This takes excessive time.\n\nThis patch adds a check before the allocation candidate generation\nalgorithm runs. This check runs on each tree. It compares the total\nrequested resources per resource class with the total available\nresources per resource class in the tree and filters out the tree if it\nfinds that the overall pool of resources from the tree is not enough.\n\nAs testing shows that the cost of this pre-check is reasonable for the\nsimple cases too the pre-check is enabled unconditionally. However there\nis a small optimization in the pre-check. If a resource class only\nrequested in a single request group then it is ignored as our edge case\nis already eliminated when that group individually failed to be\nfulfilled. As an extension if the request has no resource class\nused in multiple groups, or only have a single group, then the pre-check\nis a no-op.\n\nCloses-Bug: #2160721\nSigned-off-by: Balazs Gibizer \u003cgibi@redhat.com\u003e\nChange-Id: I9bac03b0162009cdcea024f091bf63b177eaa279\n(cherry picked from commit 3457ecd69aa966c9f278c8bf7b2a90a5d9f96a3a)\n(cherry picked from commit 2fcbb6adc02f0619c4a47fdb2f1b5cdac15903d9)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/122307ee25d69c42f33e19755033eeb473612451"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/122307ee25d69c42f33e19755033eeb473612451"}]},"branch":"refs/heads/stable/2025.2"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"OK","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY"},{"label":"Workflow","status":"MAY"},{"label":"Review-Priority","status":"MAY"}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Verified\u003dMAX","label:Verified\u003dMIN"],"atom_explanations":{"label:Verified\u003dMAX":"","label:Verified\u003dMIN":""}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Code-Review\u003dMAX","label:Code-Review\u003dMIN"],"atom_explanations":{"label:Code-Review\u003dMAX":"","label:Code-Review\u003dMIN":""}}},{"name":"Review-Priority","description":"Review Priority","status":"NOT_APPLICABLE","is_legacy":false,"applicability_expression_result":{"fulfilled":false,"status":"FAIL"},"submittability_expression_result":{"expression":"is:true","fulfilled":true,"status":"NOT_EVALUATED","passing_atoms":[],"failing_atoms":[],"atom_explanations":{}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Workflow\u003dMAX","label:Workflow\u003dMIN"],"atom_explanations":{"label:Workflow\u003dMAX":"","label:Workflow\u003dMIN":""}}}]}
