)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5e96c521139ff945f000c5492bdafc9e2b11fcc8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use a static resource tracker in compute manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There was one edge case in the compute manager wherein we would"},{"line_number":10,"context_line":"reinitialize the resource tracker. Jay promises that isn\u0027t needed"},{"line_number":11,"context_line":"anymore, so this change removes it. That allows us to remove the"},{"line_number":12,"context_line":"_get_resource_tracker() helper and set up the resource tracker just once"},{"line_number":13,"context_line":"during __init__ of the compute manager."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"bfdaf3ff_00d9967d","line":11,"range":{"start_line":10,"start_character":35,"end_line":11,"end_character":34},"updated":"2019-01-17 14:01:02.000000000","message":"It will be great to say why we needn\u0027t it anymore at here.","commit_id":"35ce77835bb271bad3c18eaf22146edac3a42ea0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1bf00bada16f728a8f3965edfd1d15310e2abed6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use a static resource tracker in compute manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There was one edge case in the compute manager wherein we would"},{"line_number":10,"context_line":"reinitialize the resource tracker. Jay promises that isn\u0027t needed"},{"line_number":11,"context_line":"anymore, so this change removes it. That allows us to remove the"},{"line_number":12,"context_line":"_get_resource_tracker() helper and set up the resource tracker just once"},{"line_number":13,"context_line":"during __init__ of the compute manager."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"9fdfeff1_6434a64b","line":11,"range":{"start_line":10,"start_character":35,"end_line":11,"end_character":34},"in_reply_to":"9fdfeff1_1245ea70","updated":"2019-01-21 06:01:30.000000000","message":"Thanks, Jay","commit_id":"35ce77835bb271bad3c18eaf22146edac3a42ea0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7ecdd368af3ce532e0b27e4fcc15fb89f203a1bb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use a static resource tracker in compute manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There was one edge case in the compute manager wherein we would"},{"line_number":10,"context_line":"reinitialize the resource tracker. Jay promises that isn\u0027t needed"},{"line_number":11,"context_line":"anymore, so this change removes it. That allows us to remove the"},{"line_number":12,"context_line":"_get_resource_tracker() helper and set up the resource tracker just once"},{"line_number":13,"context_line":"during __init__ of the compute manager."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"9fdfeff1_1245ea70","line":11,"range":{"start_line":10,"start_character":35,"end_line":11,"end_character":34},"in_reply_to":"bfdaf3ff_00d9967d","updated":"2019-01-18 19:06:59.000000000","message":"It\u0027s in the comment that was removed by this patch:\n\naround here... https://review.openstack.org/#/c/620711/18/nova/compute/manager.py@7675\n\n            # TODO(jaypipes): Yes, this is inefficient to throw away all of the\n            # compute nodes to force a rebuild, but this is only temporary\n            # until Ironic baremetal node resource providers are tracked\n            # properly in the report client and this is a tiny edge case\n            # anyway.\n            self._resource_tracker \u003d None\n\nThe gist of it is that we were only doing this when we had multiple ResourceTracker instances, one for each Ironic baremetal resource node. There is only a single ResourceTracker instance now, which tracks all information for all Ironic baremetal resource nodes managed by the nova-compute service worker, so there\u0027s no need to re-initialize the resource tracker object any more.","commit_id":"35ce77835bb271bad3c18eaf22146edac3a42ea0"}],"nova/compute/manager.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"10711ce9f0ba44aa253d6492b995ee0861a9ca54","unresolved":false,"context_lines":[{"line_number":755,"context_line":"    def _complete_deletion(self, context, instance):"},{"line_number":756,"context_line":"        self._update_resource_tracker(context, instance)"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":"        self.rt.reportclient.delete_allocation_for_instance(context,"},{"line_number":759,"context_line":"                                                            instance.uuid)"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"        self._clean_instance_console_tokens(context, instance)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bfdaf3ff_69175ba5","line":758,"updated":"2019-01-15 18:09:21.000000000","message":"I\u0027m not sure how I feel about this. The implication here, by having a \u0027self.rt\u0027 prefix is that somehow what\u0027s happening here is somehow relevant to this thing called a ResourceTracker. It isn\u0027t, really. It\u0027s simply that we\u0027re deleting some allocations.\n\nThis is maintaining that never really true illusion (at least not since we moved to one resource tracker) that there\u0027s some separation between the manager and the resource tracker.\n\nI agree that we should have a self.rt (for things like instance_claim()\n\nBut I reckon it is cleaner to have a self.reportclient, not a self.rt.reportclient if there is never going to be a self.something_else.reportclient\n\nEarlier in the stack, you deleted a TODO of mine, which was to move a call to reportclient to be a call to rt so that we\u0027re only interacting with one layer of the rt, not sometimes punching through to the reportclient. But the way we have ended up doing things is to make the reportclient the placementclient, and thus lots of thing need to talk to reportclient, thus punching through is normal to the point of mentioning the rt at all is redundant.\n\nTherefore self.rt.reportclient feels like noise.","commit_id":"ed5362d09f655e8f04d0f9ccae22f9c4480a852c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3af3aba3867b554436117532b37b9c0b1f5eaed0","unresolved":false,"context_lines":[{"line_number":755,"context_line":"    def _complete_deletion(self, context, instance):"},{"line_number":756,"context_line":"        self._update_resource_tracker(context, instance)"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":"        self.rt.reportclient.delete_allocation_for_instance(context,"},{"line_number":759,"context_line":"                                                            instance.uuid)"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":"        self._clean_instance_console_tokens(context, instance)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bfdaf3ff_818ff321","line":758,"in_reply_to":"bfdaf3ff_69175ba5","updated":"2019-01-15 20:20:37.000000000","message":"Okay, I fixed this, creating a self.reportclient member, but note that I did have to make sure that\n\n self.reportclient \u003d self.rt.reportclient\n\ndidn\u0027t e.g. end up with None because of some lazy init the resource tracker was doing. I agree it\u0027s nicer to have .rt out of the picture for the reasons you state, but at least that provided some explicitness and clarity that we were using one and only one report client.","commit_id":"ed5362d09f655e8f04d0f9ccae22f9c4480a852c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97275d8244def312860351409625342d0ac2a86d","unresolved":false,"context_lines":[{"line_number":7670,"context_line":"            self.rt.update_available_resource(context, nodename,"},{"line_number":7671,"context_line":"                                              startup\u003dstartup)"},{"line_number":7672,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":7673,"context_line":"            # NOTE(comstud): We can get to this case if a node was"},{"line_number":7674,"context_line":"            # marked \u0027deleted\u0027 in the DB and then re-added with a"},{"line_number":7675,"context_line":"            # different auto-increment id. The cached resource"},{"line_number":7676,"context_line":"            # tracker tried to update a deleted record and failed."},{"line_number":7677,"context_line":"            # Don\u0027t add this resource tracker to the new dict, so"},{"line_number":7678,"context_line":"            # that this will resolve itself on the next run."},{"line_number":7679,"context_line":"            LOG.info(\"Compute node \u0027%s\u0027 not found in \""},{"line_number":7680,"context_line":"                     \"update_available_resource.\", nodename)"},{"line_number":7681,"context_line":"        except exception.ReshapeFailed:"}],"source_content_type":"text/x-python","patch_set":13,"id":"bfdaf3ff_59acbe8b","line":7678,"range":{"start_line":7673,"start_character":12,"end_line":7678,"end_character":60},"updated":"2019-01-14 18:24:45.000000000","message":"Remove this comment, which refers to a time when we had a ResourceTracker instance per baremetal Ironic node.","commit_id":"ed5362d09f655e8f04d0f9ccae22f9c4480a852c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3af3aba3867b554436117532b37b9c0b1f5eaed0","unresolved":false,"context_lines":[{"line_number":7670,"context_line":"            self.rt.update_available_resource(context, nodename,"},{"line_number":7671,"context_line":"                                              startup\u003dstartup)"},{"line_number":7672,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":7673,"context_line":"            # NOTE(comstud): We can get to this case if a node was"},{"line_number":7674,"context_line":"            # marked \u0027deleted\u0027 in the DB and then re-added with a"},{"line_number":7675,"context_line":"            # different auto-increment id. The cached resource"},{"line_number":7676,"context_line":"            # tracker tried to update a deleted record and failed."},{"line_number":7677,"context_line":"            # Don\u0027t add this resource tracker to the new dict, so"},{"line_number":7678,"context_line":"            # that this will resolve itself on the next run."},{"line_number":7679,"context_line":"            LOG.info(\"Compute node \u0027%s\u0027 not found in \""},{"line_number":7680,"context_line":"                     \"update_available_resource.\", nodename)"},{"line_number":7681,"context_line":"        except exception.ReshapeFailed:"}],"source_content_type":"text/x-python","patch_set":13,"id":"bfdaf3ff_a14f9790","line":7678,"range":{"start_line":7673,"start_character":12,"end_line":7678,"end_character":60},"in_reply_to":"bfdaf3ff_59acbe8b","updated":"2019-01-15 20:20:37.000000000","message":"Done","commit_id":"ed5362d09f655e8f04d0f9ccae22f9c4480a852c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97275d8244def312860351409625342d0ac2a86d","unresolved":false,"context_lines":[{"line_number":7676,"context_line":"            # tracker tried to update a deleted record and failed."},{"line_number":7677,"context_line":"            # Don\u0027t add this resource tracker to the new dict, so"},{"line_number":7678,"context_line":"            # that this will resolve itself on the next run."},{"line_number":7679,"context_line":"            LOG.info(\"Compute node \u0027%s\u0027 not found in \""},{"line_number":7680,"context_line":"                     \"update_available_resource.\", nodename)"},{"line_number":7681,"context_line":"        except exception.ReshapeFailed:"},{"line_number":7682,"context_line":"            # We\u0027re only supposed to get here on startup, if a reshape was"}],"source_content_type":"text/x-python","patch_set":13,"id":"bfdaf3ff_198f1624","line":7679,"range":{"start_line":7679,"start_character":16,"end_line":7679,"end_character":20},"updated":"2019-01-14 18:24:45.000000000","message":"change this to a warning() please","commit_id":"ed5362d09f655e8f04d0f9ccae22f9c4480a852c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3af3aba3867b554436117532b37b9c0b1f5eaed0","unresolved":false,"context_lines":[{"line_number":7676,"context_line":"            # tracker tried to update a deleted record and failed."},{"line_number":7677,"context_line":"            # Don\u0027t add this resource tracker to the new dict, so"},{"line_number":7678,"context_line":"            # that this will resolve itself on the next run."},{"line_number":7679,"context_line":"            LOG.info(\"Compute node \u0027%s\u0027 not found in \""},{"line_number":7680,"context_line":"                     \"update_available_resource.\", nodename)"},{"line_number":7681,"context_line":"        except exception.ReshapeFailed:"},{"line_number":7682,"context_line":"            # We\u0027re only supposed to get here on startup, if a reshape was"}],"source_content_type":"text/x-python","patch_set":13,"id":"bfdaf3ff_4146eb7e","line":7679,"range":{"start_line":7679,"start_character":16,"end_line":7679,"end_character":20},"in_reply_to":"bfdaf3ff_198f1624","updated":"2019-01-15 20:20:37.000000000","message":"Done","commit_id":"ed5362d09f655e8f04d0f9ccae22f9c4480a852c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"56dca098aecb8e4bb1db64553cfc05733909092c","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        self.use_legacy_block_device_info \u003d \\"},{"line_number":538,"context_line":"                            self.driver.need_legacy_block_device_info"},{"line_number":539,"context_line":"        self.rt \u003d resource_tracker.ResourceTracker(self.host, self.driver)"},{"line_number":540,"context_line":"        self.reportclient \u003d self.rt.reportclient"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"    def reset(self):"},{"line_number":543,"context_line":"        LOG.info(\u0027Reloading compute RPC API\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_957ea4ad","line":540,"updated":"2019-02-04 14:42:27.000000000","message":"we still have a reference from the RT, but okay.","commit_id":"35ce77835bb271bad3c18eaf22146edac3a42ea0"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2151cd60d9966accecb1f68fe6436a3126fec67d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        self.cpu_allocation_ratio \u003d CONF.cpu_allocation_ratio"},{"line_number":154,"context_line":"        self.disk_allocation_ratio \u003d CONF.disk_allocation_ratio"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def get_node_uuid(self, nodename):"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            return self.compute_nodes[nodename].uuid"},{"line_number":159,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_13040d6b","side":"PARENT","line":156,"updated":"2018-11-28 22:14:37.000000000","message":"This was added in I982b211e0315bdb9a816f346fafffd0f70e46d07 and it was used:\n\nhttps://github.com/openstack/nova/blob/stable/rocky/nova/compute/manager.py#L3939\n\nand that code was removed in Stein:\n\nI0851e2d54a1fdc82fe3291fb7e286e790f121e92\n\nTherefore, it\u0027s OK to remove this, but let\u0027s do it completely outside of this change to not muddy it up.","commit_id":"84825b16f20adfaf9264e5c87d7feaf6480f076e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c7683c47daf18913dc86939b397ffbd2360e09e4","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        self.cpu_allocation_ratio \u003d CONF.cpu_allocation_ratio"},{"line_number":154,"context_line":"        self.disk_allocation_ratio \u003d CONF.disk_allocation_ratio"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def get_node_uuid(self, nodename):"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            return self.compute_nodes[nodename].uuid"},{"line_number":159,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_13316d09","side":"PARENT","line":156,"in_reply_to":"3f79a3b5_13040d6b","updated":"2018-11-28 22:29:46.000000000","message":"Roger that.\n\nhttps://review.openstack.org/#/c/620715/","commit_id":"84825b16f20adfaf9264e5c87d7feaf6480f076e"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"97275d8244def312860351409625342d0ac2a86d","unresolved":false,"context_lines":[{"line_number":7469,"context_line":"        # make sure rt usage doesn\u0027t update if the host or node is different"},{"line_number":7470,"context_line":"        instance \u003d self._create_fake_instance_obj({\u0027host\u0027: \u0027someotherhost\u0027})"},{"line_number":7471,"context_line":"        with mock.patch.object(self.compute.rt, \u0027_update_usage\u0027,"},{"line_number":7472,"context_line":"                               new\u003dmock.NonCallableMock()):"},{"line_number":7473,"context_line":"            self.compute._instance_update(self.context, instance, vcpus\u003d4)"},{"line_number":7474,"context_line":""},{"line_number":7475,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"bfdaf3ff_996c6637","line":7472,"updated":"2019-01-14 18:24:45.000000000","message":"hmm, interesting. nice :)","commit_id":"ed5362d09f655e8f04d0f9ccae22f9c4480a852c"}]}
