)]}'
{"nova/scheduler/utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"743971aa9158c18723dee78078890fc57000a77d","unresolved":false,"context_lines":[{"line_number":485,"context_line":"            grp.aggregates \u003d [ored.split(\u0027,\u0027)"},{"line_number":486,"context_line":"                              for ored in destination.aggregates]"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    # Don\u0027t limit allocation candidates when using force_hosts or force_nodes."},{"line_number":489,"context_line":"    if \u0027force_hosts\u0027 in spec_obj and spec_obj.force_hosts:"},{"line_number":490,"context_line":"        res_req._limit \u003d None"},{"line_number":491,"context_line":"    if \u0027force_nodes\u0027 in spec_obj and spec_obj.force_nodes:"},{"line_number":492,"context_line":"        res_req._limit \u003d None"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    return res_req"},{"line_number":495,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_c26c9dd1","side":"PARENT","line":492,"range":{"start_line":488,"start_character":4,"end_line":492,"end_character":29},"updated":"2019-04-10 13:55:53.000000000","message":"I think something like this needs to be the else block to the condition on L522 now.","commit_id":"2f06b12623d446da0c398e681b3ee1fb68791d31"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"f361188e50fdec0b8e0b8adfcdcaf87e78f4f710","unresolved":false,"context_lines":[{"line_number":485,"context_line":"            grp.aggregates \u003d [ored.split(\u0027,\u0027)"},{"line_number":486,"context_line":"                              for ored in destination.aggregates]"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    # Don\u0027t limit allocation candidates when using force_hosts or force_nodes."},{"line_number":489,"context_line":"    if \u0027force_hosts\u0027 in spec_obj and spec_obj.force_hosts:"},{"line_number":490,"context_line":"        res_req._limit \u003d None"},{"line_number":491,"context_line":"    if \u0027force_nodes\u0027 in spec_obj and spec_obj.force_nodes:"},{"line_number":492,"context_line":"        res_req._limit \u003d None"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    return res_req"},{"line_number":495,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_0c3dccba","side":"PARENT","line":492,"range":{"start_line":488,"start_character":4,"end_line":492,"end_character":29},"in_reply_to":"5fc1f717_c26c9dd1","updated":"2019-04-11 12:45:31.000000000","message":"Technically we don\u0027t need the else block so far since the limit is useless for the case where the in_tree is set with only one uuid, but in the future theoretically there could be a case to pass more than limit numbers of rp uuids where limit is needed, so I choose to do this in the else block as you suggest. Thanks.","commit_id":"2f06b12623d446da0c398e681b3ee1fb68791d31"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"743971aa9158c18723dee78078890fc57000a77d","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                                  for ored in destination.aggregates]"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    if \u0027force_hosts\u0027 in spec_obj and spec_obj.force_hosts:"},{"line_number":502,"context_line":"        # Prioritize the value from requested_destination just in case"},{"line_number":503,"context_line":"        # so that we don\u0027t inadvertently overwrite it to the old value"},{"line_number":504,"context_line":"        # of force_hosts persisted in the DB"},{"line_number":505,"context_line":"        target_host \u003d target_host or spec_obj.force_hosts[0]"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    if \u0027force_nodes\u0027 in spec_obj and spec_obj.force_nodes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_8f779ed4","line":504,"range":{"start_line":502,"start_character":8,"end_line":504,"end_character":44},"updated":"2019-04-10 13:55:53.000000000","message":"I very much like this and am surprised you are already aware of the terribleness that is the RequestSpec persisting these kinds of per-operation fields, i.e. why RequestSpec.reset_forced_destinations exists.","commit_id":"a845b3bf7b15c3966452e99493edf02972ad438f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"743971aa9158c18723dee78078890fc57000a77d","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        target_node \u003d target_node or spec_obj.force_nodes[0]"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"    if target_host or target_node:"},{"line_number":514,"context_line":"        hst_mng \u003d host_manager.HostManager()"},{"line_number":515,"context_line":"        nodes \u003d hst_mng.get_compute_nodes_by_host_or_node("},{"line_number":516,"context_line":"            ctxt, target_host, target_node, target_cell)"},{"line_number":517,"context_line":"        if not nodes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_ef13c263","line":514,"updated":"2019-04-10 13:55:53.000000000","message":"This seems pretty heavy to construct for every request like this but it looks like we don\u0027t have much of an option since you need to use the HostManager because that has the enabled_cells cache, right?\n\nCouldn\u0027t we just pass a handle to the HostManager into this method from the SchedulerManager (self.driver.host_manager)?\n\nGranted this would only be for each move operation that involves a specified target host and/or node, but still it seems we can easily avoid this.","commit_id":"a845b3bf7b15c3966452e99493edf02972ad438f"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"f361188e50fdec0b8e0b8adfcdcaf87e78f4f710","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        target_node \u003d target_node or spec_obj.force_nodes[0]"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"    if target_host or target_node:"},{"line_number":514,"context_line":"        hst_mng \u003d host_manager.HostManager()"},{"line_number":515,"context_line":"        nodes \u003d hst_mng.get_compute_nodes_by_host_or_node("},{"line_number":516,"context_line":"            ctxt, target_host, target_node, target_cell)"},{"line_number":517,"context_line":"        if not nodes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_6c301009","line":514,"in_reply_to":"5fc1f717_ef13c263","updated":"2019-04-11 12:45:31.000000000","message":"Done","commit_id":"a845b3bf7b15c3966452e99493edf02972ad438f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"743971aa9158c18723dee78078890fc57000a77d","unresolved":false,"context_lines":[{"line_number":513,"context_line":"    if target_host or target_node:"},{"line_number":514,"context_line":"        hst_mng \u003d host_manager.HostManager()"},{"line_number":515,"context_line":"        nodes \u003d hst_mng.get_compute_nodes_by_host_or_node("},{"line_number":516,"context_line":"            ctxt, target_host, target_node, target_cell)"},{"line_number":517,"context_line":"        if not nodes:"},{"line_number":518,"context_line":"            reason \u003d (_(\u0027No such host - host: %(host)s node: %(node)s \u0027) %"},{"line_number":519,"context_line":"                      {\u0027host\u0027: target_host, \u0027node\u0027: target_node})"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_4232edf3","line":516,"range":{"start_line":516,"start_character":44,"end_line":516,"end_character":55},"updated":"2019-04-10 13:55:53.000000000","message":"nit: use the cell\u003dtarget_cell named kwarg here.","commit_id":"a845b3bf7b15c3966452e99493edf02972ad438f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"743971aa9158c18723dee78078890fc57000a77d","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        if not nodes:"},{"line_number":518,"context_line":"            reason \u003d (_(\u0027No such host - host: %(host)s node: %(node)s \u0027) %"},{"line_number":519,"context_line":"                      {\u0027host\u0027: target_host, \u0027node\u0027: target_node})"},{"line_number":520,"context_line":"            raise exception.NoValidHost(reason\u003dreason)"},{"line_number":521,"context_line":"        # ToDo(tetsuro): support multiple uuids in in_tree query"},{"line_number":522,"context_line":"        if len(nodes) \u003d\u003d 1:"},{"line_number":523,"context_line":"            grp \u003d res_req.get_request_group(None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_024e256e","line":520,"range":{"start_line":520,"start_character":28,"end_line":520,"end_character":39},"updated":"2019-04-10 13:55:53.000000000","message":"nit: it would be good to document this case in the docstring for this method.","commit_id":"a845b3bf7b15c3966452e99493edf02972ad438f"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"f361188e50fdec0b8e0b8adfcdcaf87e78f4f710","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        if not nodes:"},{"line_number":518,"context_line":"            reason \u003d (_(\u0027No such host - host: %(host)s node: %(node)s \u0027) %"},{"line_number":519,"context_line":"                      {\u0027host\u0027: target_host, \u0027node\u0027: target_node})"},{"line_number":520,"context_line":"            raise exception.NoValidHost(reason\u003dreason)"},{"line_number":521,"context_line":"        # ToDo(tetsuro): support multiple uuids in in_tree query"},{"line_number":522,"context_line":"        if len(nodes) \u003d\u003d 1:"},{"line_number":523,"context_line":"            grp \u003d res_req.get_request_group(None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_2c452871","line":520,"range":{"start_line":520,"start_character":28,"end_line":520,"end_character":39},"in_reply_to":"5fc1f717_024e256e","updated":"2019-04-11 12:45:31.000000000","message":"Done","commit_id":"a845b3bf7b15c3966452e99493edf02972ad438f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"743971aa9158c18723dee78078890fc57000a77d","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            reason \u003d (_(\u0027No such host - host: %(host)s node: %(node)s \u0027) %"},{"line_number":519,"context_line":"                      {\u0027host\u0027: target_host, \u0027node\u0027: target_node})"},{"line_number":520,"context_line":"            raise exception.NoValidHost(reason\u003dreason)"},{"line_number":521,"context_line":"        # ToDo(tetsuro): support multiple uuids in in_tree query"},{"line_number":522,"context_line":"        if len(nodes) \u003d\u003d 1:"},{"line_number":523,"context_line":"            grp \u003d res_req.get_request_group(None)"},{"line_number":524,"context_line":"            grp.in_tree \u003d nodes[0].uuid"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_823c55c8","line":521,"updated":"2019-04-10 13:55:53.000000000","message":"Per the discussion in the spec, I think just document that if nodes \u003e 1 we have a case of a target baremetal host being specified without a specific node and we can\u0027t decide which node to use, so we have to remove the limit from the GET /a_c query.","commit_id":"a845b3bf7b15c3966452e99493edf02972ad438f"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"f361188e50fdec0b8e0b8adfcdcaf87e78f4f710","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            reason \u003d (_(\u0027No such host - host: %(host)s node: %(node)s \u0027) %"},{"line_number":519,"context_line":"                      {\u0027host\u0027: target_host, \u0027node\u0027: target_node})"},{"line_number":520,"context_line":"            raise exception.NoValidHost(reason\u003dreason)"},{"line_number":521,"context_line":"        # ToDo(tetsuro): support multiple uuids in in_tree query"},{"line_number":522,"context_line":"        if len(nodes) \u003d\u003d 1:"},{"line_number":523,"context_line":"            grp \u003d res_req.get_request_group(None)"},{"line_number":524,"context_line":"            grp.in_tree \u003d nodes[0].uuid"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_4c4af480","line":521,"in_reply_to":"5fc1f717_823c55c8","updated":"2019-04-11 12:45:31.000000000","message":"Done","commit_id":"a845b3bf7b15c3966452e99493edf02972ad438f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3f7394753bd8e43f5a728a68892ba6d6fda50bca","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            if destination.aggregates:"},{"line_number":503,"context_line":"                grp \u003d res_req.get_request_group(None)"},{"line_number":504,"context_line":"                grp.aggregates \u003d [ored.split(\u0027,\u0027)"},{"line_number":505,"context_line":"                                  for ored in destination.aggregates]"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    if \u0027force_hosts\u0027 in spec_obj and spec_obj.force_hosts:"},{"line_number":508,"context_line":"        # Prioritize the value from requested_destination just in case"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_84a2b34a","line":505,"range":{"start_line":505,"start_character":38,"end_line":505,"end_character":42},"updated":"2019-04-15 17:17:46.000000000","message":"I realize this was already here, but I\u0027m unable to interpret what an \u0027ored\u0027 is. What is it?","commit_id":"c0db968abc47672abac9c2a99554cece5c642d2f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a97fb5c905c53500871cc5e2e90f1834634dac00","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            if destination.aggregates:"},{"line_number":503,"context_line":"                grp \u003d res_req.get_request_group(None)"},{"line_number":504,"context_line":"                grp.aggregates \u003d [ored.split(\u0027,\u0027)"},{"line_number":505,"context_line":"                                  for ored in destination.aggregates]"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    if \u0027force_hosts\u0027 in spec_obj and spec_obj.force_hosts:"},{"line_number":508,"context_line":"        # Prioritize the value from requested_destination just in case"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_55d8f37d","line":505,"range":{"start_line":505,"start_character":38,"end_line":505,"end_character":42},"in_reply_to":"3fce034c_84a2b34a","updated":"2019-04-15 19:08:39.000000000","message":"I think it means OR\u0027ed logically:\n\nhttps://github.com/openstack/nova/blob/78e742662edd164c46382c31e106884762fed029/nova/objects/request_spec.py#L897\n\nAgree that the name is confusing and a code comment would have been better, but it\u0027s not the fault of this change.","commit_id":"c0db968abc47672abac9c2a99554cece5c642d2f"}],"nova/tests/unit/scheduler/test_utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a97fb5c905c53500871cc5e2e90f1834634dac00","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                                root_gb\u003d15,"},{"line_number":431,"context_line":"                                ephemeral_gb\u003d0,"},{"line_number":432,"context_line":"                                swap\u003d0)"},{"line_number":433,"context_line":"        fake_spec \u003d objects.RequestSpec(flavor\u003dflavor, force_nodes\u003d[\u0027test\u0027])"},{"line_number":434,"context_line":"        expected \u003d utils.ResourceRequest()"},{"line_number":435,"context_line":"        expected._rg_by_id[None] \u003d objects.RequestGroup("},{"line_number":436,"context_line":"            use_same_provider\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_b58a7718","line":433,"range":{"start_line":433,"start_character":55,"end_line":433,"end_character":75},"updated":"2019-04-15 19:08:39.000000000","message":"You could link this to the ComputeNode object in the test by adding hypervisor_hostname\u003d\u0027test\u0027 to the object above. The mock covers it up, but it might help people connect the two things.","commit_id":"c0db968abc47672abac9c2a99554cece5c642d2f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a97fb5c905c53500871cc5e2e90f1834634dac00","unresolved":false,"context_lines":[{"line_number":462,"context_line":"                                root_gb\u003d15,"},{"line_number":463,"context_line":"                                ephemeral_gb\u003d0,"},{"line_number":464,"context_line":"                                swap\u003d0)"},{"line_number":465,"context_line":"        fake_spec \u003d objects.RequestSpec(flavor\u003dflavor, force_hosts\u003d[\u0027test\u0027])"},{"line_number":466,"context_line":"        expected \u003d utils.ResourceRequest()"},{"line_number":467,"context_line":"        expected._rg_by_id[None] \u003d objects.RequestGroup("},{"line_number":468,"context_line":"            use_same_provider\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_d58dc331","line":465,"range":{"start_line":465,"start_character":69,"end_line":465,"end_character":73},"updated":"2019-04-15 19:08:39.000000000","message":"This should be fake-host or the compute node host value should be \u0027test\u0027.","commit_id":"c0db968abc47672abac9c2a99554cece5c642d2f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a97fb5c905c53500871cc5e2e90f1834634dac00","unresolved":false,"context_lines":[{"line_number":496,"context_line":"                                root_gb\u003d15,"},{"line_number":497,"context_line":"                                ephemeral_gb\u003d0,"},{"line_number":498,"context_line":"                                swap\u003d0)"},{"line_number":499,"context_line":"        fake_spec \u003d objects.RequestSpec(flavor\u003dflavor, force_hosts\u003d[\u0027test\u0027])"},{"line_number":500,"context_line":"        expected \u003d utils.ResourceRequest()"},{"line_number":501,"context_line":"        expected._rg_by_id[None] \u003d objects.RequestGroup("},{"line_number":502,"context_line":"            use_same_provider\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_15c58b5b","line":499,"range":{"start_line":499,"start_character":69,"end_line":499,"end_character":73},"updated":"2019-04-15 19:08:39.000000000","message":"nit: the mock covers this up, but either the host value in the ComputeNode objects above should be \u0027test\u0027 or this should be \u0027fake-host\u0027.","commit_id":"c0db968abc47672abac9c2a99554cece5c642d2f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a97fb5c905c53500871cc5e2e90f1834634dac00","unresolved":false,"context_lines":[{"line_number":524,"context_line":"        destination \u003d objects.Destination("},{"line_number":525,"context_line":"            host\u003d\u0027fake-host\u0027, node\u003d\u0027fake-node\u0027, cell\u003dfake_cell)"},{"line_number":526,"context_line":"        fake_nodes \u003d objects.ComputeNodeList(objects\u003d["},{"line_number":527,"context_line":"            objects.ComputeNode(host\u003d\u0027fake-host\u0027,"},{"line_number":528,"context_line":"                                uuid\u003d\u002712345678-1234-1234-1234-123456789012\u0027)"},{"line_number":529,"context_line":"            ])"},{"line_number":530,"context_line":"        self.mock_host_manager.get_compute_nodes_by_host_or_node.\\"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_357e8719","line":527,"range":{"start_line":527,"start_character":20,"end_line":527,"end_character":31},"updated":"2019-04-15 19:08:39.000000000","message":"nit: add hypervisor_hostname\u003d\u0027fake-node\u0027","commit_id":"c0db968abc47672abac9c2a99554cece5c642d2f"}]}
