)]}'
{"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e6c6d46007dbb001300d5a50f2260fdd9eac0ecc","unresolved":false,"context_lines":[{"line_number":9390,"context_line":"                mock.patch.object("},{"line_number":9391,"context_line":"                    hardware, \u0027get_vcpu_pin_set\u0027, return_value\u003dset([0, 1, 3])),"},{"line_number":9392,"context_line":"                mock.patch.object(host.Host, \u0027get_online_cpus\u0027,"},{"line_number":9393,"context_line":"                                  return_value\u003dset(range(8))),"},{"line_number":9394,"context_line":"                ):"},{"line_number":9395,"context_line":"            got_topo \u003d drvr._get_host_numa_topology()"},{"line_number":9396,"context_line":"            got_topo_dict \u003d got_topo._to_dict()"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_49bdf401","line":9393,"updated":"2015-02-16 14:50:37.000000000","message":"all of those change is just for make sure existed unittest running successful. We should add unittest to ensure when some cpu offline then the code can running as expected.","commit_id":"d1b290a1221c48854185441bbacd629930de737b"},{"author":{"_account_id":14594,"name":"Alexander Schmidt","email":"alexs@linux.vnet.ibm.com","username":"alexs"},"change_message_id":"440db72e534f3d740bad7867e6f5566859727b94","unresolved":false,"context_lines":[{"line_number":9390,"context_line":"                mock.patch.object("},{"line_number":9391,"context_line":"                    hardware, \u0027get_vcpu_pin_set\u0027, return_value\u003dset([0, 1, 3])),"},{"line_number":9392,"context_line":"                mock.patch.object(host.Host, \u0027get_online_cpus\u0027,"},{"line_number":9393,"context_line":"                                  return_value\u003dset(range(8))),"},{"line_number":9394,"context_line":"                ):"},{"line_number":9395,"context_line":"            got_topo \u003d drvr._get_host_numa_topology()"},{"line_number":9396,"context_line":"            got_topo_dict \u003d got_topo._to_dict()"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_ea567105","line":9393,"in_reply_to":"da86d52c_49bdf401","updated":"2015-02-17 14:48:03.000000000","message":"Done","commit_id":"d1b290a1221c48854185441bbacd629930de737b"},{"author":{"_account_id":14594,"name":"Alexander Schmidt","email":"alexs@linux.vnet.ibm.com","username":"alexs"},"change_message_id":"162c9b90642eeeab48dd31f70974451d3ded6aae","unresolved":false,"context_lines":[{"line_number":9390,"context_line":"                mock.patch.object("},{"line_number":9391,"context_line":"                    hardware, \u0027get_vcpu_pin_set\u0027, return_value\u003dset([0, 1, 3])),"},{"line_number":9392,"context_line":"                mock.patch.object(host.Host, \u0027get_online_cpus\u0027,"},{"line_number":9393,"context_line":"                                  return_value\u003dset(range(8))),"},{"line_number":9394,"context_line":"                ):"},{"line_number":9395,"context_line":"            got_topo \u003d drvr._get_host_numa_topology()"},{"line_number":9396,"context_line":"            got_topo_dict \u003d got_topo._to_dict()"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_ff281999","line":9393,"in_reply_to":"da86d52c_49bdf401","updated":"2015-02-16 16:07:28.000000000","message":"yeah I did not implement a testcase yet before getting consensus on the general approach of the patch. I\u0027ll add a testcase for the next patchset.","commit_id":"d1b290a1221c48854185441bbacd629930de737b"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"d57df620a8e5234d353addbaf5f202a245949521","unresolved":false,"context_lines":[{"line_number":3379,"context_line":"    @staticmethod"},{"line_number":3380,"context_line":"    def _get_online_cpus(cpu_map, cell):"},{"line_number":3381,"context_line":"        if cpu_map is None:"},{"line_number":3382,"context_line":"            return cell"},{"line_number":3383,"context_line":""},{"line_number":3384,"context_line":"        online_cpus \u003d set()"},{"line_number":3385,"context_line":"        for cpu in cell.cpuset:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_0425c709","line":3382,"updated":"2015-02-09 09:42:28.000000000","message":"This doesn\u0027t make any sense - in the normal codepath you are returning a set of CPU ids, and in this codepath you are returning \u0027cell\u0027 which is a completely different data type","commit_id":"c6cf3e638be409275550cb98072a9eec7290724a"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"1363e695b05ccf3267ae7ae626a56e79ad8d7b6b","unresolved":false,"context_lines":[{"line_number":4636,"context_line":""},{"line_number":4637,"context_line":"        cells \u003d []"},{"line_number":4638,"context_line":"        allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":4639,"context_line":"        online_cpus \u003d self._host.get_online_cpus()"},{"line_number":4640,"context_line":""},{"line_number":4641,"context_line":"        for cell in topology.cells:"},{"line_number":4642,"context_line":"            cpuset \u003d set(cpu.id for cpu in cell.cpus)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_78e5d1a2","line":4639,"updated":"2015-02-11 14:43:15.000000000","message":"Why not simply do\n\n  allowed_cpus \u003d hardware.get_vcpu_pin_set() \u0026 self._host.get_online_cpus()\n\ninstead of introducing a second variable that needs to be processed","commit_id":"cbbce49bd159f7eba65349f7967654b17de9b808"},{"author":{"_account_id":14594,"name":"Alexander Schmidt","email":"alexs@linux.vnet.ibm.com","username":"alexs"},"change_message_id":"32b74c84fbd3bf3dd1a3d989f97752700cabf3ce","unresolved":false,"context_lines":[{"line_number":4636,"context_line":""},{"line_number":4637,"context_line":"        cells \u003d []"},{"line_number":4638,"context_line":"        allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":4639,"context_line":"        online_cpus \u003d self._host.get_online_cpus()"},{"line_number":4640,"context_line":""},{"line_number":4641,"context_line":"        for cell in topology.cells:"},{"line_number":4642,"context_line":"            cpuset \u003d set(cpu.id for cpu in cell.cpus)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_bb89cc70","line":4639,"in_reply_to":"da86d52c_18401e06","updated":"2015-02-12 15:09:12.000000000","message":"get_vcpu_pin_set() can still return None. I changed get_online_cpus() to never return None now, see the updated patchset.","commit_id":"cbbce49bd159f7eba65349f7967654b17de9b808"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"58ee1cb78b4ae9bba36f5e4e3f5ab509023e48db","unresolved":false,"context_lines":[{"line_number":4636,"context_line":""},{"line_number":4637,"context_line":"        cells \u003d []"},{"line_number":4638,"context_line":"        allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":4639,"context_line":"        online_cpus \u003d self._host.get_online_cpus()"},{"line_number":4640,"context_line":""},{"line_number":4641,"context_line":"        for cell in topology.cells:"},{"line_number":4642,"context_line":"            cpuset \u003d set(cpu.id for cpu in cell.cpus)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_18401e06","line":4639,"in_reply_to":"da86d52c_64c6d669","updated":"2015-02-12 14:50:44.000000000","message":"It won\u0027t return None if you address my comment on that method.","commit_id":"cbbce49bd159f7eba65349f7967654b17de9b808"},{"author":{"_account_id":14594,"name":"Alexander Schmidt","email":"alexs@linux.vnet.ibm.com","username":"alexs"},"change_message_id":"268799d52ff2865991c6840cb951a510480efd3c","unresolved":false,"context_lines":[{"line_number":4636,"context_line":""},{"line_number":4637,"context_line":"        cells \u003d []"},{"line_number":4638,"context_line":"        allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":4639,"context_line":"        online_cpus \u003d self._host.get_online_cpus()"},{"line_number":4640,"context_line":""},{"line_number":4641,"context_line":"        for cell in topology.cells:"},{"line_number":4642,"context_line":"            cpuset \u003d set(cpu.id for cpu in cell.cpus)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_64c6d669","line":4639,"in_reply_to":"da86d52c_78e5d1a2","updated":"2015-02-12 14:46:03.000000000","message":"Because get_vcpu_pin_set() can return None. How about the following code:\n\n 4638         allowed_cpus \u003d hardware.get_vcpu_pin_set() \n 4639         online_cpus \u003d self._host.get_online_cpus()\n 4640         if allowed_cpus:\n 4641             allowed_cpus \u0026\u003d online_cpus\n 4642         else:\n 4643             allowed_cpus \u003d online_cpus","commit_id":"cbbce49bd159f7eba65349f7967654b17de9b808"}],"nova/virt/libvirt/host.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"1363e695b05ccf3267ae7ae626a56e79ad8d7b6b","unresolved":false,"context_lines":[{"line_number":596,"context_line":"            (cpus, cpu_map, online) \u003d self.get_connection().getCPUMap()"},{"line_number":597,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":598,"context_line":"            LOG.warn(_LW(\"Could not get cpu map: %(error)s\"), {\u0027error\u0027: ex})"},{"line_number":599,"context_line":"            return None"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"        online_cpus \u003d set()"},{"line_number":602,"context_line":"        for cpu in range(cpus):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_9b0b5f23","line":599,"updated":"2015-02-11 14:43:15.000000000","message":"This API was first introduced in libvirt version 1.0.0.   The NUMA code paths are already conditional based on 1.0.4,  so you can be sure the getCPUMap API exists. As such I don\u0027t think you should be catching \u0026 ignoring exceptions raised. Exceptions here will indicate a real problem that we should allow to propagate to callers \u0026 beyond, rather than returning None. At most catch \u0026 reraise a NovaException instead.","commit_id":"cbbce49bd159f7eba65349f7967654b17de9b808"},{"author":{"_account_id":14594,"name":"Alexander Schmidt","email":"alexs@linux.vnet.ibm.com","username":"alexs"},"change_message_id":"268799d52ff2865991c6840cb951a510480efd3c","unresolved":false,"context_lines":[{"line_number":596,"context_line":"            (cpus, cpu_map, online) \u003d self.get_connection().getCPUMap()"},{"line_number":597,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":598,"context_line":"            LOG.warn(_LW(\"Could not get cpu map: %(error)s\"), {\u0027error\u0027: ex})"},{"line_number":599,"context_line":"            return None"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"        online_cpus \u003d set()"},{"line_number":602,"context_line":"        for cpu in range(cpus):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_e4cf2627","line":599,"in_reply_to":"da86d52c_9b0b5f23","updated":"2015-02-12 14:46:03.000000000","message":"Done","commit_id":"cbbce49bd159f7eba65349f7967654b17de9b808"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e6c6d46007dbb001300d5a50f2260fdd9eac0ecc","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"        try:"},{"line_number":600,"context_line":"            (cpus, cpu_map, online) \u003d self.get_connection().getCPUMap()"},{"line_number":601,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":602,"context_line":"            msg \u003d (_(\"Error from libvirt when getting online CPUs: %(ex)s\")"},{"line_number":603,"context_line":"                   % {\u0027ex\u0027: ex})"},{"line_number":604,"context_line":"            raise exception.NovaException(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_491c146b","line":601,"updated":"2015-02-16 14:50:37.000000000","message":"still not sure we should catch this exception, maybe we can just let it raise up. Then the user will get the track info.","commit_id":"d1b290a1221c48854185441bbacd629930de737b"},{"author":{"_account_id":14594,"name":"Alexander Schmidt","email":"alexs@linux.vnet.ibm.com","username":"alexs"},"change_message_id":"440db72e534f3d740bad7867e6f5566859727b94","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"        try:"},{"line_number":600,"context_line":"            (cpus, cpu_map, online) \u003d self.get_connection().getCPUMap()"},{"line_number":601,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":602,"context_line":"            msg \u003d (_(\"Error from libvirt when getting online CPUs: %(ex)s\")"},{"line_number":603,"context_line":"                   % {\u0027ex\u0027: ex})"},{"line_number":604,"context_line":"            raise exception.NovaException(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_8a5c151b","line":601,"in_reply_to":"da86d52c_0d8bf51e","updated":"2015-02-17 14:48:03.000000000","message":"Done","commit_id":"d1b290a1221c48854185441bbacd629930de737b"},{"author":{"_account_id":14594,"name":"Alexander Schmidt","email":"alexs@linux.vnet.ibm.com","username":"alexs"},"change_message_id":"162c9b90642eeeab48dd31f70974451d3ded6aae","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"        try:"},{"line_number":600,"context_line":"            (cpus, cpu_map, online) \u003d self.get_connection().getCPUMap()"},{"line_number":601,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":602,"context_line":"            msg \u003d (_(\"Error from libvirt when getting online CPUs: %(ex)s\")"},{"line_number":603,"context_line":"                   % {\u0027ex\u0027: ex})"},{"line_number":604,"context_line":"            raise exception.NovaException(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_7f46e97c","line":601,"in_reply_to":"da86d52c_491c146b","updated":"2015-02-16 16:07:28.000000000","message":"Hi,\n\nso you suggest not to raise a NovaException but instead let the libvirtError propagate to the caller? I can implement this change for the next patchset.","commit_id":"d1b290a1221c48854185441bbacd629930de737b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"66a73394ea986c5c16c675509b47e04bbd65f4ad","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"        try:"},{"line_number":600,"context_line":"            (cpus, cpu_map, online) \u003d self.get_connection().getCPUMap()"},{"line_number":601,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":602,"context_line":"            msg \u003d (_(\"Error from libvirt when getting online CPUs: %(ex)s\")"},{"line_number":603,"context_line":"                   % {\u0027ex\u0027: ex})"},{"line_number":604,"context_line":"            raise exception.NovaException(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_0d8bf51e","line":601,"in_reply_to":"da86d52c_7f46e97c","updated":"2015-02-17 00:07:53.000000000","message":"yes, that is what I\u0027m suggestion.","commit_id":"d1b290a1221c48854185441bbacd629930de737b"}]}
