)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        return False"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def _check_numa_topology_conditions(self, old_numa, new_numa):"},{"line_number":568,"context_line":"        if old_numa and new_numa:"},{"line_number":569,"context_line":"            new_numa \u003d objects.NUMATopology.obj_from_db_obj(new_numa).cells"},{"line_number":570,"context_line":"            old_numa \u003d objects.NUMATopology.obj_from_db_obj(old_numa).cells"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_eae7e345","line":568,"range":{"start_line":568,"start_character":0,"end_line":568,"end_character":33},"updated":"2019-07-23 15:09:38.000000000","message":"Try\n\n  if not old_numa and new_numa:\n      return","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def _check_numa_topology_conditions(self, old_numa, new_numa):"},{"line_number":568,"context_line":"        if old_numa and new_numa:"},{"line_number":569,"context_line":"            new_numa \u003d objects.NUMATopology.obj_from_db_obj(new_numa).cells"},{"line_number":570,"context_line":"            old_numa \u003d objects.NUMATopology.obj_from_db_obj(old_numa).cells"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"            context \u003d nova.context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0ad6ff50","line":569,"updated":"2019-07-23 15:09:38.000000000","message":"Can you add a comment explaining why this has to be converted? FYI, it\u0027s because old_numa is taken from \u0027ComputeNode.numa_topology\u0027, which is a \u0027StringField\u0027 meaning we don\u0027t get the automatic conversion, while \u0027new_numa\u0027 is taken from the \u0027numa_topology\u0027 field of the value returned by the drivers \u0027get_available_resource\u0027 method, which is similarly serialized.\n\nTBH, it might better to do this deserialization before we call the function, so we can better see what\u0027s going on here","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":570,"context_line":"            old_numa \u003d objects.NUMATopology.obj_from_db_obj(old_numa).cells"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"            context \u003d nova.context.get_admin_context()"},{"line_number":573,"context_line":"            instances \u003d objects.InstanceList.get_by_host(context, self.host)"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"            for old_cell, new_cell in zip(old_numa, new_numa):"},{"line_number":576,"context_line":"                if instances:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0a091fdc","line":573,"updated":"2019-07-23 15:09:38.000000000","message":"Try a quick return?\n\n  if not instances:\n      return\n\nLater: With that said though, why do we even need this check? old_cell.pinned_cpus will be empty if there aren\u0027t any instances and even if there are instances, it\u0027s not certain that they\u0027re pinned. Just drop this particular check entirely?","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"}],"nova/tests/functional/libvirt/test_rt_servers.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        fake_connection \u003d self._get_connection(host_info\u003dhost_info)"},{"line_number":60,"context_line":"        self.mock_conn.return_value \u003d fake_connection"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        self.flags(vcpu_pin_set\u003d\u00270-5\u0027)"},{"line_number":63,"context_line":"        self.compute \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027test_compute0\u0027)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        flavor \u003d self._create_flavor(extra_spec\u003d{"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_aa124eb3","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":38},"updated":"2019-07-23 15:09:38.000000000","message":"I haven\u0027t tried removing it yet, but why\u0027s this necessary? It was possible (although unlikely) for users to use real-time before without this configured. Has that changed?","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            self._delete_server(instance[\u0027id\u0027])"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"class RealTimeCPUPinningUpgradeTest("},{"line_number":107,"context_line":"    base.ServersTestBase, integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":108,"context_line":"    compute_driver \u003d \u0027libvirt.LibvirtDriver\u0027"},{"line_number":109,"context_line":"    microversion \u003d \u0027latest\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_8a93cfa3","line":106,"updated":"2019-07-23 15:09:38.000000000","message":"These tests are classes are real-time tests, but you don\u0027t use/need the real-time traits. Can you move these to \u0027test_numa.py\u0027?","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        self.compute \u003d self.start_service(\u0027compute\u0027, host\u003dCONF.host)"},{"line_number":127,"context_line":"        nodename \u003d self.compute.manager._get_nodename(None)"},{"line_number":128,"context_line":"        self.host_uuid \u003d self._get_provider_uuid_by_host(nodename)"},{"line_number":129,"context_line":"        self.agg \u003d self.api_fixture.admin_api.post_aggregate("},{"line_number":130,"context_line":"            {\u0027aggregate\u0027: {\u0027name\u0027: \u0027test1\u0027}})"},{"line_number":131,"context_line":"        self.api_fixture.admin_api.add_host_to_aggregate(self.agg[\u0027id\u0027],"},{"line_number":132,"context_line":"                                                         self.compute.host)"},{"line_number":133,"context_line":"        self.addCleanup(_p.stop)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _setup_scheduler_service(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_caa8e7dc","line":132,"range":{"start_line":129,"start_character":0,"end_line":132,"end_character":75},"updated":"2019-07-23 15:09:38.000000000","message":"Per below, this seems unnecessary. If you stop doing this, you can merge all these tests back into the previous one","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                                                         self.compute.host)"},{"line_number":133,"context_line":"        self.addCleanup(_p.stop)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _setup_scheduler_service(self):"},{"line_number":136,"context_line":"        # Enable the \u0027NUMATopologyFilter\u0027, \u0027AggregateInstanceExtraSpecsFilter\u0027"},{"line_number":137,"context_line":"        self.flags(driver\u003d\u0027filter_scheduler\u0027, group\u003d\u0027scheduler\u0027)"},{"line_number":138,"context_line":"        self.flags(enabled_filters\u003dCONF.filter_scheduler.enabled_filters +"},{"line_number":139,"context_line":"                                   [\u0027NUMATopologyFilter\u0027,"},{"line_number":140,"context_line":"                                    \u0027AggregateInstanceExtraSpecsFilter\u0027],"},{"line_number":141,"context_line":"                   group\u003d\u0027filter_scheduler\u0027)"},{"line_number":142,"context_line":"        return self.start_service(\u0027scheduler\u0027)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _create_instance(self, flavor):"},{"line_number":145,"context_line":"        fake_network.set_stub_network_methods(self)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_8aaaefcf","line":142,"range":{"start_line":135,"start_character":0,"end_line":142,"end_character":46},"updated":"2019-07-23 15:09:38.000000000","message":"as does this","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        return instance"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def test_cpu_pining_upgrade_for_pinned_cpu_instance(self):"},{"line_number":161,"context_line":"        self.api_fixture.admin_api.set_metadata_to_aggregate(self.agg[\u0027id\u0027], {"},{"line_number":162,"context_line":"            \u0027pinned\u0027: \u0027true\u0027})"},{"line_number":163,"context_line":"        flavor \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003d{"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0a9fdfb4","line":160,"range":{"start_line":160,"start_character":17,"end_line":160,"end_character":23},"updated":"2019-07-23 15:09:38.000000000","message":"pinning","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        return instance"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def test_cpu_pining_upgrade_for_pinned_cpu_instance(self):"},{"line_number":161,"context_line":"        self.api_fixture.admin_api.set_metadata_to_aggregate(self.agg[\u0027id\u0027], {"},{"line_number":162,"context_line":"            \u0027pinned\u0027: \u0027true\u0027})"},{"line_number":163,"context_line":"        flavor \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003d{"},{"line_number":164,"context_line":"            \u0027hw:cpu_policy\u0027: \u0027dedicated\u0027,"},{"line_number":165,"context_line":"            \u0027aggregate_instance_extra_specs:pinned\u0027: \u0027true\u0027})"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_4a187774","line":162,"range":{"start_line":161,"start_character":0,"end_line":162,"end_character":30},"updated":"2019-07-23 15:09:38.000000000","message":"Do we need this? Ditto for the rest of the tests.\n\nAs a meta point, we hopefully will be able to stop dividing hosts into pinned and unpinned in the future meaning this would be unnecessary from a real deployment perspective too.","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            \u0027pinned\u0027: \u0027true\u0027})"},{"line_number":163,"context_line":"        flavor \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003d{"},{"line_number":164,"context_line":"            \u0027hw:cpu_policy\u0027: \u0027dedicated\u0027,"},{"line_number":165,"context_line":"            \u0027aggregate_instance_extra_specs:pinned\u0027: \u0027true\u0027})"},{"line_number":166,"context_line":"        instance \u003d self._create_instance(flavor)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        self.flags(vcpu_pin_set\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_8a650fe4","line":165,"range":{"start_line":165,"start_character":0,"end_line":165,"end_character":59},"updated":"2019-07-23 15:09:38.000000000","message":"ditto","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"}],"nova/tests/unit/scheduler/test_request_filter.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        ]"},{"line_number":173,"context_line":"        reqspec \u003d objects.RequestSpec(project_id\u003d\u0027owner\u0027,"},{"line_number":174,"context_line":"                                      availability_zone\u003d\u0027myaz\u0027)"},{"line_number":175,"context_line":"        # flavor is needed for the compute_status_filter"},{"line_number":176,"context_line":"        reqspec.flavor \u003d objects.Flavor(extra_specs\u003d{})"},{"line_number":177,"context_line":"        reqspec.image \u003d objects.ImageMeta(properties\u003dobjects.ImageMetaProps())"},{"line_number":178,"context_line":"        request_filter.process_reqspec(self.context, reqspec)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_aa77ae08","side":"PARENT","line":175,"updated":"2019-07-23 15:09:38.000000000","message":"Is this not true anymore? Should probably be a separate change in any case","commit_id":"469769a37da68760a64966732fc3d2d13de75ab6"}],"nova/virt/fake.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                \u0027allocation_ratio\u0027: ratios[orc.DISK_GB],"},{"line_number":530,"context_line":"                \u0027reserved\u0027: self._get_reserved_host_disk_gb_from_config(),"},{"line_number":531,"context_line":"            },"},{"line_number":532,"context_line":"            # Scheduler pre-filter \"alias_flavor_extra_specs\" will alias"},{"line_number":533,"context_line":"            # flavor extra specs \"hw:cpu_policy\u003ddedicated\" to"},{"line_number":534,"context_line":"            # `resources:PCPU\u003d\u003cNo of cpus requested\u003e`, so added PCPU resource"},{"line_number":535,"context_line":"            # inventory in placement so that `allocation_candidates` can"},{"line_number":536,"context_line":"            # return resource providers to boot the instances."},{"line_number":537,"context_line":"            \u0027PCPU\u0027: {"},{"line_number":538,"context_line":"                \u0027total\u0027: self.vcpus,"},{"line_number":539,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":540,"context_line":"                \u0027max_unit\u0027: self.vcpus,"},{"line_number":541,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":542,"context_line":"                \u0027allocation_ratio\u0027: 1.0,"},{"line_number":543,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":544,"context_line":"            },"},{"line_number":545,"context_line":"        }"},{"line_number":546,"context_line":"        provider_tree.update_inventory(nodename, inventory)"},{"line_number":547,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_2a6bbe1f","line":544,"range":{"start_line":532,"start_character":0,"end_line":544,"end_character":14},"updated":"2019-07-23 15:09:38.000000000","message":"I know we are using this in some tests, but it doesn\u0027t feel right reporting this for the fake driver when realistically only one of the in-tree drivers actually reports this stuff. Would it make sense to instead add this to the fake libvirt driver and maybe add our own functional tests?","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":6854,"context_line":"        \"\"\""},{"line_number":6855,"context_line":"        disk_gb \u003d int(self._get_local_gb_info()[\u0027total\u0027])"},{"line_number":6856,"context_line":"        memory_mb \u003d int(self._host.get_memory_mb_total())"},{"line_number":6857,"context_line":"        ctx \u003d nova_context.get_admin_context()"},{"line_number":6858,"context_line":"        self._check_cpu_conf_options()"},{"line_number":6859,"context_line":"        if self._does_compute_support_shared_or_dedicated_cpus(ctx):"},{"line_number":6860,"context_line":"            vcpus, pcpus \u003d self._parse_shared_and_dedicated_vcpus()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_8a5f5271","line":6857,"updated":"2019-07-23 15:09:38.000000000","message":"You already have a context here...","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9b9879cded8a4ab8017563aba3ebfa903b44e441","unresolved":false,"context_lines":[{"line_number":7308,"context_line":"                                                allocations\u003dNone):"},{"line_number":7309,"context_line":"        \"\"\"Updates the compute node provider PCPU/VCPU inventory."},{"line_number":7310,"context_line":""},{"line_number":7311,"context_line":"        Before Stein, VCPU and PCPU inventory is not supported on the same"},{"line_number":7312,"context_line":"        node. Staring from Train, Both the VCPU and PCPU inventory will be"},{"line_number":7313,"context_line":"        supported to the same compute node so to support this functionality"},{"line_number":7314,"context_line":"        will need to reshape the inventory and allocation of compute node"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_bffab93f","line":7311,"range":{"start_line":7311,"start_character":15,"end_line":7311,"end_character":20},"updated":"2019-08-06 17:56:35.000000000","message":"Train","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":7309,"context_line":"        \"\"\"Updates the compute node provider PCPU/VCPU inventory."},{"line_number":7310,"context_line":""},{"line_number":7311,"context_line":"        Before Stein, VCPU and PCPU inventory is not supported on the same"},{"line_number":7312,"context_line":"        node. Staring from Train, Both the VCPU and PCPU inventory will be"},{"line_number":7313,"context_line":"        supported to the same compute node so to support this functionality"},{"line_number":7314,"context_line":"        will need to reshape the inventory and allocation of compute node"},{"line_number":7315,"context_line":"        resource provider if necessary on first start of this compute service"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_6acf7629","line":7312,"range":{"start_line":7312,"start_character":14,"end_line":7312,"end_character":21},"updated":"2019-07-23 15:09:38.000000000","message":"Starting","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":7309,"context_line":"        \"\"\"Updates the compute node provider PCPU/VCPU inventory."},{"line_number":7310,"context_line":""},{"line_number":7311,"context_line":"        Before Stein, VCPU and PCPU inventory is not supported on the same"},{"line_number":7312,"context_line":"        node. Staring from Train, Both the VCPU and PCPU inventory will be"},{"line_number":7313,"context_line":"        supported to the same compute node so to support this functionality"},{"line_number":7314,"context_line":"        will need to reshape the inventory and allocation of compute node"},{"line_number":7315,"context_line":"        resource provider if necessary on first start of this compute service"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_2ad97ef3","line":7312,"range":{"start_line":7312,"start_character":34,"end_line":7312,"end_character":43},"updated":"2019-07-23 15:09:38.000000000","message":"s/Both the/both/","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":7329,"context_line":"        :raises: nova.exception.ReshapeFailed if the requested tree reshape"},{"line_number":7330,"context_line":"            fails for whatever reason."},{"line_number":7331,"context_line":"        \"\"\""},{"line_number":7332,"context_line":"        ctx \u003d nova_context.get_admin_context()"},{"line_number":7333,"context_line":"        compute_node \u003d objects.ComputeNode.get_by_nodename(ctx, nodename)"},{"line_number":7334,"context_line":"        root_node \u003d provider_tree.data(nodename)"},{"line_number":7335,"context_line":"        # If the PCPU inventories are reported then there is no need of"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_4a515a62","line":7332,"updated":"2019-07-23 15:09:38.000000000","message":"Would it make sense to just pass it through to here?","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":7334,"context_line":"        root_node \u003d provider_tree.data(nodename)"},{"line_number":7335,"context_line":"        # If the PCPU inventories are reported then there is no need of"},{"line_number":7336,"context_line":"        # reshape."},{"line_number":7337,"context_line":"        if (orc.PCPU in root_node.inventory):"},{"line_number":7338,"context_line":"            return"},{"line_number":7339,"context_line":""},{"line_number":7340,"context_line":"        if compute_node.numa_topology:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0ae04296","line":7337,"range":{"start_line":7337,"start_character":11,"end_line":7337,"end_character":45},"updated":"2019-07-23 15:09:38.000000000","message":"nit: don\u0027t need these brackets","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":7337,"context_line":"        if (orc.PCPU in root_node.inventory):"},{"line_number":7338,"context_line":"            return"},{"line_number":7339,"context_line":""},{"line_number":7340,"context_line":"        if compute_node.numa_topology:"},{"line_number":7341,"context_line":"            numa \u003d objects.NUMATopology.obj_from_db_obj("},{"line_number":7342,"context_line":"                compute_node.numa_topology).cells"},{"line_number":7343,"context_line":"            for cell in numa:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_caf30a73","line":7340,"range":{"start_line":7340,"start_character":0,"end_line":7340,"end_character":38},"updated":"2019-07-23 15:09:38.000000000","message":"How about\n\n  if not compute_node.numa_topology:\n      return\n\n  numa \u003d objects.NUMATopology.obj_from_db_obj(compute_node.numa_topology)\n  for cell in numa.cells:\n      ...\n\nAlso, this is unrelated (and should be done separately) but we probably want a property on the \u0027ComputeNode\u0027 object to do this conversion from the string field automatically, since I got caught out by it a few times myself :) Hopefully we can release a version 2.0 of the ComputeNode object in the future.","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":7341,"context_line":"            numa \u003d objects.NUMATopology.obj_from_db_obj("},{"line_number":7342,"context_line":"                compute_node.numa_topology).cells"},{"line_number":7343,"context_line":"            for cell in numa:"},{"line_number":7344,"context_line":"                # If there is already is pinned instance is running on compute"},{"line_number":7345,"context_line":"                # node and the allocations are None means it\u0027s startup of"},{"line_number":7346,"context_line":"                # compute node then only Reshape is need so raised ReshapNeeded"},{"line_number":7347,"context_line":"                # exception."}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_6507a71a","line":7344,"updated":"2019-07-23 15:09:38.000000000","message":"We can do:\n\n    if not cell.pinned_cpus:\n        break\n\nBecause it\u0027s not possible for one cell to be pinned while others are not. If you really wanted to be careful, you could do\n\n    if not cell.pinned_cpus:\n        continue\n\nbut I don\u0027t think it\u0027s necessary.\n\nMaybe it would be worth adding an \u0027is_pinned\u0027 property on the \u0027NUMATopology\u0027 object, if it isn\u0027t one already?","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9b9879cded8a4ab8017563aba3ebfa903b44e441","unresolved":false,"context_lines":[{"line_number":7341,"context_line":"            numa \u003d objects.NUMATopology.obj_from_db_obj("},{"line_number":7342,"context_line":"                compute_node.numa_topology).cells"},{"line_number":7343,"context_line":"            for cell in numa:"},{"line_number":7344,"context_line":"                # If there is already is pinned instance is running on compute"},{"line_number":7345,"context_line":"                # node and the allocations are None means it\u0027s startup of"},{"line_number":7346,"context_line":"                # compute node then only Reshape is need so raised ReshapNeeded"},{"line_number":7347,"context_line":"                # exception."}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_bf2b9992","line":7344,"in_reply_to":"7faddb67_6507a71a","updated":"2019-08-06 17:56:35.000000000","message":"Wait, cell is a NUMATopology object and contains a mapping of instance CPUs to host cores. Of course it\u0027s possible for this to vary between cells.","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":7352,"context_line":"                        \u0027provider %s\u0027, nodename)"},{"line_number":7353,"context_line":"                    raise exception.ReshapeNeeded()"},{"line_number":7354,"context_line":""},{"line_number":7355,"context_line":"                if cell.pinned_cpus and allocations is not None:"},{"line_number":7356,"context_line":"                    for consumer_uuid, alloc_data in allocations.items():"},{"line_number":7357,"context_line":"                        allocs \u003d alloc_data[\u0027allocations\u0027]"},{"line_number":7358,"context_line":"                        for rp_uuid in allocs.keys():"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_852503ae","line":7355,"range":{"start_line":7355,"start_character":0,"end_line":7355,"end_character":64},"updated":"2019-07-23 15:09:38.000000000","message":"You won\u0027t need this conditional since if you early return if \u0027not cell.pinned_cpus\u0027 is true, and you\u0027ll raise an exception if allocations is None.","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c89ac7940953c3756dbc9561b14190fb760e8d97","unresolved":false,"context_lines":[{"line_number":7358,"context_line":"                        for rp_uuid in allocs.keys():"},{"line_number":7359,"context_line":"                            rp_allocs \u003d allocs[rp_uuid]"},{"line_number":7360,"context_line":"                            resources \u003d rp_allocs[\u0027resources\u0027]"},{"line_number":7361,"context_line":"                            if not (orc.PCPU in resources):"},{"line_number":7362,"context_line":"                                # update allocation record from VCPU to PCPU"},{"line_number":7363,"context_line":"                                resources[\u0027PCPU\u0027] \u003d resources[\u0027VCPU\u0027]"},{"line_number":7364,"context_line":"                                # Remove the VCPU allocation from compute node"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_a54b5f5d","line":7361,"range":{"start_line":7361,"start_character":35,"end_line":7361,"end_character":58},"updated":"2019-07-23 15:09:38.000000000","message":"nit: don\u0027t need brackets (here and elsewhere)","commit_id":"c3845dc61d5a5fc85dd67fdafac773886b7e6c22"}]}
