)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make scheduler target cells to get compute node instance info"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This extends the previous patch to target cells during compute node"},{"line_number":10,"context_line":"discovery to also target cells when fetching information about"},{"line_number":11,"context_line":"instances prior to scheduling."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"bff0334d_e7464250","line":9,"range":{"start_line":9,"start_character":17,"end_line":9,"end_character":31},"updated":"2017-04-05 21:58:10.000000000","message":"I\u0027ve lost context on this so had to look it up to see it was Ic6dc46183676a91cf9037726316b677a29e2d342 you\u0027re referring to. It might be nice to put that in here in case we have to look back on this in a year and figure out what this is talking about.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b1977de5718955585260974e0f05ae62ae57b6f5","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    @property"},{"line_number":366,"context_line":"    def cells(self):"},{"line_number":367,"context_line":"        if not self._cells:"},{"line_number":368,"context_line":"            # NOTE(danms): global list of cells cached forever right now"},{"line_number":369,"context_line":"            self._cells \u003d objects.CellMappingList.get_all("},{"line_number":370,"context_line":"                context_module.get_admin_context())"}],"source_content_type":"text/x-python","patch_set":25,"id":"ffe62b97_2bae4998","line":367,"updated":"2017-03-30 09:42:59.000000000","message":"I\u0027m confused, we already have self.cells right?\nI think you probably forgot to modify this change now that you created a _load_cells() helper method in the bottom patch.","commit_id":"326b87e1180e7f6676858177753c2d59a72144bd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a04c307346295a93453f66509abb3c7a02dd80f8","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    @property"},{"line_number":366,"context_line":"    def cells(self):"},{"line_number":367,"context_line":"        if not self._cells:"},{"line_number":368,"context_line":"            # NOTE(danms): global list of cells cached forever right now"},{"line_number":369,"context_line":"            self._cells \u003d objects.CellMappingList.get_all("},{"line_number":370,"context_line":"                context_module.get_admin_context())"}],"source_content_type":"text/x-python","patch_set":25,"id":"dfeb2761_e1f406d2","line":367,"in_reply_to":"ffe62b97_2bae4998","updated":"2017-03-30 17:10:24.000000000","message":"Yep.","commit_id":"326b87e1180e7f6676858177753c2d59a72144bd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            if aggregate.id in self.host_aggregates_map[host]:"},{"line_number":402,"context_line":"                self.host_aggregates_map[host].remove(aggregate.id)"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def _init_instance_info(self, computes_by_cell\u003dNone):"},{"line_number":405,"context_line":"        \"\"\"Creates the initial view of instances for all hosts."},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        As this initial population of instance information may take some time,"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_a764baba","line":404,"range":{"start_line":404,"start_character":34,"end_line":404,"end_character":50},"updated":"2017-04-05 21:58:10.000000000","message":"I was wondering why we even have this but I guess it\u0027s because the IronicHostManager filters out non-Ironic hosts and passes those up to this method in the parent class.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":421,"context_line":""},{"line_number":422,"context_line":"            count \u003d 0"},{"line_number":423,"context_line":"            if not computes_by_cell:"},{"line_number":424,"context_line":"                computes_by_cell \u003d {}"},{"line_number":425,"context_line":"                for cell in self.cells:"},{"line_number":426,"context_line":"                    with context_module.target_cell(context, cell):"},{"line_number":427,"context_line":"                        cell_cns \u003d objects.ComputeNodeList.get_all("},{"line_number":428,"context_line":"                            context).objects"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_87ff7666","line":425,"range":{"start_line":424,"start_character":16,"end_line":425,"end_character":39},"updated":"2017-04-05 21:58:10.000000000","message":"This is all duplicated in the IronicHostManager subclass, so we could pull this out into a private helper method that both can use to avoid the duplication, but it\u0027s not a huge issue. This one also does the counting thing...","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                for cell in self.cells:"},{"line_number":426,"context_line":"                    with context_module.target_cell(context, cell):"},{"line_number":427,"context_line":"                        cell_cns \u003d objects.ComputeNodeList.get_all("},{"line_number":428,"context_line":"                            context).objects"},{"line_number":429,"context_line":"                        computes_by_cell[cell] \u003d cell_cns"},{"line_number":430,"context_line":"                        count +\u003d len(cell_cns)"},{"line_number":431,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_e7c1a230","line":428,"range":{"start_line":428,"start_character":36,"end_line":428,"end_character":44},"updated":"2017-04-05 21:58:10.000000000","message":"We shouldn\u0027t actually need this but I guess it was already here.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":591,"context_line":"                hosts, spec_obj)"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"    def _get_computes_for_cells(self, context, cells, compute_uuids\u003dNone):"},{"line_number":594,"context_line":"        \"\"\"Returns: a cell-uuid keyed dict of compute node lists.\"\"\""},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"        compute_nodes \u003d collections.defaultdict(list)"},{"line_number":597,"context_line":"        services \u003d {}"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_072126fc","line":594,"range":{"start_line":594,"start_character":8,"end_line":594,"end_character":68},"updated":"2017-04-05 21:58:10.000000000","message":"This is a lie, but not made any worse by this change. We could cleanup separately. This is returning a tuple where the first item is the cell-uuid keyed dict of compute node lists, the 2nd item is a dict of services keyed by host.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":607,"context_line":"                    compute_nodes[cell.uuid].extend("},{"line_number":608,"context_line":"                        objects.ComputeNodeList.get_all_by_uuids("},{"line_number":609,"context_line":"                            context, compute_uuids))"},{"line_number":610,"context_line":"                cell_services \u003d {"},{"line_number":611,"context_line":"                    service.host: service"},{"line_number":612,"context_line":"                    for service in objects.ServiceList.get_by_binary("},{"line_number":613,"context_line":"                            context, \u0027nova-compute\u0027,"},{"line_number":614,"context_line":"                            include_disabled\u003dTrue)"},{"line_number":615,"context_line":"                }"},{"line_number":616,"context_line":"                services.update(cell_services)"},{"line_number":617,"context_line":"        return compute_nodes, services"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    def _load_cells(self, context):"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_67d592b9","line":616,"range":{"start_line":610,"start_character":16,"end_line":616,"end_character":46},"updated":"2017-04-05 21:58:10.000000000","message":"Why does this even need to change here? I\u0027m missing what\u0027s different.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cd2ee4d1013e4c102f35c4589dd2c667c5b06978","unresolved":false,"context_lines":[{"line_number":607,"context_line":"                    compute_nodes[cell.uuid].extend("},{"line_number":608,"context_line":"                        objects.ComputeNodeList.get_all_by_uuids("},{"line_number":609,"context_line":"                            context, compute_uuids))"},{"line_number":610,"context_line":"                cell_services \u003d {"},{"line_number":611,"context_line":"                    service.host: service"},{"line_number":612,"context_line":"                    for service in objects.ServiceList.get_by_binary("},{"line_number":613,"context_line":"                            context, \u0027nova-compute\u0027,"},{"line_number":614,"context_line":"                            include_disabled\u003dTrue)"},{"line_number":615,"context_line":"                }"},{"line_number":616,"context_line":"                services.update(cell_services)"},{"line_number":617,"context_line":"        return compute_nodes, services"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    def _load_cells(self, context):"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_d93b229a","line":616,"range":{"start_line":610,"start_character":16,"end_line":616,"end_character":46},"in_reply_to":"bff0334d_67d592b9","updated":"2017-04-05 22:02:30.000000000","message":"This patch used to be below one that is now merged, and so in the process of rearranging, I implemented this slightly differently in both places and this is the reject.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"85458970a713a4eda8b4b721749c48a2f2b324d9","unresolved":false,"context_lines":[{"line_number":738,"context_line":"        host_info[\"updated\"] \u003d False"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    @utils.synchronized(HOST_INSTANCE_SEMAPHORE)"},{"line_number":741,"context_line":"    def update_instance_info(self, context, host_name, instance_info):"},{"line_number":742,"context_line":"        \"\"\"Receives an InstanceList object from a compute node."},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        This method receives information from a compute node when it starts up,"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_f905c67b","line":741,"range":{"start_line":741,"start_character":8,"end_line":741,"end_character":28},"updated":"2017-04-05 22:10:35.000000000","message":"OK the compute calls this on startup and in tests it\u0027s CastAsCall and if we don\u0027t have the hostmapping we blow up when we reach _recreate_instance_info which calls _get_instances_by_host and objects.HostMapping.get_by_host would fail with a NotFound.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"}],"nova/scheduler/ironic_host_manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                    computes_by_cell[cell] \u003d ("},{"line_number":117,"context_line":"                        objects.ComputeNodeList.get_all(context).objects)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        non_ironic_computes \u003d {cell: [c for c in compute_nodes"},{"line_number":120,"context_line":"                                      if not self._is_ironic_compute(c)]"},{"line_number":121,"context_line":"                               for cell, compute_nodes in"},{"line_number":122,"context_line":"                               computes_by_cell.items()}"},{"line_number":123,"context_line":"        super(IronicHostManager, self)._init_instance_info(non_ironic_computes)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _get_instance_info(self, context, compute):"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_e7c5225d","line":122,"range":{"start_line":119,"start_character":30,"end_line":122,"end_character":56},"updated":"2017-04-05 21:58:10.000000000","message":"Whew boy this is some python fun.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cd2ee4d1013e4c102f35c4589dd2c667c5b06978","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                    computes_by_cell[cell] \u003d ("},{"line_number":117,"context_line":"                        objects.ComputeNodeList.get_all(context).objects)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        non_ironic_computes \u003d {cell: [c for c in compute_nodes"},{"line_number":120,"context_line":"                                      if not self._is_ironic_compute(c)]"},{"line_number":121,"context_line":"                               for cell, compute_nodes in"},{"line_number":122,"context_line":"                               computes_by_cell.items()}"},{"line_number":123,"context_line":"        super(IronicHostManager, self)._init_instance_info(non_ironic_computes)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _get_instance_info(self, context, compute):"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_d96442bc","line":122,"range":{"start_line":119,"start_character":30,"end_line":122,"end_character":56},"in_reply_to":"bff0334d_e7c5225d","updated":"2017-04-05 22:02:30.000000000","message":"fun..and fast :)","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"}],"nova/test.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    def start_service(self, name, host\u003dNone, **kwargs):"},{"line_number":348,"context_line":"        if name \u003d\u003d \u0027compute\u0027 and self.USES_DB:"},{"line_number":349,"context_line":"            # NOTE(danms): We need to create the HostMapping first, because"},{"line_number":350,"context_line":"            # otherwise we\u0027ll fail to update the scheduler while running"},{"line_number":351,"context_line":"            # the compute node startup routines below."},{"line_number":352,"context_line":"            ctxt \u003d context.get_context()"},{"line_number":353,"context_line":"            cell \u003d self.cell_mappings[kwargs.pop(\u0027cell\u0027, CELL1_NAME)]"},{"line_number":354,"context_line":"            hm \u003d objects.HostMapping(context\u003dctxt,"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_674a3281","line":351,"range":{"start_line":349,"start_character":68,"end_line":351,"end_character":54},"updated":"2017-04-05 21:58:10.000000000","message":"I guess this is referring to _update_scheduler_instance_info which sends the instances to the scheduler via an rpc cast, and if you start the compute service before the scheduler, we just blast it into the ether and the scheduler has to figure out the information later on it\u0027s own?","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cd2ee4d1013e4c102f35c4589dd2c667c5b06978","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    def start_service(self, name, host\u003dNone, **kwargs):"},{"line_number":348,"context_line":"        if name \u003d\u003d \u0027compute\u0027 and self.USES_DB:"},{"line_number":349,"context_line":"            # NOTE(danms): We need to create the HostMapping first, because"},{"line_number":350,"context_line":"            # otherwise we\u0027ll fail to update the scheduler while running"},{"line_number":351,"context_line":"            # the compute node startup routines below."},{"line_number":352,"context_line":"            ctxt \u003d context.get_context()"},{"line_number":353,"context_line":"            cell \u003d self.cell_mappings[kwargs.pop(\u0027cell\u0027, CELL1_NAME)]"},{"line_number":354,"context_line":"            hm \u003d objects.HostMapping(context\u003dctxt,"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_d909e2dd","line":351,"range":{"start_line":349,"start_character":68,"end_line":351,"end_character":54},"in_reply_to":"bff0334d_674a3281","updated":"2017-04-05 22:02:30.000000000","message":"No, we\u0027ll fail because we call to the scheduler during init, which will fail to update because there is no host record. It won\u0027t work at all without this, it\u0027s not just an efficiency thing.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            ctxt \u003d context.get_context()"},{"line_number":353,"context_line":"            cell \u003d self.cell_mappings[kwargs.pop(\u0027cell\u0027, CELL1_NAME)]"},{"line_number":354,"context_line":"            hm \u003d objects.HostMapping(context\u003dctxt,"},{"line_number":355,"context_line":"                                     host\u003dhost or name,"},{"line_number":356,"context_line":"                                     cell_mapping\u003dcell)"},{"line_number":357,"context_line":"            hm.create()"},{"line_number":358,"context_line":"            self.host_mappings[hm.host] \u003d hm"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_593dd2b9","line":355,"range":{"start_line":355,"start_character":42,"end_line":355,"end_character":54},"updated":"2017-04-05 21:58:10.000000000","message":"This copies the logic in the ServiceFixture so that\u0027s good.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"}],"nova/tests/unit/scheduler/test_host_manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":875,"context_line":"            [objects.ServiceList(host\u003d\u0027foo\u0027)],"},{"line_number":876,"context_line":"            [objects.ServiceList(host\u003d\u0027bar\u0027)],"},{"line_number":877,"context_line":"        ]"},{"line_number":878,"context_line":"        computes \u003d ["},{"line_number":879,"context_line":"            [objects.ComputeNode(host\u003d\u0027foo\u0027)],"},{"line_number":880,"context_line":"            [objects.ComputeNode(host\u003d\u0027bar\u0027)],"},{"line_number":881,"context_line":"        ]"},{"line_number":882,"context_line":"        mock_cn.side_effect \u003d computes"},{"line_number":883,"context_line":"        context \u003d nova_context.RequestContext(\u0027fake\u0027, \u0027fake\u0027)"},{"line_number":884,"context_line":"        cns, srv \u003d self.host_manager._get_computes_for_cells(context, cells)"},{"line_number":885,"context_line":"        self.assertEqual({uuids.cell1: [\u0027foo\u0027],"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_d99fa2b2","line":882,"range":{"start_line":878,"start_character":8,"end_line":882,"end_character":38},"updated":"2017-04-05 21:58:10.000000000","message":"This seems unnecessary.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6bba40e77be5389ea2cd84efff45016c75d9911","unresolved":false,"context_lines":[{"line_number":905,"context_line":"            [objects.ServiceList(host\u003d\u0027foo\u0027)],"},{"line_number":906,"context_line":"            [objects.ServiceList(host\u003d\u0027bar\u0027)],"},{"line_number":907,"context_line":"        ]"},{"line_number":908,"context_line":"        computes \u003d ["},{"line_number":909,"context_line":"            [objects.ComputeNode(host\u003d\u0027foo\u0027)],"},{"line_number":910,"context_line":"            [objects.ComputeNode(host\u003d\u0027bar\u0027)],"},{"line_number":911,"context_line":"        ]"},{"line_number":912,"context_line":"        mock_cn.side_effect \u003d computes"},{"line_number":913,"context_line":"        context \u003d nova_context.RequestContext(\u0027fake\u0027, \u0027fake\u0027)"},{"line_number":914,"context_line":"        cns, srv \u003d self.host_manager._get_computes_for_cells(context, cells,"},{"line_number":915,"context_line":"                                                             [])"}],"source_content_type":"text/x-python","patch_set":26,"id":"bff0334d_f9838655","line":912,"range":{"start_line":908,"start_character":8,"end_line":912,"end_character":38},"updated":"2017-04-05 21:58:10.000000000","message":"Same.","commit_id":"90e48b63fbf1fa68c321a32c83b5c2a2c76f9d9a"}]}
