)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f22351bc51c739e4bc7583f3145f970654e0d69f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"store things differently. There are a lot of mechanical changes required"},{"line_number":11,"context_line":"to fix these. The bulk of these fall into one of three categories:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"- Defining \u0027pcpuset\u0027 for any \u0027NUMACell\u0027 definitions and, where"},{"line_number":14,"context_line":"  necessary, migrating the \u0027cpuset\u0027 value to this"},{"line_number":15,"context_line":"- Configuring the \u0027cpu_shared_set\u0027 and \u0027cpu_dedicated_set\u0027 config"},{"line_number":16,"context_line":"  options (from the \u0027[compute]\u0027 group) and changing calls to"},{"line_number":17,"context_line":"  \u0027nova.virt.hardware.get_vcpu_pin_set\u0027 to \u0027_get_vcpu_available\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7faddb67_1282c9a6","line":14,"range":{"start_line":13,"start_character":57,"end_line":14,"end_character":11},"updated":"2019-08-22 20:55:50.000000000","message":"can you please help me understand how you decided where it\u0027s necessary?","commit_id":"9e972c31e0ee0b40e5e39a89de9bfaa0a9555d50"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"eb4891cc9e8c7ea8f15a45f0c30dbf562f3b73cc","unresolved":false,"context_lines":[{"line_number":10,"context_line":"store things differently. There are a lot of mechanical changes required"},{"line_number":11,"context_line":"to fix these. The bulk of these fall into one of three categories:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"- Defining \u0027pcpuset\u0027 for any \u0027NUMACell\u0027 definitions and, where"},{"line_number":14,"context_line":"  necessary, migrating the \u0027cpuset\u0027 value to this"},{"line_number":15,"context_line":"- Configuring the \u0027cpu_shared_set\u0027 and \u0027cpu_dedicated_set\u0027 config"},{"line_number":16,"context_line":"  options (from the \u0027[compute]\u0027 group) and changing calls to"},{"line_number":17,"context_line":"  \u0027nova.virt.hardware.get_vcpu_pin_set\u0027 to \u0027_get_vcpu_available\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7faddb67_11b95d14","line":14,"range":{"start_line":13,"start_character":57,"end_line":14,"end_character":11},"in_reply_to":"7faddb67_1282c9a6","updated":"2019-08-23 11:22:28.000000000","message":"I\u0027m referring to tests here, though that isn\u0027t clear. In short, is a test working with pinned instances? If yes, cpuset -\u003e pcpuset. Case in point:\n\nhttps://review.opendev.org/#/c/671800/18/nova/tests/unit/compute/test_compute.py@5659","commit_id":"9e972c31e0ee0b40e5e39a89de9bfaa0a9555d50"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"161c32856ad9bdf402d91c6f614119635477d0f1","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"- Migrating \u0027NUMACell.cpuset\u0027 values to \u0027NUMACell.pcpuset\u0027 where"},{"line_number":14,"context_line":"  necessary (hint: if we were testing something to do with a instance"},{"line_number":15,"context_line":"  NUMA topology with pinning, we need to migrate the field)"},{"line_number":16,"context_line":"- Configuring the \u0027cpu_shared_set\u0027 and \u0027cpu_dedicated_set\u0027 config"},{"line_number":17,"context_line":"  options (from the \u0027[compute]\u0027 group) and changing calls to"},{"line_number":18,"context_line":"  \u0027nova.virt.hardware.get_vcpu_pin_set\u0027 to \u0027_get_vcpu_available\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"5faad753_faabf185","line":15,"updated":"2019-09-11 10:24:53.000000000","message":"this is not an object field, so we can do this.","commit_id":"668181cfa571d0ac7f79f920ea8f3a5e128c993c"}],"nova/objects/numa.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1ee92e557e842c9dfe66fec486b3bf0831535eee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"7faddb67_a2ad79eb","updated":"2019-07-24 17:22:56.000000000","message":"I need to add properties here to handle older versions of the object that don\u0027t have the correct fields set. I might also need to have a one off cleanup function to inspect all instances on a host and unset the old fields/set the new ones accordingly.","commit_id":"911f406e5e76ae544da4234a50022e2d374cb85c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"46d6e329c0ed4f1de283fbf79873a8609b6f9240","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    def pin_cpus(self, cpus):"},{"line_number":101,"context_line":"        if cpus - self.pcpuset:"},{"line_number":102,"context_line":"            raise exception.CPUPinningUnknown("},{"line_number":103,"context_line":"                requested\u003dlist(cpus), available\u003dlist(self.pcpuset))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if self.pinned_cpus \u0026 cpus:"},{"line_number":106,"context_line":"            available \u003d list(self.pcpuset - self.pinned_cpus)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_bc3767b0","line":103,"updated":"2019-08-01 18:13:59.000000000","message":"unnecessary noise. Should undo","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"df4e8c5a4acbf27e9bf29733445d0a50cb2b1011","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    def pin_cpus(self, cpus):"},{"line_number":101,"context_line":"        if cpus - self.pcpuset:"},{"line_number":102,"context_line":"            raise exception.CPUPinningUnknown("},{"line_number":103,"context_line":"                requested\u003dlist(cpus), available\u003dlist(self.pcpuset))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if self.pinned_cpus \u0026 cpus:"},{"line_number":106,"context_line":"            available \u003d list(self.pcpuset - self.pinned_cpus)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_adfac1b9","line":103,"in_reply_to":"7faddb67_bc3767b0","updated":"2019-08-02 17:56:59.000000000","message":"Done","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"46d6e329c0ed4f1de283fbf79873a8609b6f9240","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        if (self.pinned_cpus \u0026 cpus) !\u003d cpus:"},{"line_number":119,"context_line":"            raise exception.CPUUnpinningInvalid("},{"line_number":120,"context_line":"                requested\u003dlist(cpus),"},{"line_number":121,"context_line":"                available\u003dlist(self.pinned_cpus))"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        self.pinned_cpus -\u003d cpus"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_7c3d6f8c","line":121,"updated":"2019-08-01 18:13:59.000000000","message":"ditto","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"df4e8c5a4acbf27e9bf29733445d0a50cb2b1011","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        if (self.pinned_cpus \u0026 cpus) !\u003d cpus:"},{"line_number":119,"context_line":"            raise exception.CPUUnpinningInvalid("},{"line_number":120,"context_line":"                requested\u003dlist(cpus),"},{"line_number":121,"context_line":"                available\u003dlist(self.pinned_cpus))"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        self.pinned_cpus -\u003d cpus"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_8dfb45bc","line":121,"in_reply_to":"7faddb67_7c3d6f8c","updated":"2019-08-02 17:56:59.000000000","message":"Done","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"161c32856ad9bdf402d91c6f614119635477d0f1","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def __ne__(self, other):"},{"line_number":75,"context_line":"        return not (self \u003d\u003d other)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    @property"},{"line_number":78,"context_line":"    def free_pcpus(self):"},{"line_number":79,"context_line":"        \"\"\"Return available dedicated CPUs.\"\"\""},{"line_number":80,"context_line":"        return self.pcpuset - self.pinned_cpus or set()"}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_9a319def","line":77,"updated":"2019-09-11 10:24:53.000000000","message":"it\u0027s a property, so you can just change the method name like this fortunately. For RPC calls, nope please.","commit_id":"668181cfa571d0ac7f79f920ea8f3a5e128c993c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"161c32856ad9bdf402d91c6f614119635477d0f1","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            raise exception.CPUUnpinningInvalid(requested\u003dlist(cpus),"},{"line_number":120,"context_line":"                                                available\u003dlist("},{"line_number":121,"context_line":"                                                    self.pinned_cpus))"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        self.pinned_cpus -\u003d cpus"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def pin_cpus_with_siblings(self, cpus):"}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_1a5b6d2e","line":122,"updated":"2019-09-11 10:24:53.000000000","message":"nit: unnecessary modifications","commit_id":"668181cfa571d0ac7f79f920ea8f3a5e128c993c"}],"nova/tests/unit/scheduler/fakes.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"161c32856ad9bdf402d91c6f614119635477d0f1","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        objects.NUMACell("},{"line_number":57,"context_line":"            id\u003d0,"},{"line_number":58,"context_line":"            cpuset\u003dset(),"},{"line_number":59,"context_line":"            pcpuset\u003dset([1, 2, 5, 6]),"},{"line_number":60,"context_line":"            memory\u003d512,"},{"line_number":61,"context_line":"            cpu_usage\u003d0,"},{"line_number":62,"context_line":"            memory_usage\u003d0,"}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_05deae3e","line":59,"updated":"2019-09-11 10:24:53.000000000","message":"nit: I need to remember a bit for each fake object which CPUs are pinned but okay.","commit_id":"668181cfa571d0ac7f79f920ea8f3a5e128c993c"}],"nova/tests/unit/scheduler/filters/test_numa_topology_filters.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"46d6e329c0ed4f1de283fbf79873a8609b6f9240","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        cpu_thread_policy \u003d fields.CPUThreadAllocationPolicy.ISOLATE"},{"line_number":207,"context_line":"        self._do_test_numa_topology_filter_cpu_policy("},{"line_number":208,"context_line":"            numa_topology, cpu_policy, cpu_thread_policy, True)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        for cpu_thread_policy in ["},{"line_number":211,"context_line":"                fields.CPUThreadAllocationPolicy.PREFER,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_bcd2075b","line":208,"updated":"2019-08-01 18:13:59.000000000","message":"whoops, testing noise. need to undo this.","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"df4e8c5a4acbf27e9bf29733445d0a50cb2b1011","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        cpu_thread_policy \u003d fields.CPUThreadAllocationPolicy.ISOLATE"},{"line_number":207,"context_line":"        self._do_test_numa_topology_filter_cpu_policy("},{"line_number":208,"context_line":"            numa_topology, cpu_policy, cpu_thread_policy, True)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        for cpu_thread_policy in ["},{"line_number":211,"context_line":"                fields.CPUThreadAllocationPolicy.PREFER,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_ad75e165","line":208,"in_reply_to":"7faddb67_bcd2075b","updated":"2019-08-02 17:56:59.000000000","message":"Done","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"941c3bced14a3fd7effd0e4b75a226f4f0eef8de","unresolved":false,"context_lines":[{"line_number":3026,"context_line":"                mock.patch.object(host.Host, \u0027has_min_version\u0027,"},{"line_number":3027,"context_line":"                                  return_value\u003dTrue),"},{"line_number":3028,"context_line":"                mock.patch.object(host.Host, \"get_capabilities\","},{"line_number":3029,"context_line":"                                  return_value\u003dcaps),"},{"line_number":3030,"context_line":"                ):"},{"line_number":3031,"context_line":"            cfg \u003d drvr._get_guest_config(instance_ref, [],"},{"line_number":3032,"context_line":"                                         image_meta, disk_info)"},{"line_number":3033,"context_line":"            self.assertIsNone(cfg.cpuset)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_85e4793d","line":3030,"range":{"start_line":3029,"start_character":52,"end_line":3030,"end_character":16},"updated":"2019-08-02 18:23:11.000000000","message":"noise","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0a1133c145fcd5b259086180bd712c567cfab172","unresolved":false,"context_lines":[{"line_number":3026,"context_line":"                mock.patch.object(host.Host, \u0027has_min_version\u0027,"},{"line_number":3027,"context_line":"                                  return_value\u003dTrue),"},{"line_number":3028,"context_line":"                mock.patch.object(host.Host, \"get_capabilities\","},{"line_number":3029,"context_line":"                                  return_value\u003dcaps),"},{"line_number":3030,"context_line":"                ):"},{"line_number":3031,"context_line":"            cfg \u003d drvr._get_guest_config(instance_ref, [],"},{"line_number":3032,"context_line":"                                         image_meta, disk_info)"},{"line_number":3033,"context_line":"            self.assertIsNone(cfg.cpuset)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_2f055b14","line":3030,"range":{"start_line":3029,"start_character":52,"end_line":3030,"end_character":16},"in_reply_to":"7faddb67_85e4793d","updated":"2019-08-04 20:23:24.000000000","message":"Done","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"941c3bced14a3fd7effd0e4b75a226f4f0eef8de","unresolved":false,"context_lines":[{"line_number":3316,"context_line":"                mock.patch.object(host.Host, \"get_capabilities\","},{"line_number":3317,"context_line":"                                  return_value\u003dcaps),"},{"line_number":3318,"context_line":"                mock.patch.object(drvr, \u0027_get_vcpu_available\u0027,"},{"line_number":3319,"context_line":"                                  return_value\u003dset(range(8))),"},{"line_number":3320,"context_line":"                ):"},{"line_number":3321,"context_line":"            cfg \u003d drvr._get_guest_config(instance_ref, [],"},{"line_number":3322,"context_line":"                                         image_meta, disk_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_25cd85b6","line":3319,"range":{"start_line":3319,"start_character":51,"end_line":3319,"end_character":59},"updated":"2019-08-02 18:23:11.000000000","message":"this is wrong - we should be reporting 2-5 like the flag above","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0a1133c145fcd5b259086180bd712c567cfab172","unresolved":false,"context_lines":[{"line_number":3316,"context_line":"                mock.patch.object(host.Host, \"get_capabilities\","},{"line_number":3317,"context_line":"                                  return_value\u003dcaps),"},{"line_number":3318,"context_line":"                mock.patch.object(drvr, \u0027_get_vcpu_available\u0027,"},{"line_number":3319,"context_line":"                                  return_value\u003dset(range(8))),"},{"line_number":3320,"context_line":"                ):"},{"line_number":3321,"context_line":"            cfg \u003d drvr._get_guest_config(instance_ref, [],"},{"line_number":3322,"context_line":"                                         image_meta, disk_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_323382f8","line":3319,"range":{"start_line":3319,"start_character":51,"end_line":3319,"end_character":59},"in_reply_to":"7faddb67_25cd85b6","updated":"2019-08-04 20:23:24.000000000","message":"Done","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"941c3bced14a3fd7effd0e4b75a226f4f0eef8de","unresolved":false,"context_lines":[{"line_number":3398,"context_line":"                mock.patch.object(host.Host, \"get_capabilities\","},{"line_number":3399,"context_line":"                                  return_value\u003dcaps),"},{"line_number":3400,"context_line":"                mock.patch.object(drvr, \u0027_get_pcpu_available\u0027,"},{"line_number":3401,"context_line":"                                  return_value\u003dset(range(8))),"},{"line_number":3402,"context_line":"                ):"},{"line_number":3403,"context_line":"            cfg \u003d drvr._get_guest_config(instance_ref, [],"},{"line_number":3404,"context_line":"                                         image_meta, disk_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_e5c20d85","line":3401,"range":{"start_line":3401,"start_character":50,"end_line":3401,"end_character":59},"updated":"2019-08-02 18:23:11.000000000","message":"also wrong","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0a1133c145fcd5b259086180bd712c567cfab172","unresolved":false,"context_lines":[{"line_number":3398,"context_line":"                mock.patch.object(host.Host, \"get_capabilities\","},{"line_number":3399,"context_line":"                                  return_value\u003dcaps),"},{"line_number":3400,"context_line":"                mock.patch.object(drvr, \u0027_get_pcpu_available\u0027,"},{"line_number":3401,"context_line":"                                  return_value\u003dset(range(8))),"},{"line_number":3402,"context_line":"                ):"},{"line_number":3403,"context_line":"            cfg \u003d drvr._get_guest_config(instance_ref, [],"},{"line_number":3404,"context_line":"                                         image_meta, disk_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_723d7ac2","line":3401,"range":{"start_line":3401,"start_character":50,"end_line":3401,"end_character":59},"in_reply_to":"7faddb67_e5c20d85","updated":"2019-08-04 20:23:24.000000000","message":"Done","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"941c3bced14a3fd7effd0e4b75a226f4f0eef8de","unresolved":false,"context_lines":[{"line_number":3442,"context_line":"            self.assertEqual(set([2, 3]), cfg.cputune.vcpusched[0].vcpus)"},{"line_number":3443,"context_line":""},{"line_number":3444,"context_line":"    def test_get_guest_config_numa_host_instance_isolated_emulthreads(self):"},{"line_number":3445,"context_line":"        self.flags(cpu_shared_set\u003d\u00274-8\u0027, cpu_dedicated_set\u003dNone,"},{"line_number":3446,"context_line":"                   group\u003d\u0027compute\u0027)"},{"line_number":3447,"context_line":""},{"line_number":3448,"context_line":"        instance_topology \u003d objects.InstanceNUMATopology("},{"line_number":3449,"context_line":"            emulator_threads_policy\u003d("}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_a54df53b","line":3446,"range":{"start_line":3445,"start_character":0,"end_line":3446,"end_character":35},"updated":"2019-08-02 18:23:11.000000000","message":"There\u0027s clearly something wrong with this test since we\u0027re defining a pinning policy on the instance without cpu_dedicated_set defined. To investigate","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0a1133c145fcd5b259086180bd712c567cfab172","unresolved":false,"context_lines":[{"line_number":3442,"context_line":"            self.assertEqual(set([2, 3]), cfg.cputune.vcpusched[0].vcpus)"},{"line_number":3443,"context_line":""},{"line_number":3444,"context_line":"    def test_get_guest_config_numa_host_instance_isolated_emulthreads(self):"},{"line_number":3445,"context_line":"        self.flags(cpu_shared_set\u003d\u00274-8\u0027, cpu_dedicated_set\u003dNone,"},{"line_number":3446,"context_line":"                   group\u003d\u0027compute\u0027)"},{"line_number":3447,"context_line":""},{"line_number":3448,"context_line":"        instance_topology \u003d objects.InstanceNUMATopology("},{"line_number":3449,"context_line":"            emulator_threads_policy\u003d("}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_923836d3","line":3446,"range":{"start_line":3445,"start_character":0,"end_line":3446,"end_character":35},"in_reply_to":"7faddb67_a54df53b","updated":"2019-08-04 20:23:24.000000000","message":"Done","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"941c3bced14a3fd7effd0e4b75a226f4f0eef8de","unresolved":false,"context_lines":[{"line_number":3484,"context_line":"                mock.patch.object(host.Host, \"get_capabilities\","},{"line_number":3485,"context_line":"                                  return_value\u003dcaps),"},{"line_number":3486,"context_line":"                mock.patch.object(drvr, \u0027_get_vcpu_available\u0027,"},{"line_number":3487,"context_line":"                                  return_value\u003dset(range(10))),"},{"line_number":3488,"context_line":"                ):"},{"line_number":3489,"context_line":"            cfg \u003d drvr._get_guest_config(instance_ref, [],"},{"line_number":3490,"context_line":"                                         image_meta, disk_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_4539a1a1","line":3487,"range":{"start_line":3487,"start_character":51,"end_line":3487,"end_character":60},"updated":"2019-08-02 18:23:11.000000000","message":"and this one","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0a1133c145fcd5b259086180bd712c567cfab172","unresolved":false,"context_lines":[{"line_number":3484,"context_line":"                mock.patch.object(host.Host, \"get_capabilities\","},{"line_number":3485,"context_line":"                                  return_value\u003dcaps),"},{"line_number":3486,"context_line":"                mock.patch.object(drvr, \u0027_get_vcpu_available\u0027,"},{"line_number":3487,"context_line":"                                  return_value\u003dset(range(10))),"},{"line_number":3488,"context_line":"                ):"},{"line_number":3489,"context_line":"            cfg \u003d drvr._get_guest_config(instance_ref, [],"},{"line_number":3490,"context_line":"                                         image_meta, disk_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_d2222ea3","line":3487,"range":{"start_line":3487,"start_character":51,"end_line":3487,"end_character":60},"in_reply_to":"7faddb67_4539a1a1","updated":"2019-08-04 20:23:24.000000000","message":"Done","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"941c3bced14a3fd7effd0e4b75a226f4f0eef8de","unresolved":false,"context_lines":[{"line_number":3497,"context_line":""},{"line_number":3498,"context_line":"    def test_get_guest_config_numa_host_instance_shared_emulthreads_err("},{"line_number":3499,"context_line":"            self):"},{"line_number":3500,"context_line":"        self.flags(cpu_shared_set\u003d\u00274-8\u0027, cpu_dedicated_set\u003dNone,"},{"line_number":3501,"context_line":"                   group\u003d\u0027compute\u0027)"},{"line_number":3502,"context_line":""},{"line_number":3503,"context_line":"        self.flags(cpu_shared_set\u003d\"48-50\", group\u003d\"compute\")"},{"line_number":3504,"context_line":"        instance_topology \u003d objects.InstanceNUMATopology("}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_6565bdb4","line":3501,"range":{"start_line":3500,"start_character":0,"end_line":3501,"end_character":35},"updated":"2019-08-02 18:23:11.000000000","message":"Ditto. This seems wrong","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0a1133c145fcd5b259086180bd712c567cfab172","unresolved":false,"context_lines":[{"line_number":3497,"context_line":""},{"line_number":3498,"context_line":"    def test_get_guest_config_numa_host_instance_shared_emulthreads_err("},{"line_number":3499,"context_line":"            self):"},{"line_number":3500,"context_line":"        self.flags(cpu_shared_set\u003d\u00274-8\u0027, cpu_dedicated_set\u003dNone,"},{"line_number":3501,"context_line":"                   group\u003d\u0027compute\u0027)"},{"line_number":3502,"context_line":""},{"line_number":3503,"context_line":"        self.flags(cpu_shared_set\u003d\"48-50\", group\u003d\"compute\")"},{"line_number":3504,"context_line":"        instance_topology \u003d objects.InstanceNUMATopology("}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_b21f7259","line":3501,"range":{"start_line":3500,"start_character":0,"end_line":3501,"end_character":35},"in_reply_to":"7faddb67_6565bdb4","updated":"2019-08-04 20:23:24.000000000","message":"Done","commit_id":"f9e5acde0eb150121ae2241610717a6b64bf0c6e"}],"nova/tests/unit/virt/test_hardware.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"46d6e329c0ed4f1de283fbf79873a8609b6f9240","unresolved":false,"context_lines":[{"line_number":2382,"context_line":"            memory\u003d2048,"},{"line_number":2383,"context_line":"            memory_usage\u003d0,"},{"line_number":2384,"context_line":"            pinned_cpus\u003dset([]),"},{"line_number":2385,"context_line":"            # TODO(stephenfin): can this be unset?"},{"line_number":2386,"context_line":"            mempages\u003d["},{"line_number":2387,"context_line":"                objects.NUMAPagesTopology(size_kb\u003d4, total\u003d524288, used\u003d0)],"},{"line_number":2388,"context_line":"            siblings\u003d[set([0]), set([1]), set([2])])"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_3c74d767","line":2385,"updated":"2019-08-01 18:13:59.000000000","message":"need to resolve this","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"161c32856ad9bdf402d91c6f614119635477d0f1","unresolved":false,"context_lines":[{"line_number":3243,"context_line":"        new_cell \u003d hw.numa_usage_from_instance_numa(host_pin, inst_pin_1,"},{"line_number":3244,"context_line":"                                                   free\u003dTrue)"},{"line_number":3245,"context_line":"        self.assertEqual(set([]), new_cell.cells[0].pinned_cpus)"},{"line_number":3246,"context_line":"        self.assertEqual(new_cell.cells[0].cpu_usage, 0)"},{"line_number":3247,"context_line":""},{"line_number":3248,"context_line":"    def test_host_usage_from_instances_isolated_without_siblings(self):"},{"line_number":3249,"context_line":"        host_pin \u003d objects.NUMATopology(cells\u003d["}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_05ac6e9e","side":"PARENT","line":3246,"updated":"2019-09-11 10:24:53.000000000","message":"any reason why you remove this ? AFAICT, the usage is still 0, nope ?","commit_id":"70957e09f30a981111d40d68f8c92d7eb6d5fd7a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"219e0a8a32e87a65922544d7f35bdab268572dfa","unresolved":false,"context_lines":[{"line_number":3243,"context_line":"        new_cell \u003d hw.numa_usage_from_instance_numa(host_pin, inst_pin_1,"},{"line_number":3244,"context_line":"                                                   free\u003dTrue)"},{"line_number":3245,"context_line":"        self.assertEqual(set([]), new_cell.cells[0].pinned_cpus)"},{"line_number":3246,"context_line":"        self.assertEqual(new_cell.cells[0].cpu_usage, 0)"},{"line_number":3247,"context_line":""},{"line_number":3248,"context_line":"    def test_host_usage_from_instances_isolated_without_siblings(self):"},{"line_number":3249,"context_line":"        host_pin \u003d objects.NUMATopology(cells\u003d["}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_65668254","side":"PARENT","line":3246,"in_reply_to":"5faad753_05ac6e9e","updated":"2019-09-11 10:36:10.000000000","message":"We shouldn\u0027t have, though cpu_usage is irrelevant since it\u0027s only tracked for shared CPUs. I\u0027m guessing this got caught up in my global find-replace. I can re-add if I need to respin","commit_id":"70957e09f30a981111d40d68f8c92d7eb6d5fd7a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b7c9ee4920c11f6bb543ff03cd7fbd7368cb6bff","unresolved":false,"context_lines":[{"line_number":3243,"context_line":"        new_cell \u003d hw.numa_usage_from_instance_numa(host_pin, inst_pin_1,"},{"line_number":3244,"context_line":"                                                   free\u003dTrue)"},{"line_number":3245,"context_line":"        self.assertEqual(set([]), new_cell.cells[0].pinned_cpus)"},{"line_number":3246,"context_line":"        self.assertEqual(new_cell.cells[0].cpu_usage, 0)"},{"line_number":3247,"context_line":""},{"line_number":3248,"context_line":"    def test_host_usage_from_instances_isolated_without_siblings(self):"},{"line_number":3249,"context_line":"        host_pin \u003d objects.NUMATopology(cells\u003d["}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_e084a0b3","side":"PARENT","line":3246,"in_reply_to":"5faad753_65668254","updated":"2019-09-11 11:22:12.000000000","message":"Yeah, it\u0027s just sad to remove some checks.","commit_id":"70957e09f30a981111d40d68f8c92d7eb6d5fd7a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"eee7d444625033637f25a3e543d4bfc6f54725be","unresolved":false,"context_lines":[{"line_number":3243,"context_line":"        new_cell \u003d hw.numa_usage_from_instance_numa(host_pin, inst_pin_1,"},{"line_number":3244,"context_line":"                                                   free\u003dTrue)"},{"line_number":3245,"context_line":"        self.assertEqual(set([]), new_cell.cells[0].pinned_cpus)"},{"line_number":3246,"context_line":"        self.assertEqual(new_cell.cells[0].cpu_usage, 0)"},{"line_number":3247,"context_line":""},{"line_number":3248,"context_line":"    def test_host_usage_from_instances_isolated_without_siblings(self):"},{"line_number":3249,"context_line":"        host_pin \u003d objects.NUMATopology(cells\u003d["}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_f92e8d41","side":"PARENT","line":3246,"in_reply_to":"5faad753_e084a0b3","updated":"2019-09-11 22:55:53.000000000","message":"Done in a follow-up because I don\u0027t want to respin this late in the day https://review.opendev.org/681626","commit_id":"70957e09f30a981111d40d68f8c92d7eb6d5fd7a"}],"nova/virt/hardware.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"46d6e329c0ed4f1de283fbf79873a8609b6f9240","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"                  \u0027 and memory\u0027)"},{"line_number":1144,"context_line":"        memory_usage \u003d host_cell.memory_usage + instance_cell.memory"},{"line_number":1145,"context_line":"        cpu_usage \u003d host_cell.cpu_usage + len(instance_cell.cpuset)"},{"line_number":1146,"context_line":"        cpu_limit \u003d ("},{"line_number":1147,"context_line":"            len(host_cell.cpuset) * limit_cell.cpu_allocation_ratio)"},{"line_number":1148,"context_line":"        ram_limit \u003d host_cell.memory * limit_cell.ram_allocation_ratio"},{"line_number":1149,"context_line":"        if memory_usage \u003e ram_limit:"},{"line_number":1150,"context_line":"            LOG.debug(\u0027Host cell has limitations on usable memory. There is \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_9c7f0b65","line":1147,"range":{"start_line":1146,"start_character":0,"end_line":1147,"end_character":68},"updated":"2019-08-01 18:13:59.000000000","message":"nit: unnecessary change","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"df4e8c5a4acbf27e9bf29733445d0a50cb2b1011","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"                  \u0027 and memory\u0027)"},{"line_number":1144,"context_line":"        memory_usage \u003d host_cell.memory_usage + instance_cell.memory"},{"line_number":1145,"context_line":"        cpu_usage \u003d host_cell.cpu_usage + len(instance_cell.cpuset)"},{"line_number":1146,"context_line":"        cpu_limit \u003d ("},{"line_number":1147,"context_line":"            len(host_cell.cpuset) * limit_cell.cpu_allocation_ratio)"},{"line_number":1148,"context_line":"        ram_limit \u003d host_cell.memory * limit_cell.ram_allocation_ratio"},{"line_number":1149,"context_line":"        if memory_usage \u003e ram_limit:"},{"line_number":1150,"context_line":"            LOG.debug(\u0027Host cell has limitations on usable memory. There is \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_ed0c39ed","line":1147,"range":{"start_line":1146,"start_character":0,"end_line":1147,"end_character":68},"in_reply_to":"7faddb67_9c7f0b65","updated":"2019-08-02 17:56:59.000000000","message":"Done","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9a3dd25a30b14893ea338ab537a0036eb1a98f07","unresolved":false,"context_lines":[{"line_number":999,"context_line":"              or None if instance cannot be pinned to the given host"},{"line_number":1000,"context_line":"    \"\"\""},{"line_number":1001,"context_line":"    required_cpus \u003d len(instance_cell.cpuset) + num_cpu_reserved"},{"line_number":1002,"context_line":"    if host_cell.avail_pcpus \u003c required_cpus:"},{"line_number":1003,"context_line":"        LOG.debug(\u0027Not enough available CPUs to schedule instance. \u0027"},{"line_number":1004,"context_line":"                  \u0027Oversubscription is not possible with pinned instances. \u0027"},{"line_number":1005,"context_line":"                  \u0027Required: %(required)d (%(vcpus)d + %(num_cpu_reserved)d), \u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"5faad753_50910f52","line":1002,"range":{"start_line":1002,"start_character":17,"end_line":1002,"end_character":27},"updated":"2019-09-07 03:59:02.000000000","message":"this will blow up also, when this host_cell is a old node. The host_cell.pcpuset not existed.\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]: Traceback (most recent call last):\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py\", line 165, in _process_incoming\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     res \u003d self.dispatcher.dispatch(message)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 274, in dispatch\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     return self._do_dispatch(endpoint, method, ctxt, args)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 194, in _do_dispatch\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     result \u003d func(ctxt, **new_args)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py\", line 235, in inner\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     return func(*args, **kwargs)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/scheduler/manager.py\", line 186, in select_destinations\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     allocation_request_version, return_alternates)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/scheduler/filter_scheduler.py\", line 96, in select_destinations\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     allocation_request_version, return_alternates)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/scheduler/filter_scheduler.py\", line 210, in _schedule\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/scheduler/filter_scheduler.py\", line 441, in _get_sorted_hosts\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     spec_obj, index)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/scheduler/host_manager.py\", line 606, in get_filtered_hosts\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     hosts, spec_obj, index)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/filters.py\", line 89, in get_filtered_objects\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     list_objs \u003d list(objs)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/filters.py\", line 44, in filter_all\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     if self._filter_one(obj, spec_obj):\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/scheduler/filters/__init__.py\", line 44, in _filter_one\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     return self.host_passes(obj, spec)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/scheduler/filters/numa_topology_filter.py\", line 100, in host_passes\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     pci_stats\u003dhost_state.pci_stats))\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/virt/hardware.py\", line 1997, in numa_fit_instance_to_host\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     host_cell, instance_cell, limits, cpuset_reserved)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/virt/hardware.py\", line 1141, in _numa_fit_instance_cell\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     host_cell, instance_cell, cpuset_reserved)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/virt/hardware.py\", line 1005, in _numa_fit_instance_cell_with_pinning\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     if host_cell.avail_pcpus \u003c required_cpus:\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/objects/numa.py\", line 90, in avail_pcpus\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     return len(self.free_pcpus)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/opt/stack/nova/nova/objects/numa.py\", line 80, in free_pcpus\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     return self.pcpuset - self.pinned_cpus or set()\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py\", line 67, in getter\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     self.obj_load_attr(name)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:   File \"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py\", line 603, in obj_load_attr\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]:     _(\"Cannot load \u0027%s\u0027 in the base class\") % attrname)\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]: NotImplementedError: Cannot load \u0027pcpuset\u0027 in the base class\nSep 06 20:55:04 jfz1r04h09 nova-conductor[58246]: : NotImplementedError: Cannot load \u0027pcpuset\u0027 in the base class","commit_id":"b897f93312d8a2d9e06ea35663e0a3bbd0444f9b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"adfa9b7f9657c575296dbbb9f70b1cb138213dd2","unresolved":false,"context_lines":[{"line_number":1108,"context_line":"        # TODO(stephenfin): Is \u0027cpuset_reserved\u0027 present if consuming emulator"},{"line_number":1109,"context_line":"        # threads from shared CPU pools. If so, we don\u0027t want to add this here"},{"line_number":1110,"context_line":"        required_cpus \u003d len(instance_cell.cpuset) + cpuset_reserved"},{"line_number":1111,"context_line":"        if required_cpus \u003e len(host_cell.pcpuset):"},{"line_number":1112,"context_line":"            LOG.debug(\u0027Not enough host cell CPUs to fit instance cell; \u0027"},{"line_number":1113,"context_line":"                      \u0027required: %(required)d + %(cpuset_reserved)d as \u0027"},{"line_number":1114,"context_line":"                      \u0027overhead, actual: %(actual)d\u0027, {"}],"source_content_type":"text/x-python","patch_set":28,"id":"5faad753_f01a7b15","line":1111,"range":{"start_line":1111,"start_character":31,"end_line":1111,"end_character":48},"updated":"2019-09-07 03:37:21.000000000","message":"The old node has no pcpuset, it will blow up.\n\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server Traceback (most recent call last):\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py\", line 165, in _process_incoming\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     res \u003d self.dispatcher.dispatch(message)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 274, in dispatch\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py\", line 194, in _do_dispatch\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     result \u003d func(ctxt, **new_args)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py\", line 235, in inner\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     return func(*args, **kwargs)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/manager.py\", line 186, in select_destinations\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     allocation_request_version, return_alternates)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/filter_scheduler.py\", line 96, in select_destinations\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     allocation_request_version, return_alternates)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/filter_scheduler.py\", line 210, in _schedule\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     hosts \u003d self._get_sorted_hosts(spec_obj, hosts, num)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/filter_scheduler.py\", line 441, in _get_sorted_hosts\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     spec_obj, index)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/host_manager.py\", line 606, in get_filtered_hosts\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     hosts, spec_obj, index)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/filters.py\", line 89, in get_filtered_objects\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     list_objs \u003d list(objs)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/filters.py\", line 44, in filter_all\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     if self._filter_one(obj, spec_obj):\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/filters/__init__.py\", line 44, in _filter_one\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     return self.host_passes(obj, spec)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/scheduler/filters/numa_topology_filter.py\", line 100, in host_passes\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     pci_stats\u003dhost_state.pci_stats))\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/virt/hardware.py\", line 1995, in numa_fit_instance_to_host\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     host_cell, instance_cell, limits, cpuset_reserved)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/nova/nova/virt/hardware.py\", line 1114, in _numa_fit_instance_cell\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     print \u0027!!!!!!!!!!!!!!!!check host_cell.pcpuset\u0027, host_cell.pcpuset\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py\", line 67, in getter\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     self.obj_load_attr(name)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server   File \"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py\", line 603, in obj_load_attr\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server     _(\"Cannot load \u0027%s\u0027 in the base class\") % attrname)\nSep 06 20:36:18 jfz1r04h09 nova-scheduler[48091]: ERROR oslo_messaging.rpc.server NotImplementedError: Cannot load \u0027pcpuset\u0027 in the base class","commit_id":"b897f93312d8a2d9e06ea35663e0a3bbd0444f9b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c0bebc7707d94f161da40bbaf8d8847e45f225f0","unresolved":false,"context_lines":[{"line_number":1108,"context_line":"        # TODO(stephenfin): Is \u0027cpuset_reserved\u0027 present if consuming emulator"},{"line_number":1109,"context_line":"        # threads from shared CPU pools. If so, we don\u0027t want to add this here"},{"line_number":1110,"context_line":"        required_cpus \u003d len(instance_cell.cpuset) + cpuset_reserved"},{"line_number":1111,"context_line":"        if required_cpus \u003e len(host_cell.pcpuset):"},{"line_number":1112,"context_line":"            LOG.debug(\u0027Not enough host cell CPUs to fit instance cell; \u0027"},{"line_number":1113,"context_line":"                      \u0027required: %(required)d + %(cpuset_reserved)d as \u0027"},{"line_number":1114,"context_line":"                      \u0027overhead, actual: %(actual)d\u0027, {"}],"source_content_type":"text/x-python","patch_set":28,"id":"5faad753_5cda78e9","line":1111,"range":{"start_line":1111,"start_character":31,"end_line":1111,"end_character":48},"in_reply_to":"5faad753_f01a7b15","updated":"2019-09-09 11:46:41.000000000","message":"Damn it. I missed the pre-check NUMATopologyFilter. Fixed and a unit test added.","commit_id":"b897f93312d8a2d9e06ea35663e0a3bbd0444f9b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8226fc3254efd6bb84a4695d154570da3500bcf8","unresolved":false,"context_lines":[{"line_number":2014,"context_line":"            dedicated_cpus \u003d host_cell.pcpuset"},{"line_number":2015,"context_line":""},{"line_number":2016,"context_line":"        new_cell \u003d objects.NUMACell("},{"line_number":2017,"context_line":"            id\u003dhost_cell.id,"},{"line_number":2018,"context_line":"            cpuset\u003dshared_cpus,"},{"line_number":2019,"context_line":"            cpu_usage\u003dshared_cpus_usage,"},{"line_number":2020,"context_line":"            pcpuset\u003ddedicated_cpus,"},{"line_number":2021,"context_line":"            pinned_cpus\u003dhost_cell.pinned_cpus,"},{"line_number":2022,"context_line":"            memory\u003dhost_cell.memory,"},{"line_number":2023,"context_line":"            memory_usage\u003dhost_cell.memory_usage,"},{"line_number":2024,"context_line":"            mempages\u003dhost_cell.mempages,"},{"line_number":2025,"context_line":"            siblings\u003dhost_cell.siblings)"},{"line_number":2026,"context_line":""},{"line_number":2027,"context_line":"        if \u0027network_metadata\u0027 in host_cell:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7faddb67_696b3ab8","line":2024,"range":{"start_line":2017,"start_character":0,"end_line":2024,"end_character":40},"updated":"2019-09-06 10:54:30.000000000","message":"I\u0027m not sure why I shuffled all these around. Will revert that if I need to respin","commit_id":"b897f93312d8a2d9e06ea35663e0a3bbd0444f9b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8226fc3254efd6bb84a4695d154570da3500bcf8","unresolved":false,"context_lines":[{"line_number":2034,"context_line":"            new_cell.mempages \u003d _numa_pagesize_usage_from_cell("},{"line_number":2035,"context_line":"                new_cell, instance_cell, sign)"},{"line_number":2036,"context_line":""},{"line_number":2037,"context_line":"            memory_usage \u003d memory_usage + sign * instance_cell.memory"},{"line_number":2038,"context_line":""},{"line_number":2039,"context_line":"            if not instance_cell.cpu_pinning_requested:"},{"line_number":2040,"context_line":"                shared_cpus_usage +\u003d sign * len(instance_cell.cpuset)"},{"line_number":2041,"context_line":"                continue"},{"line_number":2042,"context_line":""},{"line_number":2043,"context_line":"            pinned_cpus \u003d set(instance_cell.cpu_pinning.values())"},{"line_number":2044,"context_line":"            if instance_cell.cpuset_reserved:"},{"line_number":2045,"context_line":"                pinned_cpus |\u003d instance_cell.cpuset_reserved"},{"line_number":2046,"context_line":""},{"line_number":2047,"context_line":"            if free:"},{"line_number":2048,"context_line":"                if (instance_cell.cpu_thread_policy \u003d\u003d"},{"line_number":2049,"context_line":"                        fields.CPUThreadAllocationPolicy.ISOLATE):"},{"line_number":2050,"context_line":"                    new_cell.unpin_cpus_with_siblings(pinned_cpus)"},{"line_number":2051,"context_line":"                else:"},{"line_number":2052,"context_line":"                    new_cell.unpin_cpus(pinned_cpus)"},{"line_number":2053,"context_line":"            else:"},{"line_number":2054,"context_line":"                if (instance_cell.cpu_thread_policy \u003d\u003d"},{"line_number":2055,"context_line":"                        fields.CPUThreadAllocationPolicy.ISOLATE):"},{"line_number":2056,"context_line":"                    new_cell.pin_cpus_with_siblings(pinned_cpus)"},{"line_number":2057,"context_line":"                else:"},{"line_number":2058,"context_line":"                    new_cell.pin_cpus(pinned_cpus)"},{"line_number":2059,"context_line":""},{"line_number":2060,"context_line":"        # NOTE(stephenfin): We don\u0027t need to set \u0027pinned_cpus\u0027 here since that"},{"line_number":2061,"context_line":"        # was done in the above \u0027(un)pin_cpus(_with_siblings)\u0027 functions"}],"source_content_type":"text/x-python","patch_set":28,"id":"5faad753_c21b0371","line":2058,"range":{"start_line":2037,"start_character":0,"end_line":2058,"end_character":50},"updated":"2019-09-06 10:54:30.000000000","message":"I also should have done this bit of rework separate. Again, I\u0027ll split out if/when I need to respin","commit_id":"b897f93312d8a2d9e06ea35663e0a3bbd0444f9b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f20e28150474bbf8f2bd3d7c875aca7e22016df7","unresolved":false,"context_lines":[{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"    # The \u0027pcpuset\u0027 field is only set by newer compute nodes, so if it\u0027s"},{"line_number":1106,"context_line":"    # not present then we\u0027ve received this object from a pre-Train compute"},{"line_number":1107,"context_line":"    # node and need to query against for the \u0027cpuset\u0027 field instead until the"},{"line_number":1108,"context_line":"    # compute node has been upgraded and starts reporting things properly."},{"line_number":1109,"context_line":"    # TODO(stephenfin): Remove in U"},{"line_number":1110,"context_line":"    if \u0027pcpuset\u0027 not in host_cell:"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_6c6d3997","line":1107,"range":{"start_line":1107,"start_character":29,"end_line":1107,"end_character":36},"updated":"2019-09-09 17:38:16.000000000","message":"against....?","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0d3de56976da07b14a00850d0632fa15a525c6b9","unresolved":false,"context_lines":[{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"    # The \u0027pcpuset\u0027 field is only set by newer compute nodes, so if it\u0027s"},{"line_number":1106,"context_line":"    # not present then we\u0027ve received this object from a pre-Train compute"},{"line_number":1107,"context_line":"    # node and need to query against for the \u0027cpuset\u0027 field instead until the"},{"line_number":1108,"context_line":"    # compute node has been upgraded and starts reporting things properly."},{"line_number":1109,"context_line":"    # TODO(stephenfin): Remove in U"},{"line_number":1110,"context_line":"    if \u0027pcpuset\u0027 not in host_cell:"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_67354646","line":1107,"range":{"start_line":1107,"start_character":29,"end_line":1107,"end_character":36},"in_reply_to":"5faad753_6c6d3997","updated":"2019-09-10 10:34:01.000000000","message":"s/for //","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f20e28150474bbf8f2bd3d7c875aca7e22016df7","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"    # not present then we\u0027ve received this object from a pre-Train compute"},{"line_number":1107,"context_line":"    # node and need to query against for the \u0027cpuset\u0027 field instead until the"},{"line_number":1108,"context_line":"    # compute node has been upgraded and starts reporting things properly."},{"line_number":1109,"context_line":"    # TODO(stephenfin): Remove in U"},{"line_number":1110,"context_line":"    if \u0027pcpuset\u0027 not in host_cell:"},{"line_number":1111,"context_line":"        host_cell.pcpuset \u003d host_cell.cpuset"},{"line_number":1112,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_6c0219b7","line":1109,"updated":"2019-09-09 17:38:16.000000000","message":"Technically you should be able to remove this in U if everyone follows the rules. However, it kinda breaks your ability to handle objects back to the .0 version of the current major, so it\u0027s maybe a little aggressive to drop this so soon.\n\nThat said, I\u0027m not getting from the comment above what the behavior is if we take the assumption made on L1111. We set pcpuset\u003dcpuset, but what behavior does that result in? Something sane? Expect to always fail?","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ddc9afa0cef6bc39608c65178d9e05f66f5ab670","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"    # not present then we\u0027ve received this object from a pre-Train compute"},{"line_number":1107,"context_line":"    # node and need to query against for the \u0027cpuset\u0027 field instead until the"},{"line_number":1108,"context_line":"    # compute node has been upgraded and starts reporting things properly."},{"line_number":1109,"context_line":"    # TODO(stephenfin): Remove in U"},{"line_number":1110,"context_line":"    if \u0027pcpuset\u0027 not in host_cell:"},{"line_number":1111,"context_line":"        host_cell.pcpuset \u003d host_cell.cpuset"},{"line_number":1112,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_2fa3a0a0","line":1109,"in_reply_to":"5faad753_67d1c6cd","updated":"2019-09-10 13:09:23.000000000","message":"To be clear, I kept this for the reasons above but I\u0027m don\u0027t think it\u0027s worth worrying about. The chances are this will still be there when the machines rise up against in 2040 or so","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0d3de56976da07b14a00850d0632fa15a525c6b9","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"    # not present then we\u0027ve received this object from a pre-Train compute"},{"line_number":1107,"context_line":"    # node and need to query against for the \u0027cpuset\u0027 field instead until the"},{"line_number":1108,"context_line":"    # compute node has been upgraded and starts reporting things properly."},{"line_number":1109,"context_line":"    # TODO(stephenfin): Remove in U"},{"line_number":1110,"context_line":"    if \u0027pcpuset\u0027 not in host_cell:"},{"line_number":1111,"context_line":"        host_cell.pcpuset \u003d host_cell.cpuset"},{"line_number":1112,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_67d1c6cd","line":1109,"in_reply_to":"5faad753_6c0219b7","updated":"2019-09-10 10:34:01.000000000","message":"\u003e Technically you should be able to remove this in U if everyone\n \u003e follows the rules. However, it kinda breaks your ability to handle\n \u003e objects back to the .0 version of the current major, so it\u0027s maybe\n \u003e a little aggressive to drop this so soon.\n\nAye, but it does match our expectation that you can only run N or N-1 compute nodes with an N controller.\n\n \u003e That said, I\u0027m not getting from the comment above what the behavior\n \u003e is if we take the assumption made on L1111. We set pcpuset\u003dcpuset,\n \u003e but what behavior does that result in? Something sane? Expect to\n \u003e always fail?\n\nWe fall back to the previous behavior. The addition of the \u0027pcpuset\u0027 field allows us to track host CPUs intended for dedicated (pinned) instances separately, leaving \u0027cpuset\u0027 to track only the host CPUs intended for for non-dedicated instances. Before we added this, \u0027cpuset\u0027 was used for both, and by setting \u0027pcpuset\u0027 to the value of \u0027cpuset\u0027, we essentially continue with that previous behavior. The alternative to this is to update the individual references to \u0027pcpuset\u0027 (e.g. [1]) to do the fallback there instead, but I think explicitly handling things in the places where we expect to receive older object versions as we\u0027ve done here is a better idea.\n\n[1] https://review.opendev.org/#/c/671800/30/nova/objects/numa.py@80","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"45593687be942d33e6b913374b77acfa52d51137","unresolved":false,"context_lines":[{"line_number":1108,"context_line":"    # compute node has been upgraded and starts reporting things properly."},{"line_number":1109,"context_line":"    # TODO(stephenfin): Remove in U"},{"line_number":1110,"context_line":"    if \u0027pcpuset\u0027 not in host_cell:"},{"line_number":1111,"context_line":"        host_cell.pcpuset \u003d host_cell.cpuset"},{"line_number":1112,"context_line":""},{"line_number":1113,"context_line":"    # NOTE(stephenfin): As with memory, do not allow an instance to overcommit"},{"line_number":1114,"context_line":"    # against itself on any NUMA cell"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_538334cd","line":1111,"updated":"2019-09-10 06:29:17.000000000","message":"tested, works.\n\nBut maybe we should update the host cells\u0027 pcpuset at here https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L228\n\nWe fill the host_cell.pcpuset when we populate them from the DB. Then the other part of scheduler needn\u0027t care about it, and just assume the host_cell.pcpuset always has value.","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0d3de56976da07b14a00850d0632fa15a525c6b9","unresolved":false,"context_lines":[{"line_number":1108,"context_line":"    # compute node has been upgraded and starts reporting things properly."},{"line_number":1109,"context_line":"    # TODO(stephenfin): Remove in U"},{"line_number":1110,"context_line":"    if \u0027pcpuset\u0027 not in host_cell:"},{"line_number":1111,"context_line":"        host_cell.pcpuset \u003d host_cell.cpuset"},{"line_number":1112,"context_line":""},{"line_number":1113,"context_line":"    # NOTE(stephenfin): As with memory, do not allow an instance to overcommit"},{"line_number":1114,"context_line":"    # against itself on any NUMA cell"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_c7f3da72","line":1111,"in_reply_to":"5faad753_538334cd","updated":"2019-09-10 10:34:01.000000000","message":"That\u0027s a good idea. I\u0027m going to move this check there instead (y)\n\nLater: Actually, I don\u0027t think I can. See my reply below","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f20e28150474bbf8f2bd3d7c875aca7e22016df7","unresolved":false,"context_lines":[{"line_number":1114,"context_line":"    # against itself on any NUMA cell"},{"line_number":1115,"context_line":"    if instance_cell.cpu_pinning_requested:"},{"line_number":1116,"context_line":"        # TODO(stephenfin): Is \u0027cpuset_reserved\u0027 present if consuming emulator"},{"line_number":1117,"context_line":"        # threads from shared CPU pools. If so, we don\u0027t want to add this here"},{"line_number":1118,"context_line":"        required_cpus \u003d len(instance_cell.cpuset) + cpuset_reserved"},{"line_number":1119,"context_line":"        if required_cpus \u003e len(host_cell.pcpuset):"},{"line_number":1120,"context_line":"            LOG.debug(\u0027Not enough host cell CPUs to fit instance cell; \u0027"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_2c2e6143","line":1117,"range":{"start_line":1117,"start_character":39,"end_line":1117,"end_character":40},"updated":"2019-09-09 17:38:16.000000000","message":"s/./?/ ?","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0d3de56976da07b14a00850d0632fa15a525c6b9","unresolved":false,"context_lines":[{"line_number":1114,"context_line":"    # against itself on any NUMA cell"},{"line_number":1115,"context_line":"    if instance_cell.cpu_pinning_requested:"},{"line_number":1116,"context_line":"        # TODO(stephenfin): Is \u0027cpuset_reserved\u0027 present if consuming emulator"},{"line_number":1117,"context_line":"        # threads from shared CPU pools. If so, we don\u0027t want to add this here"},{"line_number":1118,"context_line":"        required_cpus \u003d len(instance_cell.cpuset) + cpuset_reserved"},{"line_number":1119,"context_line":"        if required_cpus \u003e len(host_cell.pcpuset):"},{"line_number":1120,"context_line":"            LOG.debug(\u0027Not enough host cell CPUs to fit instance cell; \u0027"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_820cf03b","line":1117,"range":{"start_line":1117,"start_character":39,"end_line":1117,"end_character":40},"in_reply_to":"5faad753_2c2e6143","updated":"2019-09-10 10:34:01.000000000","message":"Done","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"45593687be942d33e6b913374b77acfa52d51137","unresolved":false,"context_lines":[{"line_number":2015,"context_line":"        # dedicated and shared until the compute node has been upgraded and"},{"line_number":2016,"context_line":"        # starts reporting things properly."},{"line_number":2017,"context_line":"        # TODO(stephenfin): Remove in U"},{"line_number":2018,"context_line":"        if \u0027pcpuset\u0027 not in host_cell:"},{"line_number":2019,"context_line":"            shared_cpus \u003d host_cell.cpuset"},{"line_number":2020,"context_line":"            dedicated_cpus \u003d host_cell.cpuset"},{"line_number":2021,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_b3094896","line":2018,"range":{"start_line":2018,"start_character":8,"end_line":2018,"end_character":37},"updated":"2019-09-10 06:29:17.000000000","message":"feel like you needn\u0027t this check anymore, since L1111 already set the pcpuset.","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0d3de56976da07b14a00850d0632fa15a525c6b9","unresolved":false,"context_lines":[{"line_number":2015,"context_line":"        # dedicated and shared until the compute node has been upgraded and"},{"line_number":2016,"context_line":"        # starts reporting things properly."},{"line_number":2017,"context_line":"        # TODO(stephenfin): Remove in U"},{"line_number":2018,"context_line":"        if \u0027pcpuset\u0027 not in host_cell:"},{"line_number":2019,"context_line":"            shared_cpus \u003d host_cell.cpuset"},{"line_number":2020,"context_line":"            dedicated_cpus \u003d host_cell.cpuset"},{"line_number":2021,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_270e6e3b","line":2018,"range":{"start_line":2018,"start_character":8,"end_line":2018,"end_character":37},"in_reply_to":"5faad753_b3094896","updated":"2019-09-10 10:34:01.000000000","message":"I do, because of the ordering of how we call these. L1111 handles things for \u0027numa_fit_instance_to_host\u0027 \u003cA\u003e while this handles things for \u0027numa_usage_from_instance_numa\u0027 \u003cB\u003e. In \u0027nova/scheduler/host_manager.py\u0027, we call \u003cA\u003e first followed by \u003cB\u003e [1]. However, in \u0027nova/compute/resource_tracker.py\u0027 we call \u003cB\u003e without calling \u003cA\u003e [2]. As such, both \u003cA\u003e and \u003cB\u003e need to handle these older object versions.\n\nAn alternative would be to provide a helper function on the \u0027ComputeNode\u0027 object that deserializes the \u0027numa_topology\u0027 field and sets \u0027pcpuset\u0027 if it\u0027s not set and then replace [3] and [4] with a call to that helper. However, that further abstracts things so I\u0027m not sure I want to do that.\n\n[1] https://github.com/openstack/nova/blob/43afc0443/nova/scheduler/host_manager.py#L298-L306\n[2] https://github.com/openstack/nova/blob/43afc0443/nova/compute/resource_tracker.py#L1094-L1096\n[3] https://github.com/openstack/nova/blob/43afc0443/nova/scheduler/host_manager.py#L228-L229\n[4] https://github.com/openstack/nova/blob/43afc0443/nova/compute/resource_tracker.py#L1089-L1090","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"161c32856ad9bdf402d91c6f614119635477d0f1","unresolved":false,"context_lines":[{"line_number":1103,"context_line":"                return"},{"line_number":1104,"context_line":""},{"line_number":1105,"context_line":"    # The \u0027pcpuset\u0027 field is only set by newer compute nodes, so if it\u0027s"},{"line_number":1106,"context_line":"    # not present then we\u0027ve received this object from a pre-Train compute"},{"line_number":1107,"context_line":"    # node and need to query against the \u0027cpuset\u0027 field instead until the"},{"line_number":1108,"context_line":"    # compute node has been upgraded and starts reporting things properly."},{"line_number":1109,"context_line":"    # TODO(stephenfin): Remove in U"}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_0571cea9","line":1106,"range":{"start_line":1106,"start_character":57,"end_line":1106,"end_character":66},"updated":"2019-09-11 10:24:53.000000000","message":"heh, we need to \u0027train\u0027 it ;-)","commit_id":"668181cfa571d0ac7f79f920ea8f3a5e128c993c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"161c32856ad9bdf402d91c6f614119635477d0f1","unresolved":false,"context_lines":[{"line_number":2116,"context_line":"        # NOTE(stephenfin): We don\u0027t need to set \u0027pinned_cpus\u0027 here since that"},{"line_number":2117,"context_line":"        # was done in the above \u0027(un)pin_cpus(_with_siblings)\u0027 functions"},{"line_number":2118,"context_line":"        new_cell.memory_usage \u003d max(0, memory_usage)"},{"line_number":2119,"context_line":"        new_cell.cpu_usage \u003d max(0, shared_cpus_usage)"},{"line_number":2120,"context_line":"        cells.append(new_cell)"},{"line_number":2121,"context_line":""},{"line_number":2122,"context_line":"    return objects.NUMATopology(cells\u003dcells)"}],"source_content_type":"text/x-python","patch_set":33,"id":"5faad753_c5d09622","line":2119,"updated":"2019-09-11 10:24:53.000000000","message":"I\u0027m cool with this.","commit_id":"668181cfa571d0ac7f79f920ea8f3a5e128c993c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7a05749abd67d5e945ec6c32151b76df244b817a","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"            if (instance_cell.cpu_thread_policy \u003d\u003d"},{"line_number":2053,"context_line":"                    fields.CPUThreadAllocationPolicy.ISOLATE and"},{"line_number":2054,"context_line":"                    host_cell.siblings):"},{"line_number":2055,"context_line":"                cpu_usage_diff *\u003d max(map(len, host_cell.siblings))"},{"line_number":2056,"context_line":"            cpu_usage +\u003d sign * cpu_usage_diff"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"            if cellid \u003d\u003d 0 and instance_topology.emulator_threads_isolated:"}],"source_content_type":"text/x-python","patch_set":34,"id":"5faad753_688964c8","side":"PARENT","line":2055,"updated":"2019-09-12 03:18:45.000000000","message":"We don\u0027t need those code since we doesn\u0027t allow the shared cpu policy with isoated cpu thread policy.","commit_id":"cf536545b26c6704670d884e8f9392b8445de87f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a98abd522b416d6af022daccb5103467e5de0cc8","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"            if (instance_cell.cpu_thread_policy \u003d\u003d"},{"line_number":2053,"context_line":"                    fields.CPUThreadAllocationPolicy.ISOLATE and"},{"line_number":2054,"context_line":"                    host_cell.siblings):"},{"line_number":2055,"context_line":"                cpu_usage_diff *\u003d max(map(len, host_cell.siblings))"},{"line_number":2056,"context_line":"            cpu_usage +\u003d sign * cpu_usage_diff"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"            if cellid \u003d\u003d 0 and instance_topology.emulator_threads_isolated:"}],"source_content_type":"text/x-python","patch_set":34,"id":"5faad753_55fafcbc","side":"PARENT","line":2055,"in_reply_to":"5faad753_688964c8","updated":"2019-09-12 10:00:48.000000000","message":"Correct","commit_id":"cf536545b26c6704670d884e8f9392b8445de87f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7a05749abd67d5e945ec6c32151b76df244b817a","unresolved":false,"context_lines":[{"line_number":2060,"context_line":"                # the instance to consume an additional pCPU as overhead. That"},{"line_number":2061,"context_line":"                # pCPU is mapped on the host NUMA node related to the guest"},{"line_number":2062,"context_line":"                # NUMA node 0."},{"line_number":2063,"context_line":"                cpu_usage +\u003d sign * len(instance_cell.cpuset_reserved)"},{"line_number":2064,"context_line":""},{"line_number":2065,"context_line":"            # Compute mempages usage"},{"line_number":2066,"context_line":"            new_cell.mempages \u003d _numa_pagesize_usage_from_cell("}],"source_content_type":"text/x-python","patch_set":34,"id":"5faad753_c87098df","side":"PARENT","line":2063,"updated":"2019-09-12 03:18:45.000000000","message":"ditto, it is the same reason why we can drop this code.","commit_id":"cf536545b26c6704670d884e8f9392b8445de87f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a98abd522b416d6af022daccb5103467e5de0cc8","unresolved":false,"context_lines":[{"line_number":2060,"context_line":"                # the instance to consume an additional pCPU as overhead. That"},{"line_number":2061,"context_line":"                # pCPU is mapped on the host NUMA node related to the guest"},{"line_number":2062,"context_line":"                # NUMA node 0."},{"line_number":2063,"context_line":"                cpu_usage +\u003d sign * len(instance_cell.cpuset_reserved)"},{"line_number":2064,"context_line":""},{"line_number":2065,"context_line":"            # Compute mempages usage"},{"line_number":2066,"context_line":"            new_cell.mempages \u003d _numa_pagesize_usage_from_cell("}],"source_content_type":"text/x-python","patch_set":34,"id":"5faad753_75f7f8d4","side":"PARENT","line":2063,"in_reply_to":"5faad753_c87098df","updated":"2019-09-12 10:00:48.000000000","message":"Also correct","commit_id":"cf536545b26c6704670d884e8f9392b8445de87f"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":20182,"name":"Bhagyashri Shewale","email":"bshewale@redhat.com","username":"bhagyashris"},"change_message_id":"7e202cd96a4f9318a962a5d3351aa55d0351da52","unresolved":false,"context_lines":[{"line_number":7295,"context_line":"        # See: https://bugs.launchpad.net/nova/+bug/1215593"},{"line_number":7296,"context_line":"        data[\"supported_instances\"] \u003d self._get_instance_capabilities()"},{"line_number":7297,"context_line":""},{"line_number":7298,"context_line":"        data[\"vcpus\"] \u003d len(self._get_vcpu_total())"},{"line_number":7299,"context_line":"        data[\"memory_mb\"] \u003d self._host.get_memory_mb_total()"},{"line_number":7300,"context_line":"        data[\"local_gb\"] \u003d disk_info_dict[\u0027total\u0027]"},{"line_number":7301,"context_line":"        data[\"vcpus_used\"] \u003d self._get_vcpu_used()"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_6ea7670d","line":7298,"range":{"start_line":7298,"start_character":28,"end_line":7298,"end_character":50},"updated":"2019-07-25 05:25:39.000000000","message":"this should be \"self._get_vcpu_available()\" as there is no \u0027_get_vcpu_total()\u0027 attribute otherwise it will give below error:\n\nError:\nAttributeError: \u0027LibvirtDriver\u0027 object has no attribute \u0027_get_vcpu_total\u0027","commit_id":"911f406e5e76ae544da4234a50022e2d374cb85c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"46d6e329c0ed4f1de283fbf79873a8609b6f9240","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"7faddb67_9cf4ebf2","updated":"2019-08-01 18:13:59.000000000","message":"The bulk of this change could probably be done separately, and all we\u0027d need to do is sub \u0027get_vcpu_pin_set\u0027 with \u0027get_cpu_shared_set\u0027","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"df4e8c5a4acbf27e9bf29733445d0a50cb2b1011","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"7faddb67_8de905e4","in_reply_to":"7faddb67_9cf4ebf2","updated":"2019-08-02 17:56:59.000000000","message":"Done","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"46d6e329c0ed4f1de283fbf79873a8609b6f9240","unresolved":false,"context_lines":[{"line_number":4592,"context_line":"            # mess up though, raise an exception"},{"line_number":4593,"context_line":"            raise exception.NUMATopologyUnsupported()"},{"line_number":4594,"context_line":""},{"line_number":4595,"context_line":"        shared_cpus \u003d hardware.get_cpu_shared_set()"},{"line_number":4596,"context_line":"        topology \u003d self._get_host_numa_topology()"},{"line_number":4597,"context_line":""},{"line_number":4598,"context_line":"        # We have instance NUMA so translate it to the config class"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_5cdaf377","line":4595,"updated":"2019-08-01 18:13:59.000000000","message":"Hmm, this might undefined. Perhaps we should be calling \u0027self._get_vcpu_available\u0027 instead","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"df4e8c5a4acbf27e9bf29733445d0a50cb2b1011","unresolved":false,"context_lines":[{"line_number":4592,"context_line":"            # mess up though, raise an exception"},{"line_number":4593,"context_line":"            raise exception.NUMATopologyUnsupported()"},{"line_number":4594,"context_line":""},{"line_number":4595,"context_line":"        shared_cpus \u003d hardware.get_cpu_shared_set()"},{"line_number":4596,"context_line":"        topology \u003d self._get_host_numa_topology()"},{"line_number":4597,"context_line":""},{"line_number":4598,"context_line":"        # We have instance NUMA so translate it to the config class"}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_53cc0e34","line":4595,"in_reply_to":"7faddb67_5cdaf377","updated":"2019-08-02 17:56:59.000000000","message":"Done","commit_id":"7a7dd93a46df6e3f2c6221e1ae4964a56b21d6f3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"adfa9b7f9657c575296dbbb9f70b1cb138213dd2","unresolved":false,"context_lines":[{"line_number":4606,"context_line":"        # We only pin an instance to some host cores if the user has provided"},{"line_number":4607,"context_line":"        # configuration to suggest we should."},{"line_number":4608,"context_line":"        shared_cpus \u003d None"},{"line_number":4609,"context_line":"        if CONF.vcpu_pin_set or CONF.compute.cpu_shared_set:"},{"line_number":4610,"context_line":"            shared_cpus \u003d self._get_vcpu_available()"},{"line_number":4611,"context_line":""},{"line_number":4612,"context_line":"        topology \u003d self._get_host_numa_topology()"},{"line_number":4613,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_1d700b72","line":4610,"range":{"start_line":4609,"start_character":8,"end_line":4610,"end_character":52},"updated":"2019-09-07 03:37:21.000000000","message":"a little confusing, just try to ensure understand correctly.\n\nwe won\u0027t allow none of cpu_dedicated_set and cpu_shared_set is set after upgrade to T release.\n\nBut this compatible with S release behaviour(no vcpu_pin_set, then no any pin). But after upgrade, there is no way for this behavor, right?\n\nIn the next release, we will remove this check?","commit_id":"1c20118fe94ef4668e3e1e8c8f96cd07d8fcd048"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c0bebc7707d94f161da40bbaf8d8847e45f225f0","unresolved":false,"context_lines":[{"line_number":4606,"context_line":"        # We only pin an instance to some host cores if the user has provided"},{"line_number":4607,"context_line":"        # configuration to suggest we should."},{"line_number":4608,"context_line":"        shared_cpus \u003d None"},{"line_number":4609,"context_line":"        if CONF.vcpu_pin_set or CONF.compute.cpu_shared_set:"},{"line_number":4610,"context_line":"            shared_cpus \u003d self._get_vcpu_available()"},{"line_number":4611,"context_line":""},{"line_number":4612,"context_line":"        topology \u003d self._get_host_numa_topology()"},{"line_number":4613,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5faad753_dcc66817","line":4610,"range":{"start_line":4609,"start_character":8,"end_line":4610,"end_character":52},"in_reply_to":"7faddb67_1d700b72","updated":"2019-09-09 11:46:41.000000000","message":"\u003e a little confusing, just try to ensure understand correctly.\n \u003e \n \u003e we won\u0027t allow none of cpu_dedicated_set and cpu_shared_set is set\n \u003e after upgrade to T release.\n\nSean\u0027s looking for this, but I don\u0027t think it\u0027s necessary.\n\n \u003e But this compatible with S release behaviour(no vcpu_pin_set, then\n \u003e no any pin). But after upgrade, there is no way for this behavor,\n \u003e right?\n\nNope, people can keep using this behavior. If any([CONF.vcpu_pin_set, CONF.compute.cpu_shared_set, CONF.compute.cpu_dedicated_set]) \u003d\u003d False, we will (a) report all online host CPUs as VCPUs (so PCPU total \u003d\u003d 0) and (b) we will not pin instance CPUs to any host CPUs, just like before.\n\n \u003e In the next release, we will remove this check?\n\nNo, we will just drop \u0027CONF.vcpu_pin_set\u0027:\n\n  if CONF.compute.cpu_shared_set:\n      shared_cpus \u003d self._get_vcpu_available()","commit_id":"1c20118fe94ef4668e3e1e8c8f96cd07d8fcd048"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f20e28150474bbf8f2bd3d7c875aca7e22016df7","unresolved":false,"context_lines":[{"line_number":6664,"context_line":"        # HACK! In an ideal world, if the operator hadn\u0027t configured this host"},{"line_number":6665,"context_line":"        # to report PCPUs, then we shouldn\u0027t be able to used pinned instances"},{"line_number":6666,"context_line":"        # on this host. However, that requires every compute node be updated"},{"line_number":6667,"context_line":"        # and configured to use PCPUs in one fell swoop, otherwise it will not"},{"line_number":6668,"context_line":"        # be possible to schedule pinned instances to any host that has not yet"},{"line_number":6669,"context_line":"        # been upgraded and reconfigured, which could rule out a lot of hosts"},{"line_number":6670,"context_line":"        # and breaks N+1 controller -\u003e N compute node compatibility. As a"},{"line_number":6671,"context_line":"        # result, we need to lie and report the CPUs meant for VCPUs as"},{"line_number":6672,"context_line":"        # something we can consume for pinned instances. Note that the only"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_6c77793c","line":6669,"range":{"start_line":6667,"start_character":57,"end_line":6669,"end_character":40},"updated":"2019-09-09 17:38:16.000000000","message":"I don\u0027t understand this. I\u0027m sure I\u0027m missing something about why, and you\u0027ve made a point of highlighting the sketchiness of the approach here. So, can you explain it more?\n\nWhy does this host\u0027s config change anything about what the control nodes are doing? What I glean from this comment and a few others is that you\u0027re trying to make a compute that is upgraded with no config changes behave just like computes did before you added these new knobs, is that right? That\u0027s noble and good of course, but it seems like we should log something here to indicate that they need to upgrade their config, but also seems like something that should be isolated per-compute instead of something we have to do atomically across the board to all computes.","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0d3de56976da07b14a00850d0632fa15a525c6b9","unresolved":false,"context_lines":[{"line_number":6664,"context_line":"        # HACK! In an ideal world, if the operator hadn\u0027t configured this host"},{"line_number":6665,"context_line":"        # to report PCPUs, then we shouldn\u0027t be able to used pinned instances"},{"line_number":6666,"context_line":"        # on this host. However, that requires every compute node be updated"},{"line_number":6667,"context_line":"        # and configured to use PCPUs in one fell swoop, otherwise it will not"},{"line_number":6668,"context_line":"        # be possible to schedule pinned instances to any host that has not yet"},{"line_number":6669,"context_line":"        # been upgraded and reconfigured, which could rule out a lot of hosts"},{"line_number":6670,"context_line":"        # and breaks N+1 controller -\u003e N compute node compatibility. As a"},{"line_number":6671,"context_line":"        # result, we need to lie and report the CPUs meant for VCPUs as"},{"line_number":6672,"context_line":"        # something we can consume for pinned instances. Note that the only"}],"source_content_type":"text/x-python","patch_set":30,"id":"5faad753_421d980d","line":6669,"range":{"start_line":6667,"start_character":57,"end_line":6669,"end_character":40},"in_reply_to":"5faad753_6c77793c","updated":"2019-09-10 10:34:01.000000000","message":"\u003e I don\u0027t understand this. I\u0027m sure I\u0027m missing something about why,\n \u003e and you\u0027ve made a point of highlighting the sketchiness of the\n \u003e approach here. So, can you explain it more?\n\nTo be honest, this is much less sketchy that I\u0027ve made it seem and I should replace \u0027HACK!\u0027 with \u0027NOTE\u0027. As an aside, I could in fact remove this entire thing, avoid setting the \u0027pcpuset\u0027 field, return a Stein-like object and rely on [1] and [2] to handle the difference. I like that less though. I\u0027m not quite sure why yet.\n\n \u003e Why does this host\u0027s config change anything about what the control\n \u003e nodes are doing?\n\nThis code is used to generate the \u0027NUMATopology\u0027 object, which is reported back to the scheduler using the \u0027ComputeNode.numa_topology\u0027 field. The \u0027NUMATopologyFilter\u0027 uses the \u0027numa_fit_instance_to_host\u0027 function from \u0027nova.virt.hardware\u0027, just like the driver itself, when trying to figure out if an instance can be pinned to a particular host. That\u0027s how this can affect a controller (the scheduler).\n\n \u003e What I glean from this comment and a few others is\n \u003e that you\u0027re trying to make a compute that is upgraded with no\n \u003e config changes behave just like computes did before you added these\n \u003e new knobs, is that right?\n\nCorrect.\n\n \u003e That\u0027s noble and good of course, but it\n \u003e seems like we should log something here to indicate that they need\n \u003e to upgrade their config, but also seems like something that should\n \u003e be isolated per-compute instead of something we have to do\n \u003e atomically across the board to all computes.\n\nYou mean like [3]? I\u0027m doing it on compute node startup because if I did it here, it would be triggered every single time this function is run, which is rather often (unless I used a global but eeew).\n\n[1] https://review.opendev.org/#/c/671800/30/nova/virt/hardware.py@1110\n[2] https://review.opendev.org/#/c/671800/30/nova/virt/hardware.py@2018\n[3] https://review.opendev.org/#/c/671793/20/nova/virt/libvirt/driver.py@766","commit_id":"42b081a7b0eaf72f487c9e45a725dd07ad130f93"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7a05749abd67d5e945ec6c32151b76df244b817a","unresolved":false,"context_lines":[{"line_number":4706,"context_line":"            raise exception.NUMATopologyUnsupported()"},{"line_number":4707,"context_line":""},{"line_number":4708,"context_line":"        # We only pin an instance to some host cores if the user has provided"},{"line_number":4709,"context_line":"        # configuration to suggest we should."},{"line_number":4710,"context_line":"        shared_cpus \u003d None"},{"line_number":4711,"context_line":"        if CONF.vcpu_pin_set or CONF.compute.cpu_shared_set:"},{"line_number":4712,"context_line":"            shared_cpus \u003d self._get_vcpu_available()"}],"source_content_type":"text/x-python","patch_set":34,"id":"5faad753_cb5ad228","line":4709,"updated":"2019-09-12 03:18:45.000000000","message":"without any vcpu_pin_set and cpu_shard_set, then the instance is just going to floating on all cpus.","commit_id":"6d8267be2fa24da633dbcf9234e5339debc5ed20"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a98abd522b416d6af022daccb5103467e5de0cc8","unresolved":false,"context_lines":[{"line_number":4706,"context_line":"            raise exception.NUMATopologyUnsupported()"},{"line_number":4707,"context_line":""},{"line_number":4708,"context_line":"        # We only pin an instance to some host cores if the user has provided"},{"line_number":4709,"context_line":"        # configuration to suggest we should."},{"line_number":4710,"context_line":"        shared_cpus \u003d None"},{"line_number":4711,"context_line":"        if CONF.vcpu_pin_set or CONF.compute.cpu_shared_set:"},{"line_number":4712,"context_line":"            shared_cpus \u003d self._get_vcpu_available()"}],"source_content_type":"text/x-python","patch_set":34,"id":"5faad753_d52fcc3c","line":4709,"in_reply_to":"5faad753_cb5ad228","updated":"2019-09-12 10:00:48.000000000","message":"Yup. That\u0027s the same as before only previously we only cared about vcpu_pin_set","commit_id":"6d8267be2fa24da633dbcf9234e5339debc5ed20"}]}
