)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"beff51b137ee9db1eaaa45c3f47253005eb1c565","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix duplicate allocation candidates"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some combinations of resource providers were duplicated in"},{"line_number":10,"context_line":"allocation candidates."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch adds to _alloc_candidates_with_shared() function a check"},{"line_number":13,"context_line":"if we already have that combination in allocation candidates by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_0ddf5e3a","line":10,"updated":"2017-12-19 09:25:37.000000000","message":"It would be nice to see why the duplication happens. As far as I understand having two sharing RPs and asking resources from both causes the duplication. Both sharing RPs are visited during the algorithm to see if it can be used as an allocation candidate if other sharing RPs are added. So basically we found and RP-A RP-B pair twice, once staring with RP-A and adding RP-B to it and then starting with RP-B and adding RP-A to it. Is this a correct observation?","commit_id":"b9c6077f24dc56994ef8fd5ade53503d76d69c01"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"0faf71023d03300f45f3b4970d23acf30b8a3635","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix duplicate allocation candidates"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some combinations of resource providers were duplicated in"},{"line_number":10,"context_line":"allocation candidates."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch adds to _alloc_candidates_with_shared() function a check"},{"line_number":13,"context_line":"if we already have that combination in allocation candidates by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_a4299a37","line":10,"in_reply_to":"df87a7cf_0ddf5e3a","updated":"2017-12-20 00:42:32.000000000","message":"Exactly. And that happens only when both RPs have `MISC_SHARES_VIA_AGGREGATE` tag. \n\nFor example, let me consider the case that RP-A doesn\u0027t have the tag and RP-B has the tag. When starting with RP-A as ns_rp_id, he can select RP-B for his mate, but when  starting with RP-B, he cannot take RP-A for his mate because RP-A is not a sharing provider, i.e. RP-A is not returned via _get_providers_with_shared_capacity()[1], and that results in absence in shared_res_requests[2].\n\n[1] https://github.com/openstack/nova/blob/master/nova/objects/resource_provider.py#L924\n[2] https://github.com/openstack/nova/blob/master/nova/objects/resource_provider.py#L3146","commit_id":"b9c6077f24dc56994ef8fd5ade53503d76d69c01"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"39a016dd6cac8ecf84e6cd653e18e0e436877037","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix duplicate allocation candidates"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some combinations of resource providers were duplicated in"},{"line_number":10,"context_line":"allocation candidates."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch adds to _alloc_candidates_with_shared() function a check"},{"line_number":13,"context_line":"if we already have that combination in allocation candidates by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_7af486f1","line":10,"in_reply_to":"df87a7cf_a4299a37","updated":"2017-12-20 08:02:02.000000000","message":"added several lines for that point :)","commit_id":"b9c6077f24dc56994ef8fd5ade53503d76d69c01"}],"nova/objects/resource_provider.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"70cb1c30843adc66a1e06800d9f0187a8ec000d1","unresolved":false,"context_lines":[{"line_number":3058,"context_line":"    # Next, build up a list of allocation requests. These allocation requests"},{"line_number":3059,"context_line":"    # are AllocationRequest objects, containing resource provider UUIDs,"},{"line_number":3060,"context_line":"    # resource class names and amounts to consume from that resource provider"},{"line_number":3061,"context_line":"    alloc_requests \u003d []"},{"line_number":3062,"context_line":"    alloc_prov_ids \u003d []"},{"line_number":3063,"context_line":""},{"line_number":3064,"context_line":"    # Build a dict, keyed by resource class ID, of AllocationRequestResource"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_ba0a4076","line":3061,"updated":"2017-12-18 13:12:57.000000000","message":"could use a quick code comment here describing what alloc_prov_ids is used for. Something like this would work:\n\n # Stores the set of provider internal IDs that end up\n # in allocation request objects. Used to ensure we don\u0027t\n # end up having allocation requests with duplicate sets\n # of resource providers.","commit_id":"b9c6077f24dc56994ef8fd5ade53503d76d69c01"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"39a016dd6cac8ecf84e6cd653e18e0e436877037","unresolved":false,"context_lines":[{"line_number":3058,"context_line":"    # Next, build up a list of allocation requests. These allocation requests"},{"line_number":3059,"context_line":"    # are AllocationRequest objects, containing resource provider UUIDs,"},{"line_number":3060,"context_line":"    # resource class names and amounts to consume from that resource provider"},{"line_number":3061,"context_line":"    alloc_requests \u003d []"},{"line_number":3062,"context_line":"    alloc_prov_ids \u003d []"},{"line_number":3063,"context_line":""},{"line_number":3064,"context_line":"    # Build a dict, keyed by resource class ID, of AllocationRequestResource"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_fa8ad661","line":3061,"in_reply_to":"df87a7cf_ba0a4076","updated":"2017-12-20 08:02:02.000000000","message":"good call !","commit_id":"b9c6077f24dc56994ef8fd5ade53503d76d69c01"}]}
