)]}'
{"id":"openstack%2Fplacement~998878","triplet_id":"openstack%2Fplacement~stable%2F2025.1~I9bac03b0162009cdcea024f091bf63b177eaa279","project":"openstack/placement","branch":"stable/2025.1","topic":"bug/2160721","hashtags":[],"change_id":"I9bac03b0162009cdcea024f091bf63b177eaa279","subject":"Check overall capacity before generating candidates","status":"NEW","created":"2026-07-28 08:05:35.000000000","updated":"2026-07-28 10:07: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":"27364c6c7cffc6068d7656bf3d792182c8aff9f9","_number":998878,"virtual_id_number":998878,"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:07: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:07: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":"0ced738e8753ba0762541da0d24795699ad807b6","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:35.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"27364c6c7cffc6068d7656bf3d792182c8aff9f9","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-07-28 10:07:18.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/2298f3c38e6945d99c26618f6098e729\n\n- grenade-skip-level-always https://zuul.opendev.org/t/openstack/build/23426f7e685e435a9ef2934875853c89 : FAILURE in 30m 07s (non-voting)\n- tempest-integrated-placement https://zuul.opendev.org/t/openstack/build/0ebb9ef0ff464ee7a402752683db4375 : SUCCESS in 1h 55m 41s\n- openstacksdk-functional-devstack https://zuul.opendev.org/t/openstack/build/8bd536fdfbb84a55b913bd6efee59469 : SUCCESS in 1h 02m 25s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/13667570b09a4e26a94f0d32838e4688 : SUCCESS in 14m 43s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/92fe36df26be4962abf194fdc8413dd3 : SUCCESS in 5m 21s\n- openstack-tox-py39 https://zuul.opendev.org/t/openstack/build/244e27dd1fb04674b1a43b245571aa3c : SUCCESS in 6m 21s\n- openstack-tox-py312 https://zuul.opendev.org/t/openstack/build/a045aed838854e45910104bb760fbc3d : SUCCESS in 4m 27s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/9cb7ae61cafc4ddfba63c87255cc42a8 : SUCCESS in 8m 40s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/9e465911e6b04da38043b02ab2a69ad2 : SUCCESS in 9m 23s\n- openstack-tox-functional-py39 https://zuul.opendev.org/t/openstack/build/16b1c313e40646308ac8bf8abab1b0e8 : SUCCESS in 7m 01s\n- openstack-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/c1810335608949a8a6e0d537953dfbaf : SUCCESS in 7m 46s\n- placement-nova-tox-functional-py312 https://zuul.opendev.org/t/openstack/build/a7d3072900e747a4a25f8ba2977cdad3 : SUCCESS in 23m 52s\n- placement-nested-perfload https://zuul.opendev.org/t/openstack/build/0af416c1a7724bfbbf6d5898e82d3218 : FAILURE in 3m 29s (non-voting)\n- placement-perfload https://zuul.opendev.org/t/openstack/build/54853283e3c54ba58f223f0941a4841b : FAILURE in 3m 30s (non-voting)\n- tempest-integrated-placement-ubuntu-jammy https://zuul.opendev.org/t/openstack/build/d12320253dfd4fd9b89d4ff8777ede70 : SUCCESS in 1h 46m 00s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/b91ec279bdb64680bafb40464ea01e3b : SUCCESS in 49m 44s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"a716a7d647d7ece518ac64ca8fb3fc40e823275c","revisions":{"a716a7d647d7ece518ac64ca8fb3fc40e823275c":{"kind":"REWORK","_number":1,"created":"2026-07-28 08:05:35.000000000","uploader":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"ref":"refs/changes/78/998878/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/78/998878/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/78/998878/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/78/998878/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/78/998878/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/78/998878/1"}}},"commit":{"parents":[{"commit":"3df901f1cdbd8bc58a47fa940e4bef17a93386dd","subject":"Reproduce bug 2160721","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/3df901f1cdbd8bc58a47fa940e4bef17a93386dd"}]}],"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:05:30.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(cherry picked from commit 122307ee25d69c42f33e19755033eeb473612451)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/a716a7d647d7ece518ac64ca8fb3fc40e823275c"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/a716a7d647d7ece518ac64ca8fb3fc40e823275c"}]},"branch":"refs/heads/stable/2025.1"}},"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":""}}}]}
