)]}'
{"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2e3fa0d5176ec2046bff82c8d7f93edebb92c68a","unresolved":false,"context_lines":[{"line_number":3286,"context_line":"        ns_prov_traits \u003d set(prov_traits.get(ns_rp_id, []))"},{"line_number":3287,"context_line":"        missing_traits \u003d set(required_traits) - ns_prov_traits"},{"line_number":3288,"context_line":""},{"line_number":3289,"context_line":"        # Determine if the non-sharing provider actually has all the"},{"line_number":3290,"context_line":"        # resources requested. If not, we need to add an AllocationRequest"},{"line_number":3291,"context_line":"        # alternative containing this resource for each sharing provider."},{"line_number":3292,"context_line":"        # NOTE(jaypipes): If a provider has inventory for a resource class and"},{"line_number":3293,"context_line":"        # ALSO has that resource class shared with it, we currently ALWAYS take"},{"line_number":3294,"context_line":"        # the non-shared inventory."},{"line_number":3295,"context_line":"        # See: https://bugs.launchpad.net/nova/+bug/1724613"},{"line_number":3296,"context_line":"        has_all \u003d len(shared_resources) \u003d\u003d 0"},{"line_number":3297,"context_line":"        if has_all:"},{"line_number":3298,"context_line":"            # If this resource provider has all the requested resources, then"},{"line_number":3299,"context_line":"            # require that it must also have ALL required traits."},{"line_number":3300,"context_line":"            # TODO(jaypipes): This is kind of buggy behaviour. We should be"},{"line_number":3301,"context_line":"            # able to consider permutations of non-sharing providers that have"},{"line_number":3302,"context_line":"            # all the resources but have missing required traits with sharing"},{"line_number":3303,"context_line":"            # providers that have those missing traits."},{"line_number":3304,"context_line":"            if missing_traits:"},{"line_number":3305,"context_line":"                LOG.debug(\u0027Excluding non-sharing provider %s: it has all \u0027"},{"line_number":3306,"context_line":"                          \u0027resources but is missing traits (%s).\u0027,"},{"line_number":3307,"context_line":"                          ns_rp_uuid, \u0027, \u0027.join(missing_traits))"},{"line_number":3308,"context_line":"                continue"},{"line_number":3309,"context_line":"            req \u003d _allocation_request_for_provider(ctx, requested_resources,"},{"line_number":3310,"context_line":"                                                   ns_rp_uuid)"},{"line_number":3311,"context_line":"            alloc_requests.append(req)"},{"line_number":3312,"context_line":"            continue"},{"line_number":3313,"context_line":""},{"line_number":3314,"context_line":"        has_none \u003d len(ns_resources) \u003d\u003d 0"},{"line_number":3315,"context_line":"        if has_none:"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_f45bbef2","side":"PARENT","line":3312,"range":{"start_line":3289,"start_character":0,"end_line":3312,"end_character":20},"updated":"2018-03-14 21:21:31.000000000","message":"It seems to me that this patch could have been much smaller and simply been the removal of this specific block of code here.\n\nThere could have been a followup patch for the other refactoring changes that you included in here.","commit_id":"90b4535633b2d789d3467bf7e5058e579ecaa2fd"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"94e949fe9a25a83f47d174edf95585692b2c5311","unresolved":false,"context_lines":[{"line_number":3286,"context_line":"        ns_prov_traits \u003d set(prov_traits.get(ns_rp_id, []))"},{"line_number":3287,"context_line":"        missing_traits \u003d set(required_traits) - ns_prov_traits"},{"line_number":3288,"context_line":""},{"line_number":3289,"context_line":"        # Determine if the non-sharing provider actually has all the"},{"line_number":3290,"context_line":"        # resources requested. If not, we need to add an AllocationRequest"},{"line_number":3291,"context_line":"        # alternative containing this resource for each sharing provider."},{"line_number":3292,"context_line":"        # NOTE(jaypipes): If a provider has inventory for a resource class and"},{"line_number":3293,"context_line":"        # ALSO has that resource class shared with it, we currently ALWAYS take"},{"line_number":3294,"context_line":"        # the non-shared inventory."},{"line_number":3295,"context_line":"        # See: https://bugs.launchpad.net/nova/+bug/1724613"},{"line_number":3296,"context_line":"        has_all \u003d len(shared_resources) \u003d\u003d 0"},{"line_number":3297,"context_line":"        if has_all:"},{"line_number":3298,"context_line":"            # If this resource provider has all the requested resources, then"},{"line_number":3299,"context_line":"            # require that it must also have ALL required traits."},{"line_number":3300,"context_line":"            # TODO(jaypipes): This is kind of buggy behaviour. We should be"},{"line_number":3301,"context_line":"            # able to consider permutations of non-sharing providers that have"},{"line_number":3302,"context_line":"            # all the resources but have missing required traits with sharing"},{"line_number":3303,"context_line":"            # providers that have those missing traits."},{"line_number":3304,"context_line":"            if missing_traits:"},{"line_number":3305,"context_line":"                LOG.debug(\u0027Excluding non-sharing provider %s: it has all \u0027"},{"line_number":3306,"context_line":"                          \u0027resources but is missing traits (%s).\u0027,"},{"line_number":3307,"context_line":"                          ns_rp_uuid, \u0027, \u0027.join(missing_traits))"},{"line_number":3308,"context_line":"                continue"},{"line_number":3309,"context_line":"            req \u003d _allocation_request_for_provider(ctx, requested_resources,"},{"line_number":3310,"context_line":"                                                   ns_rp_uuid)"},{"line_number":3311,"context_line":"            alloc_requests.append(req)"},{"line_number":3312,"context_line":"            continue"},{"line_number":3313,"context_line":""},{"line_number":3314,"context_line":"        has_none \u003d len(ns_resources) \u003d\u003d 0"},{"line_number":3315,"context_line":"        if has_none:"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_dacd7c85","side":"PARENT","line":3312,"range":{"start_line":3289,"start_character":0,"end_line":3312,"end_character":20},"in_reply_to":"df7087c5_f45bbef2","updated":"2018-03-15 05:14:50.000000000","message":"I\u0027m good with separating this part. Done in https://review.openstack.org/#/c/553122/\n\nBut please remember that the other part is *NOT* refactoring changes. The key of this fix is to divide AllocationRequestResource from non-sharing RP into pieces as that is done starting from\n\n  # Get AllocationRequestResource(s) from the non-sharing provider\n\npart in the new code using new dict value;\n\n  res_req_dict \u003d collections.defaultdict(list)","commit_id":"90b4535633b2d789d3467bf7e5058e579ecaa2fd"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0aa796876c1086f7fe68f719d5ecacf2c250a147","unresolved":false,"context_lines":[{"line_number":3240,"context_line":""},{"line_number":3241,"context_line":"    The allocation requests will contain resource providers that EITHER have"},{"line_number":3242,"context_line":"    all the resources to satisfy each requested resource amount OR can satisfy"},{"line_number":3243,"context_line":"    some of the requested resources AND are associated by aggregate to a"},{"line_number":3244,"context_line":"    resource provider that shares the missing resources with it."},{"line_number":3245,"context_line":""},{"line_number":3246,"context_line":"    :param ctx: nova.context.RequestContext object"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_aa15ed9d","line":3243,"range":{"start_line":3243,"start_character":40,"end_line":3243,"end_character":67},"updated":"2018-03-30 20:29:44.000000000","message":"Sorry if this is out of context, but I read this to mean that the result will *not* contain the actual sharing providers themselves.  Is that true?","commit_id":"02e357e7c2d2ccbab0a1f6b5a807d11f1ef72d46"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0aa796876c1086f7fe68f719d5ecacf2c250a147","unresolved":false,"context_lines":[{"line_number":3256,"context_line":"                      resources. In other words, this is the list of resource"},{"line_number":3257,"context_line":"                      provider IDs for all providers that are NOT sharing a"},{"line_number":3258,"context_line":"                      resource."},{"line_number":3259,"context_line":"    :param sharing: dict, keyed by resource class ID, of a set of resource"},{"line_number":3260,"context_line":"                    provider IDs that share that resource class"},{"line_number":3261,"context_line":"    \"\"\""},{"line_number":3262,"context_line":"    # We need to grab usage information for all the providers identified as"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_aaf16d6d","line":3259,"range":{"start_line":3259,"start_character":59,"end_line":3259,"end_character":62},"updated":"2018-03-30 20:29:44.000000000","message":"it is in fact a list.","commit_id":"02e357e7c2d2ccbab0a1f6b5a807d11f1ef72d46"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0aa796876c1086f7fe68f719d5ecacf2c250a147","unresolved":false,"context_lines":[{"line_number":3306,"context_line":"        res_req_dict \u003d collections.defaultdict(list)"},{"line_number":3307,"context_line":""},{"line_number":3308,"context_line":"        if ns_rp_id not in summaries:"},{"line_number":3309,"context_line":"            # This resource provider is not providing any resources that have"},{"line_number":3310,"context_line":"            # been requested. This means that this resource provider has some"},{"line_number":3311,"context_line":"            # requested resources shared *with* it but the allocation of the"},{"line_number":3312,"context_line":"            # requested resource will not be made against it. Since this"},{"line_number":3313,"context_line":"            # provider won\u0027t actually have an allocation request written for"},{"line_number":3314,"context_line":"            # it, we just ignore it and continue"},{"line_number":3315,"context_line":"            continue"},{"line_number":3316,"context_line":"        # NOTE(jaypipes): The \"ns_\" prefix for variables in this code block"},{"line_number":3317,"context_line":"        # indicates the variable is something related to the non-sharing"},{"line_number":3318,"context_line":"        # provider involved in the request"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_ca9b8115","line":3315,"range":{"start_line":3309,"start_character":0,"end_line":3315,"end_character":20},"updated":"2018-03-30 20:29:44.000000000","message":"But we\u0027re fixing this later in the series, right?  To where we can \"anchor\" to a non-sharing provider even if it\u0027s not providing any resources?\n\n[Later] Yeah, cool: https://review.openstack.org/#/c/533437/","commit_id":"02e357e7c2d2ccbab0a1f6b5a807d11f1ef72d46"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0aa796876c1086f7fe68f719d5ecacf2c250a147","unresolved":false,"context_lines":[{"line_number":3356,"context_line":"            res_req_dict[rc_id].extend(sharing_res_reqs)"},{"line_number":3357,"context_line":""},{"line_number":3358,"context_line":"        # Get request_groups, lists of lists of AllocationRequestResource"},{"line_number":3359,"context_line":"        # for each resource class, which makes no distinction between"},{"line_number":3360,"context_line":"        # non-sharing resource providers and sharing resource providers."},{"line_number":3361,"context_line":"        request_groups \u003d res_req_dict.values()"},{"line_number":3362,"context_line":""},{"line_number":3363,"context_line":"        # Add an AllocationRequest that includes resources from the"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_aabf2d5f","line":3360,"range":{"start_line":3359,"start_character":47,"end_line":3360,"end_character":72},"updated":"2018-03-30 20:29:44.000000000","message":"++","commit_id":"02e357e7c2d2ccbab0a1f6b5a807d11f1ef72d46"}],"nova/objects/resource_provider.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"7dbc453e2361e483b74fd84a71f433c6a9bded6e","unresolved":false,"context_lines":[{"line_number":3095,"context_line":"    # ids that provider has associated with it"},{"line_number":3096,"context_line":"    prov_aggregates \u003d _provider_aggregates(ctx, all_rp_ids)"},{"line_number":3097,"context_line":""},{"line_number":3098,"context_line":"    for ns_rp_id in ns_rp_ids:"},{"line_number":3099,"context_line":"        if ns_rp_id not in summaries:"},{"line_number":3100,"context_line":"            # This resource provider is not providing any resources that have"},{"line_number":3101,"context_line":"            # been requested. This means that this resource provider has some"},{"line_number":3102,"context_line":"            # requested resources shared *with* it but the allocation of the"},{"line_number":3103,"context_line":"            # requested resource will not be made against it. Since this"},{"line_number":3104,"context_line":"            # provider won\u0027t actually have an allocation request written for"},{"line_number":3105,"context_line":"            # it, we just ignore it and continue"},{"line_number":3106,"context_line":"            continue"},{"line_number":3107,"context_line":"        # NOTE(jaypipes): The \"ns_\" prefix for variables in this code block"},{"line_number":3108,"context_line":"        # indicates the variable is something related to the non-sharing"},{"line_number":3109,"context_line":"        # provider involved in the request"},{"line_number":3110,"context_line":"        ns_rp_summary \u003d summaries[ns_rp_id]"},{"line_number":3111,"context_line":"        ns_rp_uuid \u003d ns_rp_summary.resource_provider.uuid"},{"line_number":3112,"context_line":"        ns_resource_class_names \u003d ns_rp_summary.resource_class_names"},{"line_number":3113,"context_line":"        ns_resources \u003d set("},{"line_number":3114,"context_line":"            rc_id for rc_id in requested_resources"},{"line_number":3115,"context_line":"            if _RC_CACHE.string_from_id(rc_id) in ns_resource_class_names"},{"line_number":3116,"context_line":"        )"},{"line_number":3117,"context_line":""},{"line_number":3118,"context_line":"        # We need to figure out which traits are NOT provided by the \"local\""},{"line_number":3119,"context_line":"        # provider and that would need to be provided by the sharing"},{"line_number":3120,"context_line":"        # provider(s)"},{"line_number":3121,"context_line":"        ns_prov_traits \u003d set(prov_traits.get(ns_rp_id, []))"},{"line_number":3122,"context_line":"        missing_traits \u003d set(required_traits) - ns_prov_traits"},{"line_number":3123,"context_line":""},{"line_number":3124,"context_line":"        has_none \u003d len(ns_resources) \u003d\u003d 0"},{"line_number":3125,"context_line":"        if has_none:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_0b4b142b","line":3122,"range":{"start_line":3098,"start_character":0,"end_line":3122,"end_character":62},"updated":"2018-01-14 13:20:07.000000000","message":"MEMO: This can be refactored to not at all make distinction between non-sharing rp and sharing rp, and that refactor is the key to debug indirectly aggregate bug from https://bugs.launchpad.net/nova/+bug/1732731.","commit_id":"f2f92f8e9204b9dc1399c27769e511b0d4591b97"}],"nova/tests/functional/api/openstack/placement/db/test_allocation_candidates.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0aa796876c1086f7fe68f719d5ecacf2c250a147","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"bf659307_aa640d23","updated":"2018-03-30 20:29:44.000000000","message":"Love this!","commit_id":"02e357e7c2d2ccbab0a1f6b5a807d11f1ef72d46"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0aa796876c1086f7fe68f719d5ecacf2c250a147","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"        # TODO(efried): Bug #1724633: we\u0027d *like* to get no candidates, because"},{"line_number":1037,"context_line":"        # there\u0027s no single DISK_GB resource with both STORAGE_DISK_SSD and"},{"line_number":1038,"context_line":"        # CUSTOM_RAID traits."},{"line_number":1039,"context_line":"        # expected \u003d []"},{"line_number":1040,"context_line":"        expected \u003d ["},{"line_number":1041,"context_line":"           [(\u0027cn\u0027, fields.ResourceClass.VCPU, 1),"},{"line_number":1042,"context_line":"            (\u0027cn\u0027, fields.ResourceClass.MEMORY_MB, 64),"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_0aa65954","line":1039,"range":{"start_line":1039,"start_character":8,"end_line":1039,"end_character":23},"updated":"2018-03-30 20:29:44.000000000","message":"RBB!!","commit_id":"02e357e7c2d2ccbab0a1f6b5a807d11f1ef72d46"}]}
