From 9d256fa6c7f4377ee075555ec8b1f142fe75c445 Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Wed, 14 Aug 2019 13:48:50 -0500 Subject: [PATCH] gabbi test for same_subtree with an ancestry hole Based on the analysis at [1], we need to continue to use fully-populated ancestry data when calculating same_subtree-ness. This commit introduces a gabbi test that covers a particular case that can be broken if we don't do that: where a provider involved in the request has a broken ancestry path to another provider involved in the request. [1] https://review.opendev.org/#/c/675606/2/placement/objects/allocation_candidate.py@908 Change-Id: I5062e725d6f29cd997b974a0dad7dc4d0ed2900f --- .../functional/gabbits/granular-same-subtree.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/placement/tests/functional/gabbits/granular-same-subtree.yaml b/placement/tests/functional/gabbits/granular-same-subtree.yaml index c8e531ce6..71341e3b6 100644 --- a/placement/tests/functional/gabbits/granular-same-subtree.yaml +++ b/placement/tests/functional/gabbits/granular-same-subtree.yaml @@ -525,3 +525,14 @@ tests: $.allocation_requests..allocations['$ENVIRON["PF3_1_UUID"]'].resources.CUSTOM_VF: [2, 2, 2] $.allocation_requests..allocations['$ENVIRON["PF2_1_UUID"]'].resources.CUSTOM_VF: [2, 2, 2] $.allocation_requests..allocations['$ENVIRON["PF2_3_UUID"]'].resources.CUSTOM_VF: [2, 2, 2] + +- name: same_subtree with an ancestry hole + GET: /allocation_candidates + query_parameters: + required_MULTI_ATTACH: COMPUTE_VOLUME_MULTI_ATTACH + resources_BW: NET_BW_EGR_KILOBIT_PER_SEC:100 + resources_COMPUTE: VCPU:4 + same_subtree: _MULTI_ATTACH,_BW,_COMPUTE + group_policy: isolate + response_json_paths: + $.allocation_requests.`len`: 3