)]}'
{"nova/compute/claims.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"581db025224205dfc877735c13dc5279de1597b0","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    \"\"\""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, context, instance, nodename, tracker, resources,"},{"line_number":78,"context_line":"            pci_requests, overhead\u003dNone, limits\u003dNone):"},{"line_number":79,"context_line":"        super(Claim, self).__init__()"},{"line_number":80,"context_line":"        # Stash a copy of the instance at the current point of time"},{"line_number":81,"context_line":"        self.instance \u003d instance.obj_clone()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_6ffde86d","line":78,"updated":"2016-12-19 15:49:58.000000000","message":"one type of indent","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"daa1fef882af168f8ca02bc042a411a1d0168d1e","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    \"\"\""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, context, instance, nodename, tracker, resources,"},{"line_number":78,"context_line":"            pci_requests, overhead\u003dNone, limits\u003dNone):"},{"line_number":79,"context_line":"        super(Claim, self).__init__()"},{"line_number":80,"context_line":"        # Stash a copy of the instance at the current point of time"},{"line_number":81,"context_line":"        self.instance \u003d instance.obj_clone()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_cf6c370b","line":78,"in_reply_to":"1a6eadb0_0a8d427b","updated":"2016-12-19 17:40:12.000000000","message":"Done","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccb070bc03e82756b42ee8e2ffef2f37f672c540","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    \"\"\""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, context, instance, nodename, tracker, resources,"},{"line_number":78,"context_line":"            pci_requests, overhead\u003dNone, limits\u003dNone):"},{"line_number":79,"context_line":"        super(Claim, self).__init__()"},{"line_number":80,"context_line":"        # Stash a copy of the instance at the current point of time"},{"line_number":81,"context_line":"        self.instance \u003d instance.obj_clone()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_0a8d427b","line":78,"in_reply_to":"1a6eadb0_6ffde86d","updated":"2016-12-19 16:43:21.000000000","message":"Ew yeah I\u0027d like to see this aligned properly with self above.","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"581db025224205dfc877735c13dc5279de1597b0","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        \"\"\""},{"line_number":124,"context_line":"        LOG.debug(\"Aborting claim: %s\", self, instance\u003dself.instance)"},{"line_number":125,"context_line":"        self.tracker.abort_instance_claim(self.context, self.instance,"},{"line_number":126,"context_line":"                                          self.nodename)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def _claim_test(self, resources, limits\u003dNone):"},{"line_number":129,"context_line":"        \"\"\"Test if this claim can be satisfied given available resources and"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_cff43c89","line":126,"updated":"2016-12-19 15:49:58.000000000","message":"different here","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fbb30cbaa097606edf23180d463035aa6564584e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        \"\"\""},{"line_number":124,"context_line":"        LOG.debug(\"Aborting claim: %s\", self, instance\u003dself.instance)"},{"line_number":125,"context_line":"        self.tracker.abort_instance_claim(self.context, self.instance,"},{"line_number":126,"context_line":"                                          self.nodename)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def _claim_test(self, resources, limits\u003dNone):"},{"line_number":129,"context_line":"        \"\"\"Test if this claim can be satisfied given available resources and"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_495587c4","line":126,"in_reply_to":"1a6eadb0_cff43c89","updated":"2016-12-19 16:38:27.000000000","message":"I just kept the indent style the same since it didn\u0027t result in changed number of lines...","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"581db025224205dfc877735c13dc5279de1597b0","unresolved":false,"context_lines":[{"line_number":262,"context_line":"    Move can be either a migrate/resize, live-migrate or an evacuate operation."},{"line_number":263,"context_line":"    \"\"\""},{"line_number":264,"context_line":"    def __init__(self, context, instance, nodename, instance_type, image_meta,"},{"line_number":265,"context_line":"            tracker, resources, pci_requests, overhead\u003dNone, limits\u003dNone):"},{"line_number":266,"context_line":"        self.context \u003d context"},{"line_number":267,"context_line":"        self.instance_type \u003d instance_type"},{"line_number":268,"context_line":"        if isinstance(image_meta, dict):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_ef1c986c","line":265,"updated":"2016-12-19 15:49:58.000000000","message":"and then this one here?","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"daa1fef882af168f8ca02bc042a411a1d0168d1e","unresolved":false,"context_lines":[{"line_number":262,"context_line":"    Move can be either a migrate/resize, live-migrate or an evacuate operation."},{"line_number":263,"context_line":"    \"\"\""},{"line_number":264,"context_line":"    def __init__(self, context, instance, nodename, instance_type, image_meta,"},{"line_number":265,"context_line":"            tracker, resources, pci_requests, overhead\u003dNone, limits\u003dNone):"},{"line_number":266,"context_line":"        self.context \u003d context"},{"line_number":267,"context_line":"        self.instance_type \u003d instance_type"},{"line_number":268,"context_line":"        if isinstance(image_meta, dict):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_ef71f3e1","line":265,"in_reply_to":"1a6eadb0_6ac956ac","updated":"2016-12-19 17:40:12.000000000","message":"Done","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccb070bc03e82756b42ee8e2ffef2f37f672c540","unresolved":false,"context_lines":[{"line_number":262,"context_line":"    Move can be either a migrate/resize, live-migrate or an evacuate operation."},{"line_number":263,"context_line":"    \"\"\""},{"line_number":264,"context_line":"    def __init__(self, context, instance, nodename, instance_type, image_meta,"},{"line_number":265,"context_line":"            tracker, resources, pci_requests, overhead\u003dNone, limits\u003dNone):"},{"line_number":266,"context_line":"        self.context \u003d context"},{"line_number":267,"context_line":"        self.instance_type \u003d instance_type"},{"line_number":268,"context_line":"        if isinstance(image_meta, dict):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_6ac956ac","line":265,"in_reply_to":"1a6eadb0_ef1c986c","updated":"2016-12-19 16:43:21.000000000","message":"This alignment really assaults my delicate sensibilities.","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fbb30cbaa097606edf23180d463035aa6564584e","unresolved":false,"context_lines":[{"line_number":262,"context_line":"    Move can be either a migrate/resize, live-migrate or an evacuate operation."},{"line_number":263,"context_line":"    \"\"\""},{"line_number":264,"context_line":"    def __init__(self, context, instance, nodename, instance_type, image_meta,"},{"line_number":265,"context_line":"            tracker, resources, pci_requests, overhead\u003dNone, limits\u003dNone):"},{"line_number":266,"context_line":"        self.context \u003d context"},{"line_number":267,"context_line":"        self.instance_type \u003d instance_type"},{"line_number":268,"context_line":"        if isinstance(image_meta, dict):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_a9d45b47","line":265,"in_reply_to":"1a6eadb0_ef1c986c","updated":"2016-12-19 16:38:27.000000000","message":"Well, this is the same indent style as on line 77-78. (it\u0027s whatever indentation ends up by me doing Vgq in vim ;)","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7c06faa36c58d68aed2e3fbd9fde333c3b3cb62","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        pass"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __str__(self):"},{"line_number":62,"context_line":"        return \"[Claim: %d MB memory, %d GB disk]\" % (self.memory_mb,"},{"line_number":63,"context_line":"                self.disk_gb)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_66d9a421","line":62,"updated":"2017-01-13 19:18:57.000000000","message":"Totally unrelated, but I wonder why vcpus isn\u0027t in here.","commit_id":"8c698e5ee2aee1e0a7e41dfb03bc3a799ba19a29"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"efd0025bb4aaf8da8d10e09aea53006e2247f6a2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        pass"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __str__(self):"},{"line_number":62,"context_line":"        return \"[Claim: %d MB memory, %d GB disk]\" % (self.memory_mb,"},{"line_number":63,"context_line":"                self.disk_gb)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_dc9bf270","line":62,"in_reply_to":"7a3c09a3_66d9a421","updated":"2017-01-15 12:19:29.000000000","message":"No idea :(","commit_id":"8c698e5ee2aee1e0a7e41dfb03bc3a799ba19a29"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"07692e777297da6083cdce271061b2143b33329b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    correct decisions with respect to host selection."},{"line_number":75,"context_line":"    \"\"\""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, context, instance, nodename, tracker, resources,"},{"line_number":78,"context_line":"                 pci_requests, overhead\u003dNone, limits\u003dNone):"},{"line_number":79,"context_line":"        super(Claim, self).__init__()"},{"line_number":80,"context_line":"        # Stash a copy of the instance at the current point of time"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a3905b3_765138d8","line":77,"range":{"start_line":77,"start_character":42,"end_line":77,"end_character":71},"updated":"2017-01-20 08:45:55.000000000","message":"I\u0027m not a super fan of those super explicit (nodename, tracker) arguments that are only here for callbacking the RT (I\u0027d rather pass some object that I would directly call back) but meh, that\u0027s a big refactoring and I\u0027d really like to have those changes to be merged for Ocata.","commit_id":"1c967593fbb0ab8b9dc8b0b509e388591d32f537"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccb070bc03e82756b42ee8e2ffef2f37f672c540","unresolved":false,"context_lines":[{"line_number":548,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _get_resource_tracker(self):"},{"line_number":551,"context_line":"        rt \u003d self._resource_tracker"},{"line_number":552,"context_line":"        if not rt:"},{"line_number":553,"context_line":"            rt \u003d resource_tracker.ResourceTracker(self.host,"},{"line_number":554,"context_line":"                                                  self.driver)"},{"line_number":555,"context_line":"            self._resource_tracker \u003d rt"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_25e87116","line":552,"range":{"start_line":551,"start_character":8,"end_line":552,"end_character":18},"updated":"2016-12-19 16:43:21.000000000","message":"nit: this could just be:\n\n  if self._resource_tracker is None:\n    ...\n  return self._resource_tracker","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"daa1fef882af168f8ca02bc042a411a1d0168d1e","unresolved":false,"context_lines":[{"line_number":548,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _get_resource_tracker(self):"},{"line_number":551,"context_line":"        rt \u003d self._resource_tracker"},{"line_number":552,"context_line":"        if not rt:"},{"line_number":553,"context_line":"            rt \u003d resource_tracker.ResourceTracker(self.host,"},{"line_number":554,"context_line":"                                                  self.driver)"},{"line_number":555,"context_line":"            self._resource_tracker \u003d rt"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_af4e1b94","line":552,"range":{"start_line":551,"start_character":8,"end_line":552,"end_character":18},"in_reply_to":"1a6eadb0_25e87116","updated":"2016-12-19 17:40:12.000000000","message":"Done","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"8c8c7942eab8859b3e8198c36b317e3d7ff3a007","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        if self._resource_tracker:"},{"line_number":552,"context_line":"            return self._resource_tracker"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        rt \u003d resource_tracker.ResourceTracker(self.host,"},{"line_number":555,"context_line":"                                              self.driver)"},{"line_number":556,"context_line":"        self._resource_tracker \u003d rt"},{"line_number":557,"context_line":"        return rt"},{"line_number":558,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a6eadb0_566dfb30","line":555,"range":{"start_line":554,"start_character":8,"end_line":555,"end_character":58},"updated":"2016-12-20 10:57:21.000000000","message":"That will definitely fit in one line","commit_id":"10f517a442d5c72397bb39010e95ed9551a61e6e"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"e73b4ea76a97a09820212ef5366cb4476c3c52fa","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        compute_rpcapi.LAST_VERSION \u003d None"},{"line_number":548,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _get_resource_tracker(self):"},{"line_number":551,"context_line":"        if self._resource_tracker:"},{"line_number":552,"context_line":"            return self._resource_tracker"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        rt \u003d resource_tracker.ResourceTracker(self.host,"},{"line_number":555,"context_line":"                                              self.driver)"},{"line_number":556,"context_line":"        self._resource_tracker \u003d rt"},{"line_number":557,"context_line":"        return rt"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def _update_resource_tracker(self, context, instance):"},{"line_number":560,"context_line":"        \"\"\"Let the resource tracker know that an instance has changed state.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba5201f7_d7dd8e15","line":557,"range":{"start_line":550,"start_character":3,"end_line":557,"end_character":17},"updated":"2017-01-03 13:39:44.000000000","message":"how about:\n\n    def _get_resource_tracker(self):\n        if not self._resource_tracker:\n            self._resource_tracker \u003d resource_tracker.ResourceTracker(\n                    self.host, self.driver)\n        return self._resource_tracker\n\nor:\n\n    def _get_resource_tracker(self):\n        if not self._resource_tracker:\n            rt \u003d  resource_tracker.ResourceTracker(self.host, self.driver)\n            self._resource_tracker \u003d rt\n        return self._resource_tracker\n\n?","commit_id":"95d1b115c63b234036c42c5aaa4c32a5a54ca6fb"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2a2f1074a5c9f9a6fbdef56c3afdaf606cf5d97c","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        compute_rpcapi.LAST_VERSION \u003d None"},{"line_number":548,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _get_resource_tracker(self):"},{"line_number":551,"context_line":"        if self._resource_tracker:"},{"line_number":552,"context_line":"            return self._resource_tracker"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        rt \u003d resource_tracker.ResourceTracker(self.host,"},{"line_number":555,"context_line":"                                              self.driver)"},{"line_number":556,"context_line":"        self._resource_tracker \u003d rt"},{"line_number":557,"context_line":"        return rt"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def _update_resource_tracker(self, context, instance):"},{"line_number":560,"context_line":"        \"\"\"Let the resource tracker know that an instance has changed state.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba5201f7_303872a0","line":557,"range":{"start_line":550,"start_character":3,"end_line":557,"end_character":17},"in_reply_to":"ba5201f7_b2f3b59d","updated":"2017-01-04 14:24:04.000000000","message":"Slightly better performance-wise, but not enough to warrant a re-spin:\n\n    def _create_resource_tracker(self):\n        rt \u003d resource_tracker.ResourceTracker(self.host, self.driver)\n        self._resource_tracker \u003d rt\n        return rt\n\n    def _get_resource_tracker(self):\n        return self._resource_tracker or self._create_resource_tracker()\n\nThis avoids hitting the if: test on every pass except the one where the RT isn\u0027t there.","commit_id":"95d1b115c63b234036c42c5aaa4c32a5a54ca6fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5acba504c09cadf6de10b6457ed3a84b9573c503","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        compute_rpcapi.LAST_VERSION \u003d None"},{"line_number":548,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def _get_resource_tracker(self):"},{"line_number":551,"context_line":"        if self._resource_tracker:"},{"line_number":552,"context_line":"            return self._resource_tracker"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        rt \u003d resource_tracker.ResourceTracker(self.host,"},{"line_number":555,"context_line":"                                              self.driver)"},{"line_number":556,"context_line":"        self._resource_tracker \u003d rt"},{"line_number":557,"context_line":"        return rt"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def _update_resource_tracker(self, context, instance):"},{"line_number":560,"context_line":"        \"\"\"Let the resource tracker know that an instance has changed state.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba5201f7_b2f3b59d","line":557,"range":{"start_line":550,"start_character":3,"end_line":557,"end_character":17},"in_reply_to":"ba5201f7_d7dd8e15","updated":"2017-01-03 15:12:36.000000000","message":"Done","commit_id":"95d1b115c63b234036c42c5aaa4c32a5a54ca6fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7c06faa36c58d68aed2e3fbd9fde333c3b3cb62","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    def _get_resource_tracker(self, nodename):"},{"line_number":551,"context_line":"        rt \u003d self._resource_tracker_dict.get(nodename)"},{"line_number":552,"context_line":"        if not rt:"},{"line_number":553,"context_line":"            if not self.driver.node_is_available(nodename):"},{"line_number":554,"context_line":"                raise exception.NovaException("},{"line_number":555,"context_line":"                        _(\"%s is not a valid node managed by this \""},{"line_number":556,"context_line":"                          \"compute host.\") % nodename)"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_494cbb70","side":"PARENT","line":553,"range":{"start_line":553,"start_character":31,"end_line":553,"end_character":48},"updated":"2017-01-13 19:18:57.000000000","message":"Where do we check this now? Should we check this in the resource tracker itself now, or is it no longer a necessary check?","commit_id":"7b95b4d60726b6c8d0e0fe939c408a91ada79e0c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a3ddc797b823c80e0cc68700ddd3c96bf68d99cc","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    def _get_resource_tracker(self, nodename):"},{"line_number":551,"context_line":"        rt \u003d self._resource_tracker_dict.get(nodename)"},{"line_number":552,"context_line":"        if not rt:"},{"line_number":553,"context_line":"            if not self.driver.node_is_available(nodename):"},{"line_number":554,"context_line":"                raise exception.NovaException("},{"line_number":555,"context_line":"                        _(\"%s is not a valid node managed by this \""},{"line_number":556,"context_line":"                          \"compute host.\") % nodename)"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_34640ae4","side":"PARENT","line":553,"range":{"start_line":553,"start_character":31,"end_line":553,"end_character":48},"in_reply_to":"7a3c09a3_494cbb70","updated":"2017-01-15 17:51:32.000000000","message":"I need to add this into the RT, where it belongs, not here in the manager. I also need to remove the node_is_available() call on line 560 in this file.","commit_id":"7b95b4d60726b6c8d0e0fe939c408a91ada79e0c"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"07d21ed5154cfbb07d69564a20839eaaf44f6232","unresolved":false,"context_lines":[{"line_number":929,"context_line":"        cn.free_ram_mb \u003d (cn.memory_mb -"},{"line_number":930,"context_line":"                                         cn.memory_mb_used)"},{"line_number":931,"context_line":"        cn.free_disk_gb \u003d (cn.local_gb -"},{"line_number":932,"context_line":"                                          cn.local_gb_used)"},{"line_number":933,"context_line":"        cn.current_workload \u003d 0"},{"line_number":934,"context_line":"        cn.running_vms \u003d 0"},{"line_number":935,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_fbe1192b","line":932,"updated":"2016-11-28 19:26:25.000000000","message":"Formatting has gone all funky here, result of search and replace?","commit_id":"3819e051f44d8dde181735180e8f7f2e72cc6bac"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ff2a3b677a307ad640bd7ce6b1da4bd4c0c7c4c3","unresolved":false,"context_lines":[{"line_number":929,"context_line":"        cn.free_ram_mb \u003d (cn.memory_mb -"},{"line_number":930,"context_line":"                                         cn.memory_mb_used)"},{"line_number":931,"context_line":"        cn.free_disk_gb \u003d (cn.local_gb -"},{"line_number":932,"context_line":"                                          cn.local_gb_used)"},{"line_number":933,"context_line":"        cn.current_workload \u003d 0"},{"line_number":934,"context_line":"        cn.running_vms \u003d 0"},{"line_number":935,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_fb4839b5","line":932,"in_reply_to":"5a74a57a_fbe1192b","updated":"2016-11-28 19:30:25.000000000","message":"Ya, will fix up.","commit_id":"3819e051f44d8dde181735180e8f7f2e72cc6bac"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"c7f05f52904509733ac5888ab38a2c76d5aa1d1c","unresolved":false,"context_lines":[{"line_number":926,"context_line":"        cn.local_gb_used \u003d CONF.reserved_host_disk_mb / 1024"},{"line_number":927,"context_line":"        cn.memory_mb_used \u003d CONF.reserved_host_memory_mb"},{"line_number":928,"context_line":"        cn.vcpus_used \u003d 0"},{"line_number":929,"context_line":"        cn.free_ram_mb \u003d (cn.memory_mb -"},{"line_number":930,"context_line":"                                         cn.memory_mb_used)"},{"line_number":931,"context_line":"        cn.free_disk_gb \u003d (cn.local_gb -"},{"line_number":932,"context_line":"                                          cn.local_gb_used)"},{"line_number":933,"context_line":"        cn.current_workload \u003d 0"},{"line_number":934,"context_line":"        cn.running_vms \u003d 0"},{"line_number":935,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_45bee665","line":932,"range":{"start_line":929,"start_character":8,"end_line":932,"end_character":59},"updated":"2016-12-05 12:45:53.000000000","message":"Formatting is still wrong…","commit_id":"dba7b6fe5142ac639664b331ccb73423f30131e7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccb070bc03e82756b42ee8e2ffef2f37f672c540","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                  during the instance build."},{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":"        if self.disabled(nodename):"},{"line_number":121,"context_line":"            # compute_driver doesn\u0027t support resource tracking, just"},{"line_number":122,"context_line":"            # set the \u0027host\u0027 and node fields and continue the build:"},{"line_number":123,"context_line":"            self._set_instance_host_and_node(instance, nodename)"},{"line_number":124,"context_line":"            return claims.NopClaim()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_855ea574","line":121,"range":{"start_line":121,"start_character":12,"end_line":121,"end_character":62},"updated":"2016-12-19 16:43:21.000000000","message":"Do we actually have any of these? Except maybe the fake virt driver, but even that does some crude accounting now.","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"daa1fef882af168f8ca02bc042a411a1d0168d1e","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                  during the instance build."},{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":"        if self.disabled(nodename):"},{"line_number":121,"context_line":"            # compute_driver doesn\u0027t support resource tracking, just"},{"line_number":122,"context_line":"            # set the \u0027host\u0027 and node fields and continue the build:"},{"line_number":123,"context_line":"            self._set_instance_host_and_node(instance, nodename)"},{"line_number":124,"context_line":"            return claims.NopClaim()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_af1c5b78","line":121,"range":{"start_line":121,"start_character":12,"end_line":121,"end_character":62},"in_reply_to":"1a6eadb0_855ea574","updated":"2016-12-19 17:40:12.000000000","message":"Done","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccb070bc03e82756b42ee8e2ffef2f37f672c540","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            self._update(context.elevated(), self.compute_nodes[nodename])"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def disabled(self, nodename):"},{"line_number":407,"context_line":"        return nodename not in self.compute_nodes"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    def _init_compute_node(self, context, resources):"},{"line_number":410,"context_line":"        \"\"\"Initialize the compute node if it does not already exist."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_45be4dd5","line":407,"updated":"2016-12-19 16:43:21.000000000","message":"How is this ever true when _init_compute_node always either has a compute node or creates one? Is this something controlled externally to the resource tracker?\n\nIn IRC Jay said that this could happen if instance_claim were called before update_available_resource, in which case instance_claim would just do a noop claim - that all seems pretty wrong. Like, I\u0027d think that if we\u0027re making a claim but update_available_resource hasn\u0027t run yet, we should force that (call update_available_resource from instance_claim). But ComputeManager.pre_start_hook will update the available resources before starting the nova-compute service, so this is probably just all stuff that no longer matters, or works.\n\nI guess this is all unrelated to this refactor patch, and is just gorp that is vestigial and should be cleaned up.","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccb070bc03e82756b42ee8e2ffef2f37f672c540","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def _setup_pci_tracker(self, context, resources):"},{"line_number":460,"context_line":"        if not self.pci_tracker:"},{"line_number":461,"context_line":"            nodename \u003d resources[\u0027hypervisor_hostname\u0027]"},{"line_number":462,"context_line":"            cn \u003d self.compute_nodes[nodename]"},{"line_number":463,"context_line":"            n_id \u003d cn.id if cn else None"},{"line_number":464,"context_line":"            self.pci_tracker \u003d pci_manager.PciDevTracker(context, node_id\u003dn_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_8a3f92d5","line":461,"updated":"2016-12-19 16:43:21.000000000","message":"nit: I\u0027d prefer to pass nodename in than rely on getting it from the resources dict, but from where this is currently called we know that hypervisor_hostname is in the resources dict so this will work. Just get the feeling of tight coupling chilling my spine.","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"daa1fef882af168f8ca02bc042a411a1d0168d1e","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def _setup_pci_tracker(self, context, resources):"},{"line_number":460,"context_line":"        if not self.pci_tracker:"},{"line_number":461,"context_line":"            nodename \u003d resources[\u0027hypervisor_hostname\u0027]"},{"line_number":462,"context_line":"            cn \u003d self.compute_nodes[nodename]"},{"line_number":463,"context_line":"            n_id \u003d cn.id if cn else None"},{"line_number":464,"context_line":"            self.pci_tracker \u003d pci_manager.PciDevTracker(context, node_id\u003dn_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_725f880e","line":461,"in_reply_to":"1a6eadb0_8a3f92d5","updated":"2016-12-19 17:40:12.000000000","message":"Yeah, we\u0027ll get there eventually, but for now, this provides a little bit of a sanity check that resources dict container hypervisor_hostname, even if that sanity check is really only for the non-unit unit tests ;)","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7c06faa36c58d68aed2e3fbd9fde333c3b3cb62","unresolved":false,"context_lines":[{"line_number":465,"context_line":"    def _setup_pci_tracker(self, context, resources):"},{"line_number":466,"context_line":"        if not self.pci_tracker:"},{"line_number":467,"context_line":"            nodename \u003d resources[\u0027hypervisor_hostname\u0027]"},{"line_number":468,"context_line":"            cn \u003d self.compute_nodes[nodename]"},{"line_number":469,"context_line":"            n_id \u003d cn.id if cn else None"},{"line_number":470,"context_line":"            self.pci_tracker \u003d pci_manager.PciDevTracker(context, node_id\u003dn_id)"},{"line_number":471,"context_line":"            if \u0027pci_passthrough_devices\u0027 in resources:"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_0996334c","line":468,"range":{"start_line":468,"start_character":17,"end_line":468,"end_character":45},"updated":"2017-01-13 19:18:57.000000000","message":"Can we get a KeyError here? Previously this code would check if self.compute_node was set, so I\u0027d think if we\u0027re going to have that same guard we need to check if nodename is in self.compute_nodes first, right? Looking at where this is called though, we always have the mapping done before calling this, but I don\u0027t like the tight coupling - if someone calls this method from somewhere else at some point and the nodename isn\u0027t in self.compute_nodes then it\u0027s a KeyError.\n\nWouldn\u0027t it be easier to just pass the ComputeNode object into _setup_pci_tracker since we always have it in scope when calling this method?","commit_id":"8c698e5ee2aee1e0a7e41dfb03bc3a799ba19a29"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"efd0025bb4aaf8da8d10e09aea53006e2247f6a2","unresolved":false,"context_lines":[{"line_number":465,"context_line":"    def _setup_pci_tracker(self, context, resources):"},{"line_number":466,"context_line":"        if not self.pci_tracker:"},{"line_number":467,"context_line":"            nodename \u003d resources[\u0027hypervisor_hostname\u0027]"},{"line_number":468,"context_line":"            cn \u003d self.compute_nodes[nodename]"},{"line_number":469,"context_line":"            n_id \u003d cn.id if cn else None"},{"line_number":470,"context_line":"            self.pci_tracker \u003d pci_manager.PciDevTracker(context, node_id\u003dn_id)"},{"line_number":471,"context_line":"            if \u0027pci_passthrough_devices\u0027 in resources:"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_1cbadac0","line":468,"range":{"start_line":468,"start_character":17,"end_line":468,"end_character":45},"in_reply_to":"7a3c09a3_0996334c","updated":"2017-01-15 12:19:29.000000000","message":"Good suggestion about just passing in the compute node object to _setup_pci_tracker(). I\u0027ll make that change.","commit_id":"8c698e5ee2aee1e0a7e41dfb03bc3a799ba19a29"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7c06faa36c58d68aed2e3fbd9fde333c3b3cb62","unresolved":false,"context_lines":[{"line_number":713,"context_line":"    def _resource_change(self, compute_node):"},{"line_number":714,"context_line":"        \"\"\"Check to see if any resources have changed.\"\"\""},{"line_number":715,"context_line":"        nodename \u003d compute_node.hypervisor_hostname"},{"line_number":716,"context_line":"        old_compute \u003d self.old_resources[nodename]"},{"line_number":717,"context_line":"        if not obj_base.obj_equal_prims(compute_node, old_compute):"},{"line_number":718,"context_line":"            self.old_resources[nodename] \u003d copy.deepcopy(compute_node)"},{"line_number":719,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_29cf6f57","line":716,"range":{"start_line":716,"start_character":22,"end_line":716,"end_character":50},"updated":"2017-01-13 19:18:57.000000000","message":"Will nodename be in self.old_resources at this point? I guess it doesn\u0027t matter as it\u0027s using a defaultdict.","commit_id":"8c698e5ee2aee1e0a7e41dfb03bc3a799ba19a29"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"efd0025bb4aaf8da8d10e09aea53006e2247f6a2","unresolved":false,"context_lines":[{"line_number":713,"context_line":"    def _resource_change(self, compute_node):"},{"line_number":714,"context_line":"        \"\"\"Check to see if any resources have changed.\"\"\""},{"line_number":715,"context_line":"        nodename \u003d compute_node.hypervisor_hostname"},{"line_number":716,"context_line":"        old_compute \u003d self.old_resources[nodename]"},{"line_number":717,"context_line":"        if not obj_base.obj_equal_prims(compute_node, old_compute):"},{"line_number":718,"context_line":"            self.old_resources[nodename] \u003d copy.deepcopy(compute_node)"},{"line_number":719,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_fc8fce20","line":716,"range":{"start_line":716,"start_character":22,"end_line":716,"end_character":50},"in_reply_to":"7a3c09a3_29cf6f57","updated":"2017-01-15 12:19:29.000000000","message":"right.","commit_id":"8c698e5ee2aee1e0a7e41dfb03bc3a799ba19a29"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7c06faa36c58d68aed2e3fbd9fde333c3b3cb62","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            if self.pci_tracker and sign:"},{"line_number":834,"context_line":"                self.pci_tracker.update_pci_for_instance("},{"line_number":835,"context_line":"                    context, instance, sign\u003dsign)"},{"line_number":836,"context_line":"            self._update_usage(usage, nodename)"},{"line_number":837,"context_line":"            if self.pci_tracker:"},{"line_number":838,"context_line":"                obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":839,"context_line":"                cn.pci_device_pools \u003d obj"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_096e332f","line":836,"range":{"start_line":836,"start_character":17,"end_line":836,"end_character":30},"updated":"2017-01-13 19:18:57.000000000","message":"I\u0027ll tell you what I don\u0027t like about this, but it\u0027s not really any different from how this worked before this change, but in this scope we\u0027re mutating the compute node object to set pci_device_pools, and _update_usage is mutating the compute node for some other things. I worry about these different operations stomping on each other, or somehow invalidating each other, but as I said it\u0027s working on the same object either way before and after this change. Just gives me the willies a bit.","commit_id":"8c698e5ee2aee1e0a7e41dfb03bc3a799ba19a29"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"efd0025bb4aaf8da8d10e09aea53006e2247f6a2","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            if self.pci_tracker and sign:"},{"line_number":834,"context_line":"                self.pci_tracker.update_pci_for_instance("},{"line_number":835,"context_line":"                    context, instance, sign\u003dsign)"},{"line_number":836,"context_line":"            self._update_usage(usage, nodename)"},{"line_number":837,"context_line":"            if self.pci_tracker:"},{"line_number":838,"context_line":"                obj \u003d self.pci_tracker.stats.to_device_pools_obj()"},{"line_number":839,"context_line":"                cn.pci_device_pools \u003d obj"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a3c09a3_dca9327d","line":836,"range":{"start_line":836,"start_character":17,"end_line":836,"end_character":30},"in_reply_to":"7a3c09a3_096e332f","updated":"2017-01-15 12:19:29.000000000","message":"Yeah, I have the same willies. And actually, because of the way NUMA topology objects originated, the compute_node.numa_topology objects is actually *a different object* each time update_available_resource() is called, because the libvirt get_available_resource() code reconstructs a new NUMATopology object each time it\u0027s called, regardless of whether anything changed about the NUMA setup on the node. This is because the code in the nova/virt/hardware.py module was written using functional programming paradigms where the functions in that module accept only read-only parameters and return copies of mutated objects. :(","commit_id":"8c698e5ee2aee1e0a7e41dfb03bc3a799ba19a29"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"700d4cbb68f9724740a3fcb52a30584f94a7e049","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.pci_tracker \u003d None"},{"line_number":89,"context_line":"        # Dict of objects.ComputeNode objects, keyed by nodename"},{"line_number":90,"context_line":"        self.compute_nodes \u003d {}"},{"line_number":91,"context_line":"        self.stats \u003d stats.Stats()"},{"line_number":92,"context_line":"        self.tracked_instances \u003d {}"},{"line_number":93,"context_line":"        self.tracked_migrations \u003d {}"},{"line_number":94,"context_line":"        monitor_handler \u003d monitors.MonitorHandler(self)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5f7c97a3_e197689b","line":91,"range":{"start_line":91,"start_character":8,"end_line":91,"end_character":34},"updated":"2018-07-31 19:48:11.000000000","message":"This should have also been changed to be per-compute node like self.compute_nodes, otherwise we can leak/accumulate stats across nodes...","commit_id":"1c967593fbb0ab8b9dc8b0b509e388591d32f537"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"973f826da65c1b513530b467957e9b613fb587dd","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.pci_tracker \u003d None"},{"line_number":89,"context_line":"        # Dict of objects.ComputeNode objects, keyed by nodename"},{"line_number":90,"context_line":"        self.compute_nodes \u003d {}"},{"line_number":91,"context_line":"        self.stats \u003d stats.Stats()"},{"line_number":92,"context_line":"        self.tracked_instances \u003d {}"},{"line_number":93,"context_line":"        self.tracked_migrations \u003d {}"},{"line_number":94,"context_line":"        monitor_handler \u003d monitors.MonitorHandler(self)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5f7c97a3_21d32004","line":91,"range":{"start_line":91,"start_character":8,"end_line":91,"end_character":34},"in_reply_to":"5f7c97a3_01d2a45b","updated":"2018-07-31 20:01:36.000000000","message":"Yeah, see bug 1784705.","commit_id":"1c967593fbb0ab8b9dc8b0b509e388591d32f537"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5f4d6fd127abcbfe950daa05c78c7ad594232fa9","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.pci_tracker \u003d None"},{"line_number":89,"context_line":"        # Dict of objects.ComputeNode objects, keyed by nodename"},{"line_number":90,"context_line":"        self.compute_nodes \u003d {}"},{"line_number":91,"context_line":"        self.stats \u003d stats.Stats()"},{"line_number":92,"context_line":"        self.tracked_instances \u003d {}"},{"line_number":93,"context_line":"        self.tracked_migrations \u003d {}"},{"line_number":94,"context_line":"        monitor_handler \u003d monitors.MonitorHandler(self)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5f7c97a3_01d2a45b","line":91,"range":{"start_line":91,"start_character":8,"end_line":91,"end_character":34},"in_reply_to":"5f7c97a3_e197689b","updated":"2018-07-31 19:52:19.000000000","message":"hmm. interesting. do we use the stats thing for Ironic?","commit_id":"1c967593fbb0ab8b9dc8b0b509e388591d32f537"}],"nova/tests/functional/test_compute_mgr.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e99dadea673b7b5d5c6cb1d01ba142d4a19f811b","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        @mock.patch.object(self.compute.manager.network_api,"},{"line_number":66,"context_line":"                           \u0027cleanup_instance_network_on_host\u0027)"},{"line_number":67,"context_line":"        @mock.patch(\u0027nova.compute.utils.notify_about_instance_usage\u0027)"},{"line_number":68,"context_line":"        @mock.patch.object(self.compute.manager, \u0027_get_resource_tracker\u0027)"},{"line_number":69,"context_line":"        @mock.patch.object(self.compute.manager.driver, \u0027spawn\u0027)"},{"line_number":70,"context_line":"        def _test(mock_spawn, mock_grt, mock_notify, mock_cinoh, mock_can):"},{"line_number":71,"context_line":"            mock_spawn.side_effect \u003d test.TestingException(\u0027Preserve this\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_90fe70ac","line":68,"updated":"2016-11-17 15:29:48.000000000","message":"aha! thanks for digging into this nasty.","commit_id":"51547de0e952978267a90c608c6cf4f48c2229fe"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccb070bc03e82756b42ee8e2ffef2f37f672c540","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        # Update ComputeHostNotFound"},{"line_number":208,"context_line":"        self.compute.update_available_resource_for_node(self.context,"},{"line_number":209,"context_line":"                                                        avail_nodes_l[1])"},{"line_number":210,"context_line":"        self.assertNotIn(self.compute._resource_tracker_dict, avail_nodes_l[1])"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # Update TestException"},{"line_number":213,"context_line":"        self.compute.update_available_resource_for_node(self.context,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_c98197fd","side":"PARENT","line":210,"updated":"2016-12-19 16:43:21.000000000","message":"This old test used to make sure that the node was popped from the internal RT dict in the compute manager. You are intentionally forcing _resource_tracker \u003d None in this case to force a refresh of creating the RT, so maybe you should have a similar assertion that _resource_tracker is None after the ComputeHostNotFound in the new test_update_available_resource_for_node_fail_no_host test.","commit_id":"1073c1550fcb9a16071553bba0f4334a8292c33d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccb070bc03e82756b42ee8e2ffef2f37f672c540","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self.context,"},{"line_number":204,"context_line":"            mock.sentinel.node,"},{"line_number":205,"context_line":"        )"},{"line_number":206,"context_line":"        self.assertTrue(log_mock.called)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(manager.ComputeManager,"},{"line_number":209,"context_line":"                       \u0027update_available_resource_for_node\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_6973234e","line":206,"updated":"2016-12-19 16:43:21.000000000","message":"Also assert that self.compute._resource_tracker is None.","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"daa1fef882af168f8ca02bc042a411a1d0168d1e","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self.context,"},{"line_number":204,"context_line":"            mock.sentinel.node,"},{"line_number":205,"context_line":"        )"},{"line_number":206,"context_line":"        self.assertTrue(log_mock.called)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(manager.ComputeManager,"},{"line_number":209,"context_line":"                       \u0027update_available_resource_for_node\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_52036cb8","line":206,"in_reply_to":"1a6eadb0_29868bb9","updated":"2016-12-19 17:40:12.000000000","message":"Sorry, I\u0027m not quite following what you\u0027re asking me to do here, Matt...","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"91248412c7422d3916ba5e0505b0a4f6654bf04d","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self.context,"},{"line_number":204,"context_line":"            mock.sentinel.node,"},{"line_number":205,"context_line":"        )"},{"line_number":206,"context_line":"        self.assertTrue(log_mock.called)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(manager.ComputeManager,"},{"line_number":209,"context_line":"                       \u0027update_available_resource_for_node\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_866221ac","line":206,"in_reply_to":"1a6eadb0_52036cb8","updated":"2016-12-19 21:15:49.000000000","message":"Basically I was looking for the test to assert this happens:\n\nhttps://review.openstack.org/#/c/398473/15/nova/compute/manager.py@6545","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"77113a9de2e8d7f4c6e449c14757b4ee51930e17","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self.context,"},{"line_number":204,"context_line":"            mock.sentinel.node,"},{"line_number":205,"context_line":"        )"},{"line_number":206,"context_line":"        self.assertTrue(log_mock.called)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(manager.ComputeManager,"},{"line_number":209,"context_line":"                       \u0027update_available_resource_for_node\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a6eadb0_29868bb9","line":206,"in_reply_to":"1a6eadb0_6973234e","updated":"2016-12-19 16:50:55.000000000","message":"Well, this is probably pointless because _get_resource_tracker is mocked out, so self.compute._resource_tracker is already None when this test runs. You could set self.compute._resource_tracker \u003d rt before calling update_available_resource_for_node...","commit_id":"61ee0002bf5d1a979e70e6b6065233130f07b352"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b50ba3e49dcd0bdd0100b9a785db2d593f7b4191","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            self.context,"},{"line_number":200,"context_line":"            mock.sentinel.node,"},{"line_number":201,"context_line":"        )"},{"line_number":202,"context_line":"        rt.update_available_resource.assert_called_once_with("},{"line_number":203,"context_line":"            self.context,"},{"line_number":204,"context_line":"            mock.sentinel.node,"},{"line_number":205,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_a60e3de3","line":202,"updated":"2016-12-19 21:16:50.000000000","message":"Can we also make sure self.compute._resource_tracker goes from something (the rt mock in this case, which you\u0027d have to set since you mock out _get_resource_tracker), to None, due to:\n\nhttps://review.openstack.org/#/c/398473/15/nova/compute/manager.py@6545","commit_id":"8dfc54121bf8d82111f298990687e8ee63279f75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a9911787ca357b800529551521ad67938cc3bb8c","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self.context,"},{"line_number":204,"context_line":"            mock.sentinel.node,"},{"line_number":205,"context_line":"        )"},{"line_number":206,"context_line":"        self.assertTrue(log_mock.called)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(manager.ComputeManager,"},{"line_number":209,"context_line":"                       \u0027update_available_resource_for_node\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_06a0d18f","line":206,"updated":"2016-12-19 21:23:10.000000000","message":"Something must be racy here:\n\nhttp://logs.openstack.org/73/398473/16/check/gate-nova-python27-db-ubuntu-xenial/8ce3e4e/console.html#_2016-12-19_18_13_49_330347","commit_id":"8dfc54121bf8d82111f298990687e8ee63279f75"}]}
