)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ba2d91dd16fe9eab155e57a20d814b2db0b7d4b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When the vm does not specify a host for live migration,"},{"line_number":10,"context_line":"it will call libvirt\u0027s compareCPU() to compare cpu features,"},{"line_number":11,"context_line":"which is not very useful. For example, when the kernel version"},{"line_number":12,"context_line":"of the host is different, compareCPU() passes the check,"},{"line_number":13,"context_line":"but in fact the cpu features of the host may be different,"},{"line_number":14,"context_line":"When the vm is live migrated to this host, a startup error will occur."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"In order to solve this problem, add hypervisor CPU feature check"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1f621f24_c6c062e4","line":13,"range":{"start_line":11,"start_character":26,"end_line":13,"end_character":58},"updated":"2020-11-13 13:05:42.000000000","message":"the kernel is allowed to change and the cpu features on the host are allowed to be different provided the destination host is a  superset of the source host.","commit_id":"81f451b34ff789e10f1f0dc005b21b658a910c3e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4a275b1f36ecc63e4c43356751475572aab1016e","unresolved":true,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Taking advantage of these newer APIs will allow Nova to make more"},{"line_number":25,"context_line":"well-informed decisions when determining CPU models that are compatible"},{"line_number":26,"context_line":"across different hosts."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: Ied6529e9147a955c4c9afc1f2b31cb2829e58c65"},{"line_number":29,"context_line":"Closes-Bug: #1903822"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"2e4d600b_6c8f6aa9","line":26,"updated":"2020-12-02 16:15:43.000000000","message":"Since you\u0027re literally quoting the last two paragraphs from this spec[1], it\u0027s good practice to indent the quoted text, and link to it :-)\n\n[1] https://opendev.org/openstack/nova-specs/commit/70811da221035044e27","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ba7db96f8b26daf1ce9f686665322dbf5c5d0aaa","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Taking advantage of these newer APIs will allow Nova to make more"},{"line_number":25,"context_line":"well-informed decisions when determining CPU models that are compatible"},{"line_number":26,"context_line":"across different hosts."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: Ied6529e9147a955c4c9afc1f2b31cb2829e58c65"},{"line_number":29,"context_line":"Closes-Bug: #1903822"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5ce639d1_dc0bccf3","line":26,"in_reply_to":"2e4d600b_6c8f6aa9","updated":"2020-12-03 03:03:06.000000000","message":"Done","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"90889208cda57e8a9cf3d61d5b5c8aac5d881ecc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"793956d8_f8ebf7a2","updated":"2021-11-29 02:59:00.000000000","message":"For better review, I will split the code into multiple patches later.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"a6ce712879ad2add396cda59791c780f9e8046ad","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"d6a20393_3147cc05","updated":"2022-03-18 17:13:32.000000000","message":"(Need to ouble-check if I didn\u0027t accidentally mess up the rebase-conflict resolution in libvirt/host.py)\n\nAnd also still need to split this up...","commit_id":"342d462e871389bb927789fa789af1f41b3ff605"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"e67a8616_137f6003","updated":"2022-03-31 13:19:18.000000000","message":"Addressed in PS23:\n\n- [X] Nuke useless alias-testing from fixtures/test_libvirt.py [Stephen]\n\n- [X] Fix various style-nits from libvirt/test_driver.py [Stephen]\n\n- [X] Remove the unrelated addition of \u0027ibs\u0027 feature bit from\n      LibvirtConfigCapsTest() in virt/test_config.py [Stephen]\n\n- [X] Call out why the domCapabilities snippets were added in\n      libvirt_data.py [Stephen]\n\nTODO:\n\n- [ ] Address comments from fixtures/libvirt.py [Stephen]\n\n- [ ] Comb through some of the older comments of Gibi from PS20 and make \n      sure they\u0027re all addressed too.","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"b3d3d222_ce959e71","updated":"2022-03-23 15:26:17.000000000","message":"Looks like there\u0027s a bit of cleanup still needed here. Got a few more comments too","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"9a44abebb45b7d54b7dd7c327e01a1c7f376a4ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"c75a3f29_32d77190","updated":"2022-04-04 16:09:46.000000000","message":"\nAddress some more remarks from Gibi from PS20 and Stephen from PS17:\n\n- [x] Review libvirt capabilities logging: _after_ modifying it in host.py.   Leave this bit as-is.  Just like in Arm\u0027s case, we\u0027re modifying self._caps after we\u0027ve logged it.  [Gibi]\n\n- [X] Fix the wrong NOTE by Chengsheng about \"current guest CPU config\" [Gibi]\n\n- [X] Improve doc-text for compare_hypervisor_cpu() and baseline_hypervisor_cpu() in host.py\n\n- [X] Fix syntax nit of libvirt error codes \"if\" condition in driver.py [Stephen]\n\n- [X] Remove a stale, CPU-APIs related TODO in driver.py\n\n- [X] Tweak the error message in driver.py to say that the CPU comparison is ignored due to the hypervisor\u0027s lack of support [Stephen]\n\n- [X] Remove the needless line breaks\" in driver.py \"\"CPU doesn\u0027t have compatibility\" error message [Gibi]\n","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"cf029453dea5511533c5a80f5600311c840c2299","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"c89d7948_e5f27026","updated":"2022-04-08 08:44:19.000000000","message":"@Kashyap  The code you submitted is not based on my latest revision, you need to merge \u0027Patchset 20\u0027.","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a4e0df4ce2681dd718105df84bd491172bacf2e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"26ad9329_c52d8f22","updated":"2022-04-06 10:06:53.000000000","message":"I still have a bunch of questions. Also I triggered nova-emulation on this patch to see that this change does not break that feature.","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d33203ab47720aa0786ebe8ff105f84c2372358e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"a8e5e30f_b3c3730e","updated":"2022-04-06 10:27:19.000000000","message":"ill try and get back to this next week","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"8a55614829d654e25f09df57de316056eb9782de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"ae9ad7ae_fbf23730","in_reply_to":"b754ed98_068b84d5","updated":"2022-04-08 10:10:06.000000000","message":"Yes ,I won\u0027t mind .","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"fc53158041f991aa863e1fe66611be82f77301f9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"b754ed98_068b84d5","in_reply_to":"c89d7948_e5f27026","updated":"2022-04-08 10:02:45.000000000","message":"\u003e @Kashyap  The code you submitted is not based on my latest revision, you need to merge \u0027Patchset 20\u0027.\n\nHi, yeah, I noticed the accidental rebase butchering :-(  I\u0027m fixing it locally.\n \nAlso, I\u0027m also splitting the patches to make it easier to review.  I\u0027m of course adding: \"Co-Authored-By: Chengsheng \u003cchengsheng@chinatelecom.cn\u003e\" on every patch I\u0027m splitting.  I hope you don\u0027t mind.","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"de2c772903c64c6ee67929637222247444153a4b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"0f9cdd27_92d17a4e","updated":"2022-04-12 16:09:00.000000000","message":"In PS-25: I fixed some of the rebase damage I did in PS21 -- chengsheng, please take a look once more.  Sorry for that noise.  Next up is to split this thing up for real.","commit_id":"b39ee8112e8003baba49eb379e993c19b68fd6bf"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a9a3fb544b94cbc71a01c7616a1597b9080bbc1d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"099e4c00_55dd44ed","updated":"2022-05-06 12:11:03.000000000","message":"I agree with everything gibi said","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"a5800ab4_1d202076","updated":"2022-04-20 16:26:58.000000000","message":"I still have some issues.","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"}],"nova/tests/fixtures/libvirt.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":1979,"context_line":""},{"line_number":1980,"context_line":"    def compareHypervisorCPU(self, emulator, arch,"},{"line_number":1981,"context_line":"                             machinetype, virttype,"},{"line_number":1982,"context_line":"                             xml, flags):"},{"line_number":1983,"context_line":"        return self.compareCPU(xml, flags)"},{"line_number":1984,"context_line":""},{"line_number":1985,"context_line":"    def getCPUStats(self, cpuNum, flag):"}],"source_content_type":"text/x-python","patch_set":22,"id":"6852a663_06701e5c","line":1982,"updated":"2022-03-23 15:26:17.000000000","message":"style nit: Can you put these on their own line(s)?\n\n  def compareHypervisorCPU(\n      self, emulator, ...\n  ):","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":1979,"context_line":""},{"line_number":1980,"context_line":"    def compareHypervisorCPU(self, emulator, arch,"},{"line_number":1981,"context_line":"                             machinetype, virttype,"},{"line_number":1982,"context_line":"                             xml, flags):"},{"line_number":1983,"context_line":"        return self.compareCPU(xml, flags)"},{"line_number":1984,"context_line":""},{"line_number":1985,"context_line":"    def getCPUStats(self, cpuNum, flag):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5657f80e_818f6060","line":1982,"in_reply_to":"6852a663_06701e5c","updated":"2022-03-31 13:19:18.000000000","message":"Done in PS23.","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":1980,"context_line":"    def compareHypervisorCPU(self, emulator, arch,"},{"line_number":1981,"context_line":"                             machinetype, virttype,"},{"line_number":1982,"context_line":"                             xml, flags):"},{"line_number":1983,"context_line":"        return self.compareCPU(xml, flags)"},{"line_number":1984,"context_line":""},{"line_number":1985,"context_line":"    def getCPUStats(self, cpuNum, flag):"},{"line_number":1986,"context_line":"        if cpuNum \u003c 2:"}],"source_content_type":"text/x-python","patch_set":22,"id":"986d461b_14063cc0","line":1983,"updated":"2022-03-23 15:26:17.000000000","message":"A comment explaining why this is good enough (there must be a reason why real libvirt has different APIs, right?) would be helpful","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":true,"context_lines":[{"line_number":1980,"context_line":"    def compareHypervisorCPU(self, emulator, arch,"},{"line_number":1981,"context_line":"                             machinetype, virttype,"},{"line_number":1982,"context_line":"                             xml, flags):"},{"line_number":1983,"context_line":"        return self.compareCPU(xml, flags)"},{"line_number":1984,"context_line":""},{"line_number":1985,"context_line":"    def getCPUStats(self, cpuNum, flag):"},{"line_number":1986,"context_line":"        if cpuNum \u003c 2:"}],"source_content_type":"text/x-python","patch_set":22,"id":"b2166af4_d7a7879d","line":1983,"in_reply_to":"986d461b_14063cc0","updated":"2022-03-31 13:19:18.000000000","message":"I think this was done as a quick shortcut.  As you don\u0027t want to re-implement the whole of CPU comparison/baseline calculation.  But I agree, we (I?) need to come up with definitely come up with more than calling the older APIs.\n\nFWIW, I\u0027ve documented here[1] the reasons for different APIs are documented here: One of the main things that the newer APIs take more parameters into consideration.  E.g.\n\n\n    +-----------+--------------------+-----------------------------+\n    |           | compareCPU()       | compareHypervisorCPU()      |\n    +-----------+--------------------+-----------------------------+\n    |           | XML describing the | XML describing the CPU      |\n    |           | CPU to be compared | to be compared              |\n    |           +--------------------+-----------------------------+\n    |           |                    | path to the QEMU binary     |\n    |           |                    +-----------------------------+\n    |Parameters |                    | the type of virtualization  |\n    |           |                    | (e.g. KVM, QEMU)            |\n    |           |                    +-----------------------------+\n    |           |                    | guest machine type          |\n    |           |                    +-----------------------------+\n    |           |                    | CPU architecture            |\n    +-----------+--------------------+-----------------------------+\n\n\n[1] https://specs.openstack.org/openstack/nova-specs/specs/xena/approved/cpu-selection-with-hypervisor-consideration.html#proposed-change","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d33203ab47720aa0786ebe8ff105f84c2372358e","unresolved":true,"context_lines":[{"line_number":1980,"context_line":"    def compareHypervisorCPU(self, emulator, arch,"},{"line_number":1981,"context_line":"                             machinetype, virttype,"},{"line_number":1982,"context_line":"                             xml, flags):"},{"line_number":1983,"context_line":"        return self.compareCPU(xml, flags)"},{"line_number":1984,"context_line":""},{"line_number":1985,"context_line":"    def getCPUStats(self, cpuNum, flag):"},{"line_number":1986,"context_line":"        if cpuNum \u003c 2:"}],"source_content_type":"text/x-python","patch_set":22,"id":"3849d75a_deb4eb84","line":1983,"in_reply_to":"b2166af4_d7a7879d","updated":"2022-04-06 10:27:19.000000000","message":"you could link to it here as a comment for context.\nor embed the table in a comment.","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":2052,"context_line":""},{"line_number":2053,"context_line":"    def baselineHypervisorCPU(self, emulator, arch,"},{"line_number":2054,"context_line":"                              machinetype, virttype,"},{"line_number":2055,"context_line":"                              cpu, flag):"},{"line_number":2056,"context_line":"        return self.baselineCPU(cpu, flag)"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def secretLookupByUsage(self, usage_type_obj, usage_id):"}],"source_content_type":"text/x-python","patch_set":22,"id":"d82958c9_f70547eb","line":2055,"updated":"2022-03-23 15:26:17.000000000","message":"ditto (separate lines)","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":2052,"context_line":""},{"line_number":2053,"context_line":"    def baselineHypervisorCPU(self, emulator, arch,"},{"line_number":2054,"context_line":"                              machinetype, virttype,"},{"line_number":2055,"context_line":"                              cpu, flag):"},{"line_number":2056,"context_line":"        return self.baselineCPU(cpu, flag)"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def secretLookupByUsage(self, usage_type_obj, usage_id):"}],"source_content_type":"text/x-python","patch_set":22,"id":"ecc0f7f2_b029aa46","line":2055,"in_reply_to":"d82958c9_f70547eb","updated":"2022-03-31 13:19:18.000000000","message":"Done in PS23","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":2053,"context_line":"    def baselineHypervisorCPU(self, emulator, arch,"},{"line_number":2054,"context_line":"                              machinetype, virttype,"},{"line_number":2055,"context_line":"                              cpu, flag):"},{"line_number":2056,"context_line":"        return self.baselineCPU(cpu, flag)"},{"line_number":2057,"context_line":""},{"line_number":2058,"context_line":"    def secretLookupByUsage(self, usage_type_obj, usage_id):"},{"line_number":2059,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":22,"id":"56c354cb_dbfa0c57","line":2056,"updated":"2022-03-23 15:26:17.000000000","message":"ditto (why is this sufficient)","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":1992,"context_line":"    ):"},{"line_number":1993,"context_line":"        tree \u003d etree.fromstring(xml)"},{"line_number":1994,"context_line":"        # NOTE(chengsheng): If the arch is included, when comparing the"},{"line_number":1995,"context_line":"        # CPUs on AMD hosts, disabled CPU features aren\u0027t recognized,"},{"line_number":1996,"context_line":"        # which will cause CPU comparison to fail."},{"line_number":1997,"context_line":"        arch_node \u003d tree.find(\u0027./arch\u0027)"},{"line_number":1998,"context_line":"        if arch_node is not None:"}],"source_content_type":"text/x-python","patch_set":27,"id":"e606acd1_80a66877","line":1995,"range":{"start_line":1995,"start_character":29,"end_line":1995,"end_character":69},"updated":"2022-04-20 16:26:58.000000000","message":"is this a libvirt limitation?","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":2000,"context_line":""},{"line_number":2001,"context_line":"        model_node \u003d tree.find(\u0027./model\u0027)"},{"line_number":2002,"context_line":"        if model_node is not None:"},{"line_number":2003,"context_line":"            # arch_node may not present, therefore query all cpu models."},{"line_number":2004,"context_line":"            if model_node.text not in self.getCPUModelNames(\u0027x86_64\u0027) and \\"},{"line_number":2005,"context_line":"                model_node.text not in self.getCPUModelNames(\u0027ppc64\u0027):"},{"line_number":2006,"context_line":"                raise make_libvirtError("}],"source_content_type":"text/x-python","patch_set":27,"id":"0716a66c_7b029a3f","line":2003,"range":{"start_line":2003,"start_character":14,"end_line":2003,"end_character":39},"updated":"2022-04-20 16:26:58.000000000","message":"hm, if we reach this point then the arch is definitely None, otherwise we would returned early at L1999","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"}],"nova/tests/fixtures/libvirt_data.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":1091,"context_line":"    \u003csev supported\u003d\u0027no\u0027/\u003e"},{"line_number":1092,"context_line":"  \u003c/features\u003e"},{"line_number":1093,"context_line":"\u003c/domainCapabilities\u003e"},{"line_number":1094,"context_line":"\"\"\""},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"DOMCAPABILITIES_ARMV7 \u003d \"\"\""},{"line_number":1097,"context_line":"\u003cdomainCapabilities\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"77cb9d44_75b48df2","line":1094,"updated":"2022-03-23 15:26:17.000000000","message":"Can you call out why you added these in the commit message, please? Something simple like:\n\n  We enhance the libvirt fixture to...because...","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"    \u003csev supported\u003d\u0027no\u0027/\u003e"},{"line_number":1092,"context_line":"  \u003c/features\u003e"},{"line_number":1093,"context_line":"\u003c/domainCapabilities\u003e"},{"line_number":1094,"context_line":"\"\"\""},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"DOMCAPABILITIES_ARMV7 \u003d \"\"\""},{"line_number":1097,"context_line":"\u003cdomainCapabilities\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"16fa58ab_d122d7cf","line":1094,"in_reply_to":"77cb9d44_75b48df2","updated":"2022-03-31 13:19:18.000000000","message":"I\u0027ll do it in PS23.  But I think the reason they were added by Chengsheng is that with the new APIs, the host CPU(s) you pass to them must be obtained from  domainCapabilities.  Since they exist for x86, I think Chengsheng just added them for s390x and PPC64.","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d33203ab47720aa0786ebe8ff105f84c2372358e","unresolved":true,"context_lines":[{"line_number":1631,"context_line":"  \u003ccpu\u003e"},{"line_number":1632,"context_line":"    \u003cmode name\u003d\u0027host-passthrough\u0027 supported\u003d\u0027yes\u0027/\u003e"},{"line_number":1633,"context_line":"    \u003cmode name\u003d\u0027host-model\u0027 supported\u003d\u0027yes\u0027\u003e"},{"line_number":1634,"context_line":"      \u003cmodel fallback\u003d\u0027forbid\u0027\u003eEPYC-IBPB\u003c/model\u003e"},{"line_number":1635,"context_line":"      \u003cvendor\u003eAMD\u003c/vendor\u003e"},{"line_number":1636,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027x2apic\u0027/\u003e"},{"line_number":1637,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027tsc-deadline\u0027/\u003e"},{"line_number":1638,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027hypervisor\u0027/\u003e"},{"line_number":1639,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027tsc_adjust\u0027/\u003e"},{"line_number":1640,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027cmp_legacy\u0027/\u003e"},{"line_number":1641,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027invtsc\u0027/\u003e"},{"line_number":1642,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027virt-ssbd\u0027/\u003e"},{"line_number":1643,"context_line":"      \u003cfeature policy\u003d\u0027disable\u0027 name\u003d\u0027monitor\u0027/\u003e"},{"line_number":1644,"context_line":"    \u003c/mode\u003e"},{"line_number":1645,"context_line":"    \u003cmode name\u003d\u0027custom\u0027 supported\u003d\u0027yes\u0027\u003e"},{"line_number":1646,"context_line":"      \u003cmodel usable\u003d\u0027yes\u0027\u003eqemu64\u003c/model\u003e"}],"source_content_type":"text/x-python","patch_set":24,"id":"4ab97820_d01bd845","side":"PARENT","line":1643,"range":{"start_line":1634,"start_character":5,"end_line":1643,"end_character":48},"updated":"2022-04-06 10:27:19.000000000","message":"im not sure we shoudl do this\nwe added this for sev so cahnging to an intel model like this might have other implciation on test.\n\nin principal it should not matter but unless you expclitly need to update this can we avoid it?\n\ni guess zuul is happy with the change so we most not be depending on the cpu vendor being amd currently","commit_id":"d1b036fdb124d1ef48f5cf024d4677bfe5b481d7"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ab3311cb2601b62ece4a715407443058065f78f0","unresolved":true,"context_lines":[{"line_number":1631,"context_line":"  \u003ccpu\u003e"},{"line_number":1632,"context_line":"    \u003cmode name\u003d\u0027host-passthrough\u0027 supported\u003d\u0027yes\u0027/\u003e"},{"line_number":1633,"context_line":"    \u003cmode name\u003d\u0027host-model\u0027 supported\u003d\u0027yes\u0027\u003e"},{"line_number":1634,"context_line":"      \u003cmodel fallback\u003d\u0027forbid\u0027\u003eEPYC-IBPB\u003c/model\u003e"},{"line_number":1635,"context_line":"      \u003cvendor\u003eAMD\u003c/vendor\u003e"},{"line_number":1636,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027x2apic\u0027/\u003e"},{"line_number":1637,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027tsc-deadline\u0027/\u003e"},{"line_number":1638,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027hypervisor\u0027/\u003e"},{"line_number":1639,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027tsc_adjust\u0027/\u003e"},{"line_number":1640,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027cmp_legacy\u0027/\u003e"},{"line_number":1641,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027invtsc\u0027/\u003e"},{"line_number":1642,"context_line":"      \u003cfeature policy\u003d\u0027require\u0027 name\u003d\u0027virt-ssbd\u0027/\u003e"},{"line_number":1643,"context_line":"      \u003cfeature policy\u003d\u0027disable\u0027 name\u003d\u0027monitor\u0027/\u003e"},{"line_number":1644,"context_line":"    \u003c/mode\u003e"},{"line_number":1645,"context_line":"    \u003cmode name\u003d\u0027custom\u0027 supported\u003d\u0027yes\u0027\u003e"},{"line_number":1646,"context_line":"      \u003cmodel usable\u003d\u0027yes\u0027\u003eqemu64\u003c/model\u003e"}],"source_content_type":"text/x-python","patch_set":24,"id":"d119b070_404c5bf8","side":"PARENT","line":1643,"range":{"start_line":1634,"start_character":5,"end_line":1643,"end_character":48},"in_reply_to":"4ab97820_d01bd845","updated":"2022-04-08 08:40:19.000000000","message":"After using the new API, the cpu feature and model will be replaced with domcapabilities, which will not affect the SEV test, which means that the SEV test does not care about my modification here.","commit_id":"d1b036fdb124d1ef48f5cf024d4677bfe5b481d7"}],"nova/tests/unit/fixtures/test_libvirt.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":368,"context_line":"                         libvirt.VIR_CPU_COMPARE_IDENTICAL)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def test_compareHypervisorCPU_compatible(self):"},{"line_number":371,"context_line":"        self.test_compareCPU_compatible()"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def test_compareHypervisorCPU_incompatible_vendor(self):"},{"line_number":374,"context_line":"        self.test_compareCPU_incompatible_vendor()"}],"source_content_type":"text/x-python","patch_set":17,"id":"2d2a705b_9cc586ef","line":371,"updated":"2021-07-06 16:57:28.000000000","message":"By calling \u0027test_compareCPU_compatible\u0027 you\u0027re still calling \u0027compareCPU\u0027 under the hood, not \u0027compareHypervisorCPU\u0027, so this test is effectively useless. Either remove it or, better, assert that we\u0027re simply passing through everything to the underling \u0027compareCPU\u0027 (you could mock \u0027compareCPU\u0027 and call \u0027compareHypervisorCPU\u0027, assering that the mock was called with the same arguments)","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                         libvirt.VIR_CPU_COMPARE_IDENTICAL)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def test_compareHypervisorCPU_compatible(self):"},{"line_number":371,"context_line":"        self.test_compareCPU_compatible()"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def test_compareHypervisorCPU_incompatible_vendor(self):"},{"line_number":374,"context_line":"        self.test_compareCPU_incompatible_vendor()"}],"source_content_type":"text/x-python","patch_set":17,"id":"d28e4134_2e95bd99","line":371,"in_reply_to":"2d2a705b_9cc586ef","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":380,"context_line":"        self.test_compareCPU_incompatible_model()"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def test_compareHypervisorCPU_compatible_unspecified_model(self):"},{"line_number":383,"context_line":"        self.test_compareCPU_compatible_unspecified_model()"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def test_numa_topology_generation(self):"},{"line_number":386,"context_line":"        topology \u003d \"\"\"\u003ctopology\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"bb2fbb14_b221ecd6","line":383,"updated":"2022-03-23 15:26:17.000000000","message":"This is pretty useless 😄 Don\u0027t bother testing these if they\u0027re simply aliases, or at least create a mock of the aliased method and assert we call that (I\u0027d opt for A)","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":380,"context_line":"        self.test_compareCPU_incompatible_model()"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def test_compareHypervisorCPU_compatible_unspecified_model(self):"},{"line_number":383,"context_line":"        self.test_compareCPU_compatible_unspecified_model()"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def test_numa_topology_generation(self):"},{"line_number":386,"context_line":"        topology \u003d \"\"\"\u003ctopology\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"d344e93c_d8e67f1f","line":383,"in_reply_to":"bb2fbb14_b221ecd6","updated":"2022-03-31 13:19:18.000000000","message":"Yeah, not sure why Chengsheng added them.  Going to nuke them in PS23.  Good catch. :)","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"}],"nova/tests/unit/virt/libvirt/test_config.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":83,"context_line":"              \u003cmodel\u003eOpteron_G3\u003c/model\u003e"},{"line_number":84,"context_line":"              \u003cvendor\u003eAMD\u003c/vendor\u003e"},{"line_number":85,"context_line":"              \u003ctopology sockets\u003d\u00271\u0027 cores\u003d\u00274\u0027 threads\u003d\u00271\u0027/\u003e"},{"line_number":86,"context_line":"              \u003cfeature name\u003d\u0027ibs\u0027 policy\u003d\"require\"/\u003e"},{"line_number":87,"context_line":"              \u003cfeature name\u003d\u0027osvw\u0027 policy\u003d\"require\"/\u003e"},{"line_number":88,"context_line":"            \u003c/cpu\u003e"},{"line_number":89,"context_line":"            \u003ctopology\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"07d8a588_ca18f481","line":86,"updated":"2022-03-23 15:26:17.000000000","message":"Can you call out why you did this in the commit message, please?","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":83,"context_line":"              \u003cmodel\u003eOpteron_G3\u003c/model\u003e"},{"line_number":84,"context_line":"              \u003cvendor\u003eAMD\u003c/vendor\u003e"},{"line_number":85,"context_line":"              \u003ctopology sockets\u003d\u00271\u0027 cores\u003d\u00274\u0027 threads\u003d\u00271\u0027/\u003e"},{"line_number":86,"context_line":"              \u003cfeature name\u003d\u0027ibs\u0027 policy\u003d\"require\"/\u003e"},{"line_number":87,"context_line":"              \u003cfeature name\u003d\u0027osvw\u0027 policy\u003d\"require\"/\u003e"},{"line_number":88,"context_line":"            \u003c/cpu\u003e"},{"line_number":89,"context_line":"            \u003ctopology\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"1b7653b3_935cc6fc","line":86,"in_reply_to":"07d8a588_ca18f481","updated":"2022-03-31 13:19:18.000000000","message":"Good question; I don\u0027t know why Chengsheng added this feature bit.  Looks unrelated to me.  Gonna nuke it in PS23.","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"}],"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":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":7711,"context_line":"            \"\"\""},{"line_number":7712,"context_line":""},{"line_number":7713,"context_line":"        def fake_getDomainCapabilities(emulator, arch,"},{"line_number":7714,"context_line":"                                       machinetype, virttype, flags):"},{"line_number":7715,"context_line":"            return \"\"\""},{"line_number":7716,"context_line":"            \u003cdomainCapabilities\u003e"},{"line_number":7717,"context_line":"              \u003cpath\u003e/usr/libexec/qemu-kvm\u003c/path\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"f19cdb08_38b74624","line":7714,"updated":"2022-03-23 15:26:17.000000000","message":"style nit: can you put arguments on a separate line?","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":7711,"context_line":"            \"\"\""},{"line_number":7712,"context_line":""},{"line_number":7713,"context_line":"        def fake_getDomainCapabilities(emulator, arch,"},{"line_number":7714,"context_line":"                                       machinetype, virttype, flags):"},{"line_number":7715,"context_line":"            return \"\"\""},{"line_number":7716,"context_line":"            \u003cdomainCapabilities\u003e"},{"line_number":7717,"context_line":"              \u003cpath\u003e/usr/libexec/qemu-kvm\u003c/path\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"2e6275cd_812e6e04","line":7714,"in_reply_to":"f19cdb08_38b74624","updated":"2022-03-31 13:19:18.000000000","message":"Fixed in PS23","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":7732,"context_line":""},{"line_number":7733,"context_line":"        def fake_baselineHypervisorCPU(emulator, arch,"},{"line_number":7734,"context_line":"                                       machinetype, virttype,"},{"line_number":7735,"context_line":"                                       cpu, flag):"},{"line_number":7736,"context_line":"            return \"\"\"\u003ccpu mode\u003d\u0027custom\u0027 match\u003d\u0027exact\u0027\u003e"},{"line_number":7737,"context_line":"                        \u003cmodel fallback\u003d\u0027allow\u0027\u003ePenryn\u003c/model\u003e"},{"line_number":7738,"context_line":"                        \u003cvendor\u003eIntel\u003c/vendor\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"daf67dbb_663dfe8b","line":7735,"updated":"2022-03-23 15:26:17.000000000","message":"style nit: can you put arguments on a separate line?","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":7732,"context_line":""},{"line_number":7733,"context_line":"        def fake_baselineHypervisorCPU(emulator, arch,"},{"line_number":7734,"context_line":"                                       machinetype, virttype,"},{"line_number":7735,"context_line":"                                       cpu, flag):"},{"line_number":7736,"context_line":"            return \"\"\"\u003ccpu mode\u003d\u0027custom\u0027 match\u003d\u0027exact\u0027\u003e"},{"line_number":7737,"context_line":"                        \u003cmodel fallback\u003d\u0027allow\u0027\u003ePenryn\u003c/model\u003e"},{"line_number":7738,"context_line":"                        \u003cvendor\u003eIntel\u003c/vendor\u003e"}],"source_content_type":"text/x-python","patch_set":22,"id":"29696f4a_9b21e546","line":7735,"in_reply_to":"daf67dbb_663dfe8b","updated":"2022-03-31 13:19:18.000000000","message":"Fixed in PS23","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a8abc2c52d2c849219ecfdd75c13fdf5fd50566f","unresolved":true,"context_lines":[{"line_number":7796,"context_line":""},{"line_number":7797,"context_line":"        # Make sure the host arch is mocked as x86_64"},{"line_number":7798,"context_line":"        self.create_fake_libvirt_mock("},{"line_number":7799,"context_line":"                getCapabilities\u003dfake_getCapabilities,"},{"line_number":7800,"context_line":"                getDomainCapabilities\u003dfake_getDomainCapabilities,"},{"line_number":7801,"context_line":"                baselineHypervisorCPU\u003dfake_baselineHypervisorCPU,"},{"line_number":7802,"context_line":"                getCPUModelNames\u003dfake_getCPUModelNames,"}],"source_content_type":"text/x-python","patch_set":22,"id":"edd6f9a7_4f79c86d","line":7799,"range":{"start_line":7799,"start_character":12,"end_line":7799,"end_character":16},"updated":"2022-03-23 15:26:17.000000000","message":"style nit: only need to indent once","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":7796,"context_line":""},{"line_number":7797,"context_line":"        # Make sure the host arch is mocked as x86_64"},{"line_number":7798,"context_line":"        self.create_fake_libvirt_mock("},{"line_number":7799,"context_line":"                getCapabilities\u003dfake_getCapabilities,"},{"line_number":7800,"context_line":"                getDomainCapabilities\u003dfake_getDomainCapabilities,"},{"line_number":7801,"context_line":"                baselineHypervisorCPU\u003dfake_baselineHypervisorCPU,"},{"line_number":7802,"context_line":"                getCPUModelNames\u003dfake_getCPUModelNames,"}],"source_content_type":"text/x-python","patch_set":22,"id":"e9a2298c_0bf7e9af","line":7799,"range":{"start_line":7799,"start_character":12,"end_line":7799,"end_character":16},"in_reply_to":"edd6f9a7_4f79c86d","updated":"2022-03-31 13:19:18.000000000","message":"Fixed in PS23","commit_id":"35354cf3dce8b073c4b94c8cf33e5c7fcffbf02e"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"efae11041723e8ebf28f17f5221d41657d602468","unresolved":true,"context_lines":[{"line_number":141,"context_line":"                self._devices \u003d devices"},{"line_number":142,"context_line":"            elif c.tag \u003d\u003d \"cpu\":"},{"line_number":143,"context_line":"                for child in c.getchildren():"},{"line_number":144,"context_line":"                    if child.tag \u003d\u003d \"mode\" \\"},{"line_number":145,"context_line":"                            and child.get(\u0027name\u0027) \u003d\u003d \"host-model\":"},{"line_number":146,"context_line":"                        cpu \u003d LibvirtConfigCPU()"},{"line_number":147,"context_line":"                        # Modify the tag, in order to directly"}],"source_content_type":"text/x-python","patch_set":12,"id":"c839c8cc_26f6f611","line":144,"updated":"2021-01-29 08:50:51.000000000","message":"style nit: we tend to prefer the following wrapping style instead\n\n   if (child.tag \u003d\u003d \"mode\" and \n           child.get(\"name\") \u003d\u003d \"host-model\"):\n       cpu \u003d ...\n\nor\n\n   if (child.tag \u003d\u003d \"mode\" and \n       child.get(\"name\") \u003d\u003d \"host-model\"\n    ):\n       cpu \u003d ...","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"de2c772903c64c6ee67929637222247444153a4b","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                self._devices \u003d devices"},{"line_number":142,"context_line":"            elif c.tag \u003d\u003d \"cpu\":"},{"line_number":143,"context_line":"                for child in c.getchildren():"},{"line_number":144,"context_line":"                    if child.tag \u003d\u003d \"mode\" \\"},{"line_number":145,"context_line":"                            and child.get(\u0027name\u0027) \u003d\u003d \"host-model\":"},{"line_number":146,"context_line":"                        cpu \u003d LibvirtConfigCPU()"},{"line_number":147,"context_line":"                        # Modify the tag, in order to directly"}],"source_content_type":"text/x-python","patch_set":12,"id":"ea476b2b_5d60a0c1","line":144,"in_reply_to":"c839c8cc_26f6f611","updated":"2022-04-12 16:09:00.000000000","message":"Done","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a4e0df4ce2681dd718105df84bd491172bacf2e","unresolved":true,"context_lines":[{"line_number":800,"context_line":"            elif c.tag \u003d\u003d \"feature\":"},{"line_number":801,"context_line":"                f \u003d LibvirtConfigCPUFeature()"},{"line_number":802,"context_line":"                f.parse_dom(c)"},{"line_number":803,"context_line":"                self.add_feature(f)"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"    def format_dom(self):"},{"line_number":806,"context_line":"        cpu \u003d super(LibvirtConfigCPU, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":24,"id":"8d3030d3_9594a6b7","line":803,"updated":"2022-04-06 10:06:53.000000000","message":"So the LibvirtConfigCPUFeature has a policy field and loads the policy form the xml.\n\nAs far as I see the removed check is now done in https://review.opendev.org/c/openstack/nova/+/762330/24/nova/virt/libvirt/driver.py#7954 instead. Is it so?","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"f4a3296ad45724b1aa7e7c3a8f001be9cb88d5d5","unresolved":true,"context_lines":[{"line_number":800,"context_line":"            elif c.tag \u003d\u003d \"feature\":"},{"line_number":801,"context_line":"                f \u003d LibvirtConfigCPUFeature()"},{"line_number":802,"context_line":"                f.parse_dom(c)"},{"line_number":803,"context_line":"                self.add_feature(f)"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"    def format_dom(self):"},{"line_number":806,"context_line":"        cpu \u003d super(LibvirtConfigCPU, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":24,"id":"e0d8b72c_fa41b58f","line":803,"in_reply_to":"8d3030d3_9594a6b7","updated":"2022-04-14 12:37:37.000000000","message":"Old API, don\u0027t care about the disable feature. But the new API is a feature that needs to distinguish between enable and disable. \nThe patch you mentioned above is to instead the original method.","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":false,"context_lines":[{"line_number":800,"context_line":"            elif c.tag \u003d\u003d \"feature\":"},{"line_number":801,"context_line":"                f \u003d LibvirtConfigCPUFeature()"},{"line_number":802,"context_line":"                f.parse_dom(c)"},{"line_number":803,"context_line":"                self.add_feature(f)"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"    def format_dom(self):"},{"line_number":806,"context_line":"        cpu \u003d super(LibvirtConfigCPU, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":24,"id":"69d2c0da_ee0ab514","line":803,"in_reply_to":"e0d8b72c_fa41b58f","updated":"2022-04-20 16:26:58.000000000","message":"Ack","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ba2d91dd16fe9eab155e57a20d814b2db0b7d4b","unresolved":false,"context_lines":[{"line_number":8461,"context_line":"            except Exception:"},{"line_number":8462,"context_line":"                src_cpuflaghash \u003d None"},{"line_number":8463,"context_line":"                dst_cpuflaghash \u003d None"},{"line_number":8464,"context_line":""},{"line_number":8465,"context_line":"            if src_cpuflaghash !\u003d dst_cpuflaghash:"},{"line_number":8466,"context_line":"                msg \u003d _(\"The CPU features of the source host \""},{"line_number":8467,"context_line":"                        \"and the target host are different\")"},{"line_number":8468,"context_line":"                raise exception.MigrationPreCheckError(reason\u003dmsg)"},{"line_number":8469,"context_line":""},{"line_number":8470,"context_line":"        # Compare CPU"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_e6475e76","line":8467,"range":{"start_line":8464,"start_character":0,"end_line":8467,"end_character":60},"updated":"2020-11-13 13:05:42.000000000","message":"this is incorrect. this will break upgrades.\nyou are allowed to migrate form a host with a subset of feature to a host with a superset. this would change that behaivor and prevent live migration to new hosts during an upgrade.","commit_id":"81f451b34ff789e10f1f0dc005b21b658a910c3e"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ec52f53ca89f3e195a7f1c57bf66b2d449cc8e22","unresolved":false,"context_lines":[{"line_number":8461,"context_line":"            except Exception:"},{"line_number":8462,"context_line":"                src_cpuflaghash \u003d None"},{"line_number":8463,"context_line":"                dst_cpuflaghash \u003d None"},{"line_number":8464,"context_line":""},{"line_number":8465,"context_line":"            if src_cpuflaghash !\u003d dst_cpuflaghash:"},{"line_number":8466,"context_line":"                msg \u003d _(\"The CPU features of the source host \""},{"line_number":8467,"context_line":"                        \"and the target host are different\")"},{"line_number":8468,"context_line":"                raise exception.MigrationPreCheckError(reason\u003dmsg)"},{"line_number":8469,"context_line":""},{"line_number":8470,"context_line":"        # Compare CPU"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_5fb1ac46","line":8467,"range":{"start_line":8464,"start_character":0,"end_line":8467,"end_character":60},"in_reply_to":"1f621f24_e6475e76","updated":"2020-11-26 07:58:47.000000000","message":"What you said is right, I will see if I can solve this problem with https://opendev.org/openstack/nova-specs/commit/70811da221035044e27.","commit_id":"81f451b34ff789e10f1f0dc005b21b658a910c3e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4a275b1f36ecc63e4c43356751475572aab1016e","unresolved":true,"context_lines":[{"line_number":4607,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":4608,"context_line":"        try:"},{"line_number":4609,"context_line":"            cpu_xml \u003d cpu.to_xml()"},{"line_number":4610,"context_line":"            # NODE(chengsheng) In the parse_dom() method of LibvirtConfigCPU,"},{"line_number":4611,"context_line":"            # the cpu feature whose feature policy is disable is filtered out."},{"line_number":4612,"context_line":"            # But it is still needed when using compareHypervisorCPU()."},{"line_number":4613,"context_line":"            # Here through the baselineHypervisorCPU () to retrieve it."}],"source_content_type":"text/x-python","patch_set":8,"id":"32da2475_ecfc7ba7","line":4610,"range":{"start_line":4610,"start_character":14,"end_line":4610,"end_character":18},"updated":"2020-12-02 16:15:43.000000000","message":"s/NODE/NOTE\n\nAlso, s/cpu/CPU/\n\n\"Here through the baselineHypervisorCPU ()\" --\u003e \"Here it is using the baselineHypervisor()\"","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ba7db96f8b26daf1ce9f686665322dbf5c5d0aaa","unresolved":false,"context_lines":[{"line_number":4607,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":4608,"context_line":"        try:"},{"line_number":4609,"context_line":"            cpu_xml \u003d cpu.to_xml()"},{"line_number":4610,"context_line":"            # NODE(chengsheng) In the parse_dom() method of LibvirtConfigCPU,"},{"line_number":4611,"context_line":"            # the cpu feature whose feature policy is disable is filtered out."},{"line_number":4612,"context_line":"            # But it is still needed when using compareHypervisorCPU()."},{"line_number":4613,"context_line":"            # Here through the baselineHypervisorCPU () to retrieve it."}],"source_content_type":"text/x-python","patch_set":8,"id":"c999b8ea_904703f0","line":4610,"range":{"start_line":4610,"start_character":14,"end_line":4610,"end_character":18},"in_reply_to":"32da2475_ecfc7ba7","updated":"2020-12-03 03:03:06.000000000","message":"Done","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4a275b1f36ecc63e4c43356751475572aab1016e","unresolved":true,"context_lines":[{"line_number":8850,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":8851,"context_line":"        try:"},{"line_number":8852,"context_line":"            cpu_xml \u003d cpu.to_xml()"},{"line_number":8853,"context_line":"            # NODE(chengsheng) In the parse_dom() method of LibvirtConfigCPU,"},{"line_number":8854,"context_line":"            # the cpu feature whose feature policy is disable is filtered out."},{"line_number":8855,"context_line":"            # But it is still needed when using compareHypervisorCPU()."},{"line_number":8856,"context_line":"            # Here through the baselineHypervisorCPU () to retrieve it."}],"source_content_type":"text/x-python","patch_set":8,"id":"de894b67_fa6f42c0","line":8853,"range":{"start_line":8853,"start_character":14,"end_line":8853,"end_character":18},"updated":"2020-12-02 16:15:43.000000000","message":"Here too, same nit-pick as earlier.","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ba7db96f8b26daf1ce9f686665322dbf5c5d0aaa","unresolved":false,"context_lines":[{"line_number":8850,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":8851,"context_line":"        try:"},{"line_number":8852,"context_line":"            cpu_xml \u003d cpu.to_xml()"},{"line_number":8853,"context_line":"            # NODE(chengsheng) In the parse_dom() method of LibvirtConfigCPU,"},{"line_number":8854,"context_line":"            # the cpu feature whose feature policy is disable is filtered out."},{"line_number":8855,"context_line":"            # But it is still needed when using compareHypervisorCPU()."},{"line_number":8856,"context_line":"            # Here through the baselineHypervisorCPU () to retrieve it."}],"source_content_type":"text/x-python","patch_set":8,"id":"2cae937d_a22ad47b","line":8853,"range":{"start_line":8853,"start_character":14,"end_line":8853,"end_character":18},"in_reply_to":"de894b67_fa6f42c0","updated":"2020-12-03 03:03:06.000000000","message":"Done","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"efae11041723e8ebf28f17f5221d41657d602468","unresolved":true,"context_lines":[{"line_number":4633,"context_line":"            LOG.debug(\"cpu compare xml: %s\", cpu_baseline_xml)"},{"line_number":4634,"context_line":"            ret \u003d self._host.compare_hypervisor_cpu(cpu_baseline_xml)"},{"line_number":4635,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":4636,"context_line":"            if cpu.arch \u003d\u003d fields.Architecture.AARCH64:"},{"line_number":4637,"context_line":"                LOG.debug(\"Host CPU compatibility check does not make \""},{"line_number":4638,"context_line":"                          \"sense on AArch64; skip CPU comparison\")"},{"line_number":4639,"context_line":"                return cpu"}],"source_content_type":"text/x-python","patch_set":12,"id":"b8e31d4b_71be5a42","line":4636,"updated":"2021-01-29 08:50:51.000000000","message":"Can we move this up to the S390 check so that we don\u0027t even try to compare if we know that it does not make sense due to the arch?","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ed9136c5c1457c6b8f0350459636eedc742a829d","unresolved":true,"context_lines":[{"line_number":4633,"context_line":"            LOG.debug(\"cpu compare xml: %s\", cpu_baseline_xml)"},{"line_number":4634,"context_line":"            ret \u003d self._host.compare_hypervisor_cpu(cpu_baseline_xml)"},{"line_number":4635,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":4636,"context_line":"            if cpu.arch \u003d\u003d fields.Architecture.AARCH64:"},{"line_number":4637,"context_line":"                LOG.debug(\"Host CPU compatibility check does not make \""},{"line_number":4638,"context_line":"                          \"sense on AArch64; skip CPU comparison\")"},{"line_number":4639,"context_line":"                return cpu"}],"source_content_type":"text/x-python","patch_set":12,"id":"fb90d543_a22398d5","line":4636,"in_reply_to":"b8e31d4b_71be5a42","updated":"2021-01-29 09:55:03.000000000","message":"The code from other places is quoted here, keeping the same content.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"efae11041723e8ebf28f17f5221d41657d602468","unresolved":true,"context_lines":[{"line_number":11302,"context_line":"        :return: An XML string of the computed CPU, or None on error"},{"line_number":11303,"context_line":"        \"\"\""},{"line_number":11304,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11305,"context_line":"        # TODO(lei-zh): baselineCPU is not supported on all platforms."},{"line_number":11306,"context_line":"        # There is some work going on in the libvirt community to replace the"},{"line_number":11307,"context_line":"        # baseline call. Consider using the new apis when they are ready. See"},{"line_number":11308,"context_line":"        # https://www.redhat.com/archives/libvir-list/2018-May/msg01204.html."}],"source_content_type":"text/x-python","patch_set":12,"id":"a477097f_e8f7cc2d","line":11305,"updated":"2021-01-29 08:50:51.000000000","message":"Is this a TODO we are fixing here?","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"efae11041723e8ebf28f17f5221d41657d602468","unresolved":true,"context_lines":[{"line_number":11307,"context_line":"        # baseline call. Consider using the new apis when they are ready. See"},{"line_number":11308,"context_line":"        # https://www.redhat.com/archives/libvir-list/2018-May/msg01204.html."},{"line_number":11309,"context_line":"        try:"},{"line_number":11310,"context_line":"            # NOTE(chengsheng): Use baselineHypervisorCPU()"},{"line_number":11311,"context_line":"            # to replace the old baselineCPU()"},{"line_number":11312,"context_line":"            caps \u003d self._host.get_capabilities()"},{"line_number":11313,"context_line":"            emulator_bin, arch,\\"}],"source_content_type":"text/x-python","patch_set":12,"id":"1e28eb4f_c698ea1f","line":11310,"updated":"2021-01-29 08:50:51.000000000","message":"this code below is pretty similar to host.baseline_hypervisor_cpu() can we reuse it that here?","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ed9136c5c1457c6b8f0350459636eedc742a829d","unresolved":true,"context_lines":[{"line_number":11307,"context_line":"        # baseline call. Consider using the new apis when they are ready. See"},{"line_number":11308,"context_line":"        # https://www.redhat.com/archives/libvir-list/2018-May/msg01204.html."},{"line_number":11309,"context_line":"        try:"},{"line_number":11310,"context_line":"            # NOTE(chengsheng): Use baselineHypervisorCPU()"},{"line_number":11311,"context_line":"            # to replace the old baselineCPU()"},{"line_number":11312,"context_line":"            caps \u003d self._host.get_capabilities()"},{"line_number":11313,"context_line":"            emulator_bin, arch,\\"}],"source_content_type":"text/x-python","patch_set":12,"id":"c25d3707_e3dd9a2a","line":11310,"in_reply_to":"1e28eb4f_c698ea1f","updated":"2021-01-29 09:55:03.000000000","message":"There are indeed many similarities, but the results of exception handling are different. I did not think of a good way to reuse the code. Do you have any better suggestions for modification?","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":5067,"context_line":"            if flags.issubset(self.cpu_model_flag_mapping.get(model, set([]))):"},{"line_number":5068,"context_line":"                return model"},{"line_number":5069,"context_line":"            cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":5070,"context_line":"            cpu.arch \u003d self._host.get_capabilities().host.cpu.arch"},{"line_number":5071,"context_line":"            cpu.model \u003d model"},{"line_number":5072,"context_line":"            features_xml \u003d self._get_guest_baseline_cpu_features(cpu.to_xml())"},{"line_number":5073,"context_line":"            if features_xml:"}],"source_content_type":"text/x-python","patch_set":17,"id":"480bf053_c03bff3c","side":"PARENT","line":5070,"updated":"2021-07-06 16:57:28.000000000","message":"why are we removing this?","commit_id":"5cf06bf33d8f187d444f812177946e134e4c9932"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":5067,"context_line":"            if flags.issubset(self.cpu_model_flag_mapping.get(model, set([]))):"},{"line_number":5068,"context_line":"                return model"},{"line_number":5069,"context_line":"            cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":5070,"context_line":"            cpu.arch \u003d self._host.get_capabilities().host.cpu.arch"},{"line_number":5071,"context_line":"            cpu.model \u003d model"},{"line_number":5072,"context_line":"            features_xml \u003d self._get_guest_baseline_cpu_features(cpu.to_xml())"},{"line_number":5073,"context_line":"            if features_xml:"}],"source_content_type":"text/x-python","patch_set":17,"id":"aa525aec_aa92c344","side":"PARENT","line":5070,"in_reply_to":"480bf053_c03bff3c","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"5cf06bf33d8f187d444f812177946e134e4c9932"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":5066,"context_line":""},{"line_number":5067,"context_line":"        u \u003d (\"http://libvirt.org/html/libvirt-libvirt-host.html#\""},{"line_number":5068,"context_line":"             \"virCPUCompareResult\")"},{"line_number":5069,"context_line":"        m \u003d _(\"CPU doesn\u0027t have compatibility.\\n\\n%(ret)s\\n\\nRefer to %(u)s\")"},{"line_number":5070,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":5071,"context_line":"        try:"},{"line_number":5072,"context_line":"            cpu_compare \u003d deepcopy(cpu)"}],"source_content_type":"text/x-python","patch_set":17,"id":"2e525d69_43e84bb7","line":5069,"updated":"2021-07-06 16:57:28.000000000","message":"style nit: If you need to wrap things better, use noqa\n\n  msg \u003d _(\n      \"CPU doesn\u0027t have compatibility.\\n\\n%(ret)s\\n\\n\"\n      \"Refer to http://libvirt.org/html/libvirt-libvirt-host.html#virCPUCompareResult\"\n  )  # noqa: E501","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":5070,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":5071,"context_line":"        try:"},{"line_number":5072,"context_line":"            cpu_compare \u003d deepcopy(cpu)"},{"line_number":5073,"context_line":"            cpu_compare.arch \u003d None"},{"line_number":5074,"context_line":"            cpu_xml \u003d cpu_compare.to_xml()"},{"line_number":5075,"context_line":"            LOG.debug(\"cpu compare xml: %s\", cpu_xml)"},{"line_number":5076,"context_line":"            ret \u003d self._host.compare_hypervisor_cpu(cpu_xml)"}],"source_content_type":"text/x-python","patch_set":17,"id":"19f86179_addf5b21","line":5073,"updated":"2021-07-06 16:57:28.000000000","message":"Why are you unsetting this? Can you add a comment?","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a4e0df4ce2681dd718105df84bd491172bacf2e","unresolved":true,"context_lines":[{"line_number":5070,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":5071,"context_line":"        try:"},{"line_number":5072,"context_line":"            cpu_compare \u003d deepcopy(cpu)"},{"line_number":5073,"context_line":"            cpu_compare.arch \u003d None"},{"line_number":5074,"context_line":"            cpu_xml \u003d cpu_compare.to_xml()"},{"line_number":5075,"context_line":"            LOG.debug(\"cpu compare xml: %s\", cpu_xml)"},{"line_number":5076,"context_line":"            ret \u003d self._host.compare_hypervisor_cpu(cpu_xml)"}],"source_content_type":"text/x-python","patch_set":17,"id":"d04adbdf_eae61d81","line":5073,"in_reply_to":"19f86179_addf5b21","updated":"2022-04-06 10:06:53.000000000","message":"Also I feel this is related to the removal of L5295 but I also would like to see a reasoning.\n\nhttps://review.opendev.org/c/openstack/nova/+/762330/24/nova/virt/libvirt/driver.py#9739 has similar code with a comment \n\n\u003e            # NOTE(chengsheng): When using the newer APIs\n\u003e            # (compareHypervisorCPU), \u0027cpu.arch\u0027 may have an effect,\n\u003e            # it is best to set it to None.\n\nbut this does not really explain it.\n\nAlso in older patchset there was more info\nhttps://review.opendev.org/c/openstack/nova/+/762330/20..24/nova/virt/libvirt/driver.py#b11788\n\n\u003e        # NOTE(chengsheng): When using the newer APIs\n\u003e        # (baselineHypervisorCPU or compareHypervisorCPU), The \u0027arch\u0027 is\n\u003e        # not necessary. If the \u0027arch\u0027 is included, some of the disabled\n\u003e        # CPU features will be regarded as enable, which will cause the\n\u003e        # comparison to fail.\n\nThere I asked:\n\n\u003e Is this a libvirt issue or it is something in the nova code that makes the CPU features enabled?\n\nbut I haven\u0027t got answer.","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":5070,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":5071,"context_line":"        try:"},{"line_number":5072,"context_line":"            cpu_compare \u003d deepcopy(cpu)"},{"line_number":5073,"context_line":"            cpu_compare.arch \u003d None"},{"line_number":5074,"context_line":"            cpu_xml \u003d cpu_compare.to_xml()"},{"line_number":5075,"context_line":"            LOG.debug(\"cpu compare xml: %s\", cpu_xml)"},{"line_number":5076,"context_line":"            ret \u003d self._host.compare_hypervisor_cpu(cpu_xml)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7958a7e9_9332c4c4","line":5073,"in_reply_to":"809b1092_4227b361","updated":"2022-04-20 16:26:58.000000000","message":"Can we state that please. If it is documented somewhere in libvirt the lets point to that documentation in the comment.","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"472233e542093788875ec46c2673e3573309a037","unresolved":true,"context_lines":[{"line_number":5070,"context_line":"        # unknown character exists in xml, then libvirt complains"},{"line_number":5071,"context_line":"        try:"},{"line_number":5072,"context_line":"            cpu_compare \u003d deepcopy(cpu)"},{"line_number":5073,"context_line":"            cpu_compare.arch \u003d None"},{"line_number":5074,"context_line":"            cpu_xml \u003d cpu_compare.to_xml()"},{"line_number":5075,"context_line":"            LOG.debug(\"cpu compare xml: %s\", cpu_xml)"},{"line_number":5076,"context_line":"            ret \u003d self._host.compare_hypervisor_cpu(cpu_xml)"}],"source_content_type":"text/x-python","patch_set":17,"id":"809b1092_4227b361","line":5073,"in_reply_to":"d04adbdf_eae61d81","updated":"2022-04-08 10:18:30.000000000","message":"This is a libvirt issue.","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":5071,"context_line":"        try:"},{"line_number":5072,"context_line":"            cpu_compare \u003d deepcopy(cpu)"},{"line_number":5073,"context_line":"            cpu_compare.arch \u003d None"},{"line_number":5074,"context_line":"            cpu_xml \u003d cpu_compare.to_xml()"},{"line_number":5075,"context_line":"            LOG.debug(\"cpu compare xml: %s\", cpu_xml)"},{"line_number":5076,"context_line":"            ret \u003d self._host.compare_hypervisor_cpu(cpu_xml)"},{"line_number":5077,"context_line":"        except libvirt.libvirtError as e:"}],"source_content_type":"text/x-python","patch_set":17,"id":"01349a1e_e1b84394","line":5074,"updated":"2021-07-06 16:57:28.000000000","message":"This code can happen outside of the try-except block. Only the call to \u0027self._host.compare_hypervisor_cpu\u0027 needs to happen inside","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":5077,"context_line":"        except libvirt.libvirtError as e:"},{"line_number":5078,"context_line":"            error_code \u003d e.get_error_code()"},{"line_number":5079,"context_line":"            if error_code in (libvirt.VIR_ERR_NO_SUPPORT,"},{"line_number":5080,"context_line":"                              libvirt.VIR_ERR_OPERATION_UNSUPPORTED):"},{"line_number":5081,"context_line":"                LOG.debug(\"URI %(uri)s does not support cpu comparison. \""},{"line_number":5082,"context_line":"                          \"It will be proceeded though. Error: %(error)s\","},{"line_number":5083,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":17,"id":"cd5b4632_ba716db2","line":5080,"updated":"2021-07-06 16:57:28.000000000","message":"style nit:\n\n  if error_code in (\n      libvirt.VIR_ERR_NO_SUPPORT,\n      libvirt.VIR_ERR_OPERATION_UNSUPPORTED,\n  ):","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":5080,"context_line":"                              libvirt.VIR_ERR_OPERATION_UNSUPPORTED):"},{"line_number":5081,"context_line":"                LOG.debug(\"URI %(uri)s does not support cpu comparison. \""},{"line_number":5082,"context_line":"                          \"It will be proceeded though. Error: %(error)s\","},{"line_number":5083,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"},{"line_number":5084,"context_line":"                return cpu"},{"line_number":5085,"context_line":"            else:"},{"line_number":5086,"context_line":"                LOG.error(m, {\u0027ret\u0027: e, \u0027u\u0027: u})"}],"source_content_type":"text/x-python","patch_set":17,"id":"450f8b3f_75a9e3b6","line":5083,"updated":"2021-07-06 16:57:28.000000000","message":"style nit:\n\n  LOG.debug(\n      \"URI %(uri)s does not support CPU comparison. Ignoring. \"\n      \"Error: %(error)s\",\n      {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})\n\nAlso, a comment about why this isn\u0027t supported would be helpful. Is is platform specific? If so, you should state this.","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":5082,"context_line":"                          \"It will be proceeded though. Error: %(error)s\","},{"line_number":5083,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"},{"line_number":5084,"context_line":"                return cpu"},{"line_number":5085,"context_line":"            else:"},{"line_number":5086,"context_line":"                LOG.error(m, {\u0027ret\u0027: e, \u0027u\u0027: u})"},{"line_number":5087,"context_line":"                raise exception.InvalidCPUInfo("},{"line_number":5088,"context_line":"                    reason\u003dm % {\u0027ret\u0027: e, \u0027u\u0027: u})"}],"source_content_type":"text/x-python","patch_set":17,"id":"ecff8e96_15bd8c3f","line":5085,"updated":"2021-07-06 16:57:28.000000000","message":"nit: don\u0027t need the else since you\u0027ll have returned above","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":7612,"context_line":"        topology[\u0027threads\u0027] \u003d caps.host.cpu.threads"},{"line_number":7613,"context_line":"        cpu_info[\u0027topology\u0027] \u003d topology"},{"line_number":7614,"context_line":""},{"line_number":7615,"context_line":"        features \u003d set()"},{"line_number":7616,"context_line":"        disabled_features \u003d set()"},{"line_number":7617,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":7618,"context_line":"            if f.policy \u003d\u003d \"require\":"}],"source_content_type":"text/x-python","patch_set":17,"id":"a6f71e7d_3f40286f","line":7615,"range":{"start_line":7615,"start_character":8,"end_line":7615,"end_character":16},"updated":"2021-07-06 16:57:28.000000000","message":"can you rename this \u0027enabled_features\u0027?","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":7612,"context_line":"        topology[\u0027threads\u0027] \u003d caps.host.cpu.threads"},{"line_number":7613,"context_line":"        cpu_info[\u0027topology\u0027] \u003d topology"},{"line_number":7614,"context_line":""},{"line_number":7615,"context_line":"        features \u003d set()"},{"line_number":7616,"context_line":"        disabled_features \u003d set()"},{"line_number":7617,"context_line":"        for f in caps.host.cpu.features:"},{"line_number":7618,"context_line":"            if f.policy \u003d\u003d \"require\":"}],"source_content_type":"text/x-python","patch_set":17,"id":"14507053_091042af","line":7615,"range":{"start_line":7615,"start_character":8,"end_line":7615,"end_character":16},"in_reply_to":"a6f71e7d_3f40286f","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":9396,"context_line":""},{"line_number":9397,"context_line":"        if ret \u003c\u003d 0:"},{"line_number":9398,"context_line":"            LOG.error(m, {\u0027ret\u0027: ret, \u0027u\u0027: u})"},{"line_number":9399,"context_line":"            raise exception.InvalidCPUInfo(reason\u003dm % {\u0027ret\u0027: ret, \u0027u\u0027: u})"},{"line_number":9400,"context_line":""},{"line_number":9401,"context_line":"    def _create_shared_storage_test_file(self, instance):"},{"line_number":9402,"context_line":"        \"\"\"Makes tmpfile under CONF.instances_path.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbfe4ae_86f300fd","line":9399,"updated":"2021-07-06 16:57:28.000000000","message":"This code is basically identical to the above. Can we break it out into a common function and de-duplicate it, ideally in a parent patch","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":9396,"context_line":""},{"line_number":9397,"context_line":"        if ret \u003c\u003d 0:"},{"line_number":9398,"context_line":"            LOG.error(m, {\u0027ret\u0027: ret, \u0027u\u0027: u})"},{"line_number":9399,"context_line":"            raise exception.InvalidCPUInfo(reason\u003dm % {\u0027ret\u0027: ret, \u0027u\u0027: u})"},{"line_number":9400,"context_line":""},{"line_number":9401,"context_line":"    def _create_shared_storage_test_file(self, instance):"},{"line_number":9402,"context_line":"        \"\"\"Makes tmpfile under CONF.instances_path.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"ad9c71e7_53a33913","line":9399,"in_reply_to":"dfbfe4ae_86f300fd","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":11758,"context_line":"        def _resolve_features(cpu):"},{"line_number":11759,"context_line":"            # NOTE(chengsheng): When using the newer APIs"},{"line_number":11760,"context_line":"            # (baselineHypervisorCPU), \u0027cpu.arch\u0027 may have an effect,"},{"line_number":11761,"context_line":"            # it is best to set it to None."},{"line_number":11762,"context_line":"            cpu_baseline \u003d deepcopy(cpu)"},{"line_number":11763,"context_line":"            cpu_baseline.arch \u003d None"},{"line_number":11764,"context_line":"            xml_str \u003d cpu_baseline.to_xml()"}],"source_content_type":"text/x-python","patch_set":17,"id":"d7f47891_be98ce90","line":11761,"updated":"2021-07-06 16:57:28.000000000","message":"Oh, this is the comment I\u0027m looking for above, but it\u0027s very small. What kind of effect? Are there docs you can link to?","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":11758,"context_line":"        def _resolve_features(cpu):"},{"line_number":11759,"context_line":"            # NOTE(chengsheng): When using the newer APIs"},{"line_number":11760,"context_line":"            # (baselineHypervisorCPU), \u0027cpu.arch\u0027 may have an effect,"},{"line_number":11761,"context_line":"            # it is best to set it to None."},{"line_number":11762,"context_line":"            cpu_baseline \u003d deepcopy(cpu)"},{"line_number":11763,"context_line":"            cpu_baseline.arch \u003d None"},{"line_number":11764,"context_line":"            xml_str \u003d cpu_baseline.to_xml()"}],"source_content_type":"text/x-python","patch_set":17,"id":"cb0d446e_c5ee8097","line":11761,"in_reply_to":"d7f47891_be98ce90","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":11801,"context_line":"        the given host CPU."},{"line_number":11802,"context_line":""},{"line_number":11803,"context_line":"        :param xml_str: XML description of host CPU"},{"line_number":11804,"context_line":"        :return: An XML string of the computed CPU, or None on error"},{"line_number":11805,"context_line":"        \"\"\""},{"line_number":11806,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11807,"context_line":"        cpu_baseline_xml \u003d self._host.baseline_hypervisor_cpu(xml_str)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff9fcfb2_2eb2cffb","line":11804,"updated":"2021-07-06 16:57:28.000000000","message":"This says we\u0027ll return None on error, but you\u0027re returning None if the requested value matches what libvirt returned. Does this docstring need updating?","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":11801,"context_line":"        the given host CPU."},{"line_number":11802,"context_line":""},{"line_number":11803,"context_line":"        :param xml_str: XML description of host CPU"},{"line_number":11804,"context_line":"        :return: An XML string of the computed CPU, or None on error"},{"line_number":11805,"context_line":"        \"\"\""},{"line_number":11806,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11807,"context_line":"        cpu_baseline_xml \u003d self._host.baseline_hypervisor_cpu(xml_str)"}],"source_content_type":"text/x-python","patch_set":17,"id":"69f3ee04_0d45e7cf","line":11804,"in_reply_to":"ff9fcfb2_2eb2cffb","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":11806,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11807,"context_line":"        cpu_baseline_xml \u003d self._host.baseline_hypervisor_cpu(xml_str)"},{"line_number":11808,"context_line":"        if cpu_baseline_xml \u003d\u003d xml_str:"},{"line_number":11809,"context_line":"            return None"},{"line_number":11810,"context_line":"        else:"},{"line_number":11811,"context_line":"            return cpu_baseline_xml"}],"source_content_type":"text/x-python","patch_set":17,"id":"7c333eeb_e7e9b68a","line":11809,"updated":"2021-07-06 16:57:28.000000000","message":"Why do we return None here?","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":11806,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11807,"context_line":"        cpu_baseline_xml \u003d self._host.baseline_hypervisor_cpu(xml_str)"},{"line_number":11808,"context_line":"        if cpu_baseline_xml \u003d\u003d xml_str:"},{"line_number":11809,"context_line":"            return None"},{"line_number":11810,"context_line":"        else:"},{"line_number":11811,"context_line":"            return cpu_baseline_xml"}],"source_content_type":"text/x-python","patch_set":17,"id":"74c2c337_017182e1","line":11809,"in_reply_to":"7c333eeb_e7e9b68a","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":true,"context_lines":[{"line_number":11755,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11756,"context_line":"        return self._host.baseline_hypervisor_cpu(xml_str)"},{"line_number":11757,"context_line":""},{"line_number":11758,"context_line":"    def _compare_hypervisor_cpu(self, cpu, return_value\u003dNone):"},{"line_number":11759,"context_line":"        \"\"\"The current guest CPU config libvirt APIs that Nova uses,"},{"line_number":11760,"context_line":"        compareCPU() and baselineCPU(), are \"not very useful\". because"},{"line_number":11761,"context_line":"        they don\u0027t consider the capabilities of the \"host hypervisor\""}],"source_content_type":"text/x-python","patch_set":20,"id":"659f24d4_ba5f0edd","line":11758,"range":{"start_line":11758,"start_character":43,"end_line":11758,"end_character":60},"updated":"2021-10-12 14:22:13.000000000","message":"This is a very strange structure. This function either returns the value passed in or raise an exception.\n\nCan we simply return None (i.e. not having anything to return) or raise an exception. And then the caller can simply \n\n  ...\n  _compare_hypervisor_cpu(cpu)\n  return \u003cwhathever it is today passed as return_value\u003e","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"90889208cda57e8a9cf3d61d5b5c8aac5d881ecc","unresolved":true,"context_lines":[{"line_number":11755,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11756,"context_line":"        return self._host.baseline_hypervisor_cpu(xml_str)"},{"line_number":11757,"context_line":""},{"line_number":11758,"context_line":"    def _compare_hypervisor_cpu(self, cpu, return_value\u003dNone):"},{"line_number":11759,"context_line":"        \"\"\"The current guest CPU config libvirt APIs that Nova uses,"},{"line_number":11760,"context_line":"        compareCPU() and baselineCPU(), are \"not very useful\". because"},{"line_number":11761,"context_line":"        they don\u0027t consider the capabilities of the \"host hypervisor\""}],"source_content_type":"text/x-python","patch_set":20,"id":"b1927424_7cf02a08","line":11758,"range":{"start_line":11758,"start_character":43,"end_line":11758,"end_character":60},"in_reply_to":"659f24d4_ba5f0edd","updated":"2021-11-29 02:59:00.000000000","message":"This is to avoid duplication of code, different calls return different results.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a9a3fb544b94cbc71a01c7616a1597b9080bbc1d","unresolved":true,"context_lines":[{"line_number":11755,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11756,"context_line":"        return self._host.baseline_hypervisor_cpu(xml_str)"},{"line_number":11757,"context_line":""},{"line_number":11758,"context_line":"    def _compare_hypervisor_cpu(self, cpu, return_value\u003dNone):"},{"line_number":11759,"context_line":"        \"\"\"The current guest CPU config libvirt APIs that Nova uses,"},{"line_number":11760,"context_line":"        compareCPU() and baselineCPU(), are \"not very useful\". because"},{"line_number":11761,"context_line":"        they don\u0027t consider the capabilities of the \"host hypervisor\""}],"source_content_type":"text/x-python","patch_set":20,"id":"7af143f7_52d71704","line":11758,"range":{"start_line":11758,"start_character":43,"end_line":11758,"end_character":60},"in_reply_to":"7b8da9d7_0eddef1b","updated":"2022-05-06 12:11:03.000000000","message":"+1, this is really weird. gibi\u0027s suggestion will avoid this oddity","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":11755,"context_line":"        LOG.debug(\"Libvirt baseline CPU %s\", xml_str)"},{"line_number":11756,"context_line":"        return self._host.baseline_hypervisor_cpu(xml_str)"},{"line_number":11757,"context_line":""},{"line_number":11758,"context_line":"    def _compare_hypervisor_cpu(self, cpu, return_value\u003dNone):"},{"line_number":11759,"context_line":"        \"\"\"The current guest CPU config libvirt APIs that Nova uses,"},{"line_number":11760,"context_line":"        compareCPU() and baselineCPU(), are \"not very useful\". because"},{"line_number":11761,"context_line":"        they don\u0027t consider the capabilities of the \"host hypervisor\""}],"source_content_type":"text/x-python","patch_set":20,"id":"7b8da9d7_0eddef1b","line":11758,"range":{"start_line":11758,"start_character":43,"end_line":11758,"end_character":60},"in_reply_to":"b1927424_7cf02a08","updated":"2022-04-20 16:26:58.000000000","message":"See my comment on L5281 how to remove this complication","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":true,"context_lines":[{"line_number":11756,"context_line":"        return self._host.baseline_hypervisor_cpu(xml_str)"},{"line_number":11757,"context_line":""},{"line_number":11758,"context_line":"    def _compare_hypervisor_cpu(self, cpu, return_value\u003dNone):"},{"line_number":11759,"context_line":"        \"\"\"The current guest CPU config libvirt APIs that Nova uses,"},{"line_number":11760,"context_line":"        compareCPU() and baselineCPU(), are \"not very useful\". because"},{"line_number":11761,"context_line":"        they don\u0027t consider the capabilities of the \"host hypervisor\""},{"line_number":11762,"context_line":"        (KVM, QEMU and details libvirt knows about the host)."},{"line_number":11763,"context_line":"        More concretely, with the existing APIs, compareCPU() and"},{"line_number":11764,"context_line":"        baselineCPU(), there is no way to ask if a given CPU model plus"},{"line_number":11765,"context_line":"        CPU flags combination is supported by KVM and a specific QEMU"},{"line_number":11766,"context_line":"        binary on the host."},{"line_number":11767,"context_line":""},{"line_number":11768,"context_line":"        The newer APIs are more \"hypervisor-literate\" compared to the"},{"line_number":11769,"context_line":"        existing libvirt APIs that Nova uses.  As in, the new APIs take"},{"line_number":11770,"context_line":"        into account what the \"host hypervisor\" (meaning: KVM, QEMU and"},{"line_number":11771,"context_line":"        what libvirt knows about the host) is capable of."},{"line_number":11772,"context_line":"        Taking advantage of these newer APIs will allow Nova to make"},{"line_number":11773,"context_line":"        more well-informed decisions when determining CPU models that"},{"line_number":11774,"context_line":"        are compatible across different hosts."},{"line_number":11775,"context_line":""},{"line_number":11776,"context_line":"        Details in:"},{"line_number":11777,"context_line":"          https://opendev.org/openstack/nova-specs/commit/70811da221035044e27"}],"source_content_type":"text/x-python","patch_set":20,"id":"edeb3fd0_e415d781","line":11774,"range":{"start_line":11759,"start_character":8,"end_line":11774,"end_character":46},"updated":"2021-10-12 14:22:13.000000000","message":"This suggests that we still have compareCPU and baselineCPU. But you actually changing that. Please phrase this function doc that focus on what and why this function does, not what was in the past it replaced.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"de2c772903c64c6ee67929637222247444153a4b","unresolved":false,"context_lines":[{"line_number":11756,"context_line":"        return self._host.baseline_hypervisor_cpu(xml_str)"},{"line_number":11757,"context_line":""},{"line_number":11758,"context_line":"    def _compare_hypervisor_cpu(self, cpu, return_value\u003dNone):"},{"line_number":11759,"context_line":"        \"\"\"The current guest CPU config libvirt APIs that Nova uses,"},{"line_number":11760,"context_line":"        compareCPU() and baselineCPU(), are \"not very useful\". because"},{"line_number":11761,"context_line":"        they don\u0027t consider the capabilities of the \"host hypervisor\""},{"line_number":11762,"context_line":"        (KVM, QEMU and details libvirt knows about the host)."},{"line_number":11763,"context_line":"        More concretely, with the existing APIs, compareCPU() and"},{"line_number":11764,"context_line":"        baselineCPU(), there is no way to ask if a given CPU model plus"},{"line_number":11765,"context_line":"        CPU flags combination is supported by KVM and a specific QEMU"},{"line_number":11766,"context_line":"        binary on the host."},{"line_number":11767,"context_line":""},{"line_number":11768,"context_line":"        The newer APIs are more \"hypervisor-literate\" compared to the"},{"line_number":11769,"context_line":"        existing libvirt APIs that Nova uses.  As in, the new APIs take"},{"line_number":11770,"context_line":"        into account what the \"host hypervisor\" (meaning: KVM, QEMU and"},{"line_number":11771,"context_line":"        what libvirt knows about the host) is capable of."},{"line_number":11772,"context_line":"        Taking advantage of these newer APIs will allow Nova to make"},{"line_number":11773,"context_line":"        more well-informed decisions when determining CPU models that"},{"line_number":11774,"context_line":"        are compatible across different hosts."},{"line_number":11775,"context_line":""},{"line_number":11776,"context_line":"        Details in:"},{"line_number":11777,"context_line":"          https://opendev.org/openstack/nova-specs/commit/70811da221035044e27"}],"source_content_type":"text/x-python","patch_set":20,"id":"b42a46ca_a32d68fc","line":11774,"range":{"start_line":11759,"start_character":8,"end_line":11774,"end_character":46},"in_reply_to":"edeb3fd0_e415d781","updated":"2022-04-12 16:09:00.000000000","message":"Done","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":true,"context_lines":[{"line_number":11778,"context_line":"          https://bugs.launchpad.net/nova/+bug/1903822"},{"line_number":11779,"context_line":"        \"\"\""},{"line_number":11780,"context_line":"        msg \u003d _("},{"line_number":11781,"context_line":"            \"CPU doesn\u0027t have compatibility.\\n\\n%(ret)s\\n\\n\""},{"line_number":11782,"context_line":"            \"Refer to http://libvirt.org/html/libvirt-libvirt-host.html#virCPUCompareResult\"    # noqa:E501"},{"line_number":11783,"context_line":"        )"},{"line_number":11784,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"62b11cb4_fcabf437","line":11781,"updated":"2021-10-12 14:22:13.000000000","message":"Do we really need extensive line breaks in the log message?","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":true,"context_lines":[{"line_number":11779,"context_line":"        \"\"\""},{"line_number":11780,"context_line":"        msg \u003d _("},{"line_number":11781,"context_line":"            \"CPU doesn\u0027t have compatibility.\\n\\n%(ret)s\\n\\n\""},{"line_number":11782,"context_line":"            \"Refer to http://libvirt.org/html/libvirt-libvirt-host.html#virCPUCompareResult\"    # noqa:E501"},{"line_number":11783,"context_line":"        )"},{"line_number":11784,"context_line":""},{"line_number":11785,"context_line":"        cpu_compare \u003d deepcopy(cpu)"}],"source_content_type":"text/x-python","patch_set":20,"id":"8e64cc51_1e723aa6","line":11782,"range":{"start_line":11782,"start_character":0,"end_line":11782,"end_character":107},"updated":"2021-10-12 14:22:13.000000000","message":"You can split the message to multiple lines. The python lexer will automatically merge (stringliteral stringliteral ...) structures to a single string. So the actual message will not have extra line breaks due to the splitting.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"90889208cda57e8a9cf3d61d5b5c8aac5d881ecc","unresolved":true,"context_lines":[{"line_number":11779,"context_line":"        \"\"\""},{"line_number":11780,"context_line":"        msg \u003d _("},{"line_number":11781,"context_line":"            \"CPU doesn\u0027t have compatibility.\\n\\n%(ret)s\\n\\n\""},{"line_number":11782,"context_line":"            \"Refer to http://libvirt.org/html/libvirt-libvirt-host.html#virCPUCompareResult\"    # noqa:E501"},{"line_number":11783,"context_line":"        )"},{"line_number":11784,"context_line":""},{"line_number":11785,"context_line":"        cpu_compare \u003d deepcopy(cpu)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3c5bc201_a0aaa5cb","line":11782,"range":{"start_line":11782,"start_character":0,"end_line":11782,"end_character":107},"in_reply_to":"8e64cc51_1e723aa6","updated":"2021-11-29 02:59:00.000000000","message":"This is the original code, just optimized as suggested by another reviewer.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":true,"context_lines":[{"line_number":11785,"context_line":"        cpu_compare \u003d deepcopy(cpu)"},{"line_number":11786,"context_line":"        # NOTE(chengsheng): When using the newer APIs"},{"line_number":11787,"context_line":"        # (baselineHypervisorCPU or compareHypervisorCPU), The \u0027arch\u0027 is"},{"line_number":11788,"context_line":"        # not necessary. If the \u0027arch\u0027 is included, some of the disabled"},{"line_number":11789,"context_line":"        # CPU features will be regarded as enable, which will cause the"},{"line_number":11790,"context_line":"        # comparison to fail."},{"line_number":11791,"context_line":"        cpu_compare.arch \u003d None"},{"line_number":11792,"context_line":"        cpu_xml \u003d cpu_compare.to_xml()"},{"line_number":11793,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"cdeee7fe_57017592","line":11790,"range":{"start_line":11788,"start_character":25,"end_line":11790,"end_character":29},"updated":"2021-10-12 14:22:13.000000000","message":"Is this a libvirt issue or it is something in the nova code that makes the CPU features enabled?","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":true,"context_lines":[{"line_number":11798,"context_line":"            if error_code in (libvirt.VIR_ERR_NO_SUPPORT,"},{"line_number":11799,"context_line":"                              libvirt.VIR_ERR_OPERATION_UNSUPPORTED):"},{"line_number":11800,"context_line":"                LOG.debug(\"URI %(uri)s does not support cpu comparison. \""},{"line_number":11801,"context_line":"                          \"It will be proceeded though. Error: %(error)s\","},{"line_number":11802,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"},{"line_number":11803,"context_line":"                return return_value"},{"line_number":11804,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"74187560_780b52e4","line":11801,"range":{"start_line":11801,"start_character":27,"end_line":11801,"end_character":55},"updated":"2021-10-12 14:22:13.000000000","message":"through what?","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"90889208cda57e8a9cf3d61d5b5c8aac5d881ecc","unresolved":true,"context_lines":[{"line_number":11798,"context_line":"            if error_code in (libvirt.VIR_ERR_NO_SUPPORT,"},{"line_number":11799,"context_line":"                              libvirt.VIR_ERR_OPERATION_UNSUPPORTED):"},{"line_number":11800,"context_line":"                LOG.debug(\"URI %(uri)s does not support cpu comparison. \""},{"line_number":11801,"context_line":"                          \"It will be proceeded though. Error: %(error)s\","},{"line_number":11802,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"},{"line_number":11803,"context_line":"                return return_value"},{"line_number":11804,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"b58302d7_4afb427f","line":11801,"range":{"start_line":11801,"start_character":27,"end_line":11801,"end_character":55},"in_reply_to":"74187560_780b52e4","updated":"2021-11-29 02:59:00.000000000","message":"This is the original code.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":true,"context_lines":[{"line_number":11802,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"},{"line_number":11803,"context_line":"                return return_value"},{"line_number":11804,"context_line":"            else:"},{"line_number":11805,"context_line":"                LOG.error(msg, {\u0027ret\u0027: e})"},{"line_number":11806,"context_line":"                raise exception.InvalidCPUInfo("},{"line_number":11807,"context_line":"                    reason\u003dmsg % {\u0027ret\u0027: e})"},{"line_number":11808,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"71fcbfac_b1fb21ab","line":11805,"range":{"start_line":11805,"start_character":31,"end_line":11805,"end_character":41},"updated":"2021-10-12 14:22:13.000000000","message":"why we need to wrap the error in a dict?","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a9a3fb544b94cbc71a01c7616a1597b9080bbc1d","unresolved":true,"context_lines":[{"line_number":11802,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"},{"line_number":11803,"context_line":"                return return_value"},{"line_number":11804,"context_line":"            else:"},{"line_number":11805,"context_line":"                LOG.error(msg, {\u0027ret\u0027: e})"},{"line_number":11806,"context_line":"                raise exception.InvalidCPUInfo("},{"line_number":11807,"context_line":"                    reason\u003dmsg % {\u0027ret\u0027: e})"},{"line_number":11808,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"d1c0e835_15a4e615","line":11805,"range":{"start_line":11805,"start_character":31,"end_line":11805,"end_character":41},"in_reply_to":"31b8b571_2a26e7e8","updated":"2022-05-06 12:11:03.000000000","message":"+1","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"90889208cda57e8a9cf3d61d5b5c8aac5d881ecc","unresolved":true,"context_lines":[{"line_number":11802,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"},{"line_number":11803,"context_line":"                return return_value"},{"line_number":11804,"context_line":"            else:"},{"line_number":11805,"context_line":"                LOG.error(msg, {\u0027ret\u0027: e})"},{"line_number":11806,"context_line":"                raise exception.InvalidCPUInfo("},{"line_number":11807,"context_line":"                    reason\u003dmsg % {\u0027ret\u0027: e})"},{"line_number":11808,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"dbf455ce_26dc53a8","line":11805,"range":{"start_line":11805,"start_character":31,"end_line":11805,"end_character":41},"in_reply_to":"71fcbfac_b1fb21ab","updated":"2021-11-29 02:59:00.000000000","message":"This is the original code.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":11802,"context_line":"                          {\u0027uri\u0027: self._uri(), \u0027error\u0027: e})"},{"line_number":11803,"context_line":"                return return_value"},{"line_number":11804,"context_line":"            else:"},{"line_number":11805,"context_line":"                LOG.error(msg, {\u0027ret\u0027: e})"},{"line_number":11806,"context_line":"                raise exception.InvalidCPUInfo("},{"line_number":11807,"context_line":"                    reason\u003dmsg % {\u0027ret\u0027: e})"},{"line_number":11808,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"31b8b571_2a26e7e8","line":11805,"range":{"start_line":11805,"start_character":31,"end_line":11805,"end_character":41},"in_reply_to":"dbf455ce_26dc53a8","updated":"2022-04-20 16:26:58.000000000","message":"In the original code the msg had variable substitution but the current code the msg has nothing to substitute. I think this code if ever run will fail with a python exception.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"24727ea507facee466b6f2a637e6d3098385df73","unresolved":true,"context_lines":[{"line_number":12150,"context_line":"            return libvirt_utils.cpu_features_to_traits(host_features)"},{"line_number":12151,"context_line":""},{"line_number":12152,"context_line":"        def _resolve_features(cpu):"},{"line_number":12153,"context_line":"            # NOTE(chengsheng): When using the newer APIs"},{"line_number":12154,"context_line":"            # (baselineHypervisorCPU), \u0027cpu.arch\u0027 may have an effect,"},{"line_number":12155,"context_line":"            # it is best to set it to None."},{"line_number":12156,"context_line":"            cpu_baseline \u003d deepcopy(cpu)"},{"line_number":12157,"context_line":"            cpu_baseline.arch \u003d None"},{"line_number":12158,"context_line":"            xml_str \u003d cpu_baseline.to_xml()"}],"source_content_type":"text/x-python","patch_set":24,"id":"d6ba84a0_87764ce5","line":12155,"range":{"start_line":12153,"start_character":0,"end_line":12155,"end_character":43},"updated":"2022-04-08 12:22:44.000000000","message":"@chengsheng: I don\u0027t get what you mean by \u0027cpu.arch\u0027 may have an effect\".  I _think_  what you might mean is:\n\n\"Nova already knows what arch it is picking for a guest, it doesn\u0027t need to query libvirt again for the host architecture -- this is the reason to set arch\u003dNone.\"\n\nSo  I\u0027m going to rewrite the note to the above effect; if you disagree, please let me know. :)","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"044ffe61d63ce9243b7883c2bb2a33c73480acb5","unresolved":false,"context_lines":[{"line_number":12150,"context_line":"            return libvirt_utils.cpu_features_to_traits(host_features)"},{"line_number":12151,"context_line":""},{"line_number":12152,"context_line":"        def _resolve_features(cpu):"},{"line_number":12153,"context_line":"            # NOTE(chengsheng): When using the newer APIs"},{"line_number":12154,"context_line":"            # (baselineHypervisorCPU), \u0027cpu.arch\u0027 may have an effect,"},{"line_number":12155,"context_line":"            # it is best to set it to None."},{"line_number":12156,"context_line":"            cpu_baseline \u003d deepcopy(cpu)"},{"line_number":12157,"context_line":"            cpu_baseline.arch \u003d None"},{"line_number":12158,"context_line":"            xml_str \u003d cpu_baseline.to_xml()"}],"source_content_type":"text/x-python","patch_set":24,"id":"8796f13f_8e019e00","line":12155,"range":{"start_line":12153,"start_character":0,"end_line":12155,"end_character":43},"in_reply_to":"d6ba84a0_87764ce5","updated":"2022-04-08 12:26:50.000000000","message":"Duh, ignore the above.  You removed it and I accidentally reintroduced it during the rebase.  Gonna remove it.","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":5278,"context_line":"        if not cpu.model:"},{"line_number":5279,"context_line":"            return cpu"},{"line_number":5280,"context_line":""},{"line_number":5281,"context_line":"        return self._compare_hypervisor_cpu(cpu, return_value\u003dcpu)"},{"line_number":5282,"context_line":""},{"line_number":5283,"context_line":"    def _match_cpu_model_by_flags(self, models, flags):"},{"line_number":5284,"context_line":"        for model in models:"}],"source_content_type":"text/x-python","patch_set":27,"id":"492ba8ad_ac6a87f7","line":5281,"updated":"2022-04-20 16:26:58.000000000","message":"I still think this should be written instead:\n\n  # this will raise an exception on incompatibility\n  self.compare_hypervisor_cpu(cpu) \n  return cpu\n\nand drop the passing of the return_value to the _compare_hypervisor_cpu() as it is overly complicated.","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":9693,"context_line":"        if not cpu.model:"},{"line_number":9694,"context_line":"            return"},{"line_number":9695,"context_line":""},{"line_number":9696,"context_line":"        return self._compare_hypervisor_cpu(cpu)"},{"line_number":9697,"context_line":""},{"line_number":9698,"context_line":"    def _create_shared_storage_test_file(self, instance):"},{"line_number":9699,"context_line":"        \"\"\"Makes tmpfile under CONF.instances_path.\"\"\""}],"source_content_type":"text/x-python","patch_set":27,"id":"20c92db5_a2a86c51","line":9696,"updated":"2022-04-20 16:26:58.000000000","message":"ditto","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":12158,"context_line":"            else:"},{"line_number":12159,"context_line":"                LOG.error(msg, {\u0027ret\u0027: e})"},{"line_number":12160,"context_line":"                raise exception.InvalidCPUInfo("},{"line_number":12161,"context_line":"                    reason\u003dmsg % {\u0027ret\u0027: e})"},{"line_number":12162,"context_line":""},{"line_number":12163,"context_line":"        if ret \u003c\u003d 0:"},{"line_number":12164,"context_line":"            LOG.error(msg, {\u0027ret\u0027: ret})"}],"source_content_type":"text/x-python","patch_set":27,"id":"711a7195_3c5dd53e","line":12161,"range":{"start_line":12161,"start_character":27,"end_line":12161,"end_character":43},"updated":"2022-04-20 16:26:58.000000000","message":"again, as there is nothing to substitute in msg, this code will fail with an exception.","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":12161,"context_line":"                    reason\u003dmsg % {\u0027ret\u0027: e})"},{"line_number":12162,"context_line":""},{"line_number":12163,"context_line":"        if ret \u003c\u003d 0:"},{"line_number":12164,"context_line":"            LOG.error(msg, {\u0027ret\u0027: ret})"},{"line_number":12165,"context_line":"            raise exception.InvalidCPUInfo(reason\u003dmsg % {\u0027ret\u0027: ret})"},{"line_number":12166,"context_line":""},{"line_number":12167,"context_line":"        return return_value"}],"source_content_type":"text/x-python","patch_set":27,"id":"c1dacc35_163bb6f5","line":12164,"range":{"start_line":12164,"start_character":22,"end_line":12164,"end_character":39},"updated":"2022-04-20 16:26:58.000000000","message":"ditto","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":12162,"context_line":""},{"line_number":12163,"context_line":"        if ret \u003c\u003d 0:"},{"line_number":12164,"context_line":"            LOG.error(msg, {\u0027ret\u0027: ret})"},{"line_number":12165,"context_line":"            raise exception.InvalidCPUInfo(reason\u003dmsg % {\u0027ret\u0027: ret})"},{"line_number":12166,"context_line":""},{"line_number":12167,"context_line":"        return return_value"}],"source_content_type":"text/x-python","patch_set":27,"id":"cf82a9b6_16d5c67b","line":12165,"range":{"start_line":12165,"start_character":50,"end_line":12165,"end_character":68},"updated":"2022-04-20 16:26:58.000000000","message":"ditto","commit_id":"f418c6a56d034ce19453d54eaf126ba31fc9bcbb"}],"nova/virt/libvirt/host.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"93590436d5615751e7636e2e0e9a97df95f46b2e","unresolved":false,"context_lines":[{"line_number":1305,"context_line":"                        right \u003d right.strip()"},{"line_number":1306,"context_line":"                        if left in [\u0027flags\u0027, \u0027features\u0027] and len(right) \u003e 0:"},{"line_number":1307,"context_line":"                            import hashlib"},{"line_number":1308,"context_line":"                            return hashlib.md5(right).hexdigest()"},{"line_number":1309,"context_line":"                return 0"},{"line_number":1310,"context_line":"        except IOError:"},{"line_number":1311,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_c254e900","line":1308,"updated":"2020-11-11 17:40:37.000000000","message":"pep8: error: Argument 1 to \"md5\" has incompatible type \"str\"; expected \"Union[bytes, bytearray, memoryview, array[Any], mmap]\"","commit_id":"15c35ae7a55c392e4bac56df4cc6c082a020d029"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"99e5d9097ec345e51f17737d4403643a4d943f5a","unresolved":false,"context_lines":[{"line_number":1305,"context_line":"                        value \u003d value.strip()"},{"line_number":1306,"context_line":"                        if key in [\u0027flags\u0027, \u0027features\u0027] and len(value) \u003e 0:"},{"line_number":1307,"context_line":"                            import hashlib"},{"line_number":1308,"context_line":"                            value \u003d \u0027\u0027.join(value.split().sort())"},{"line_number":1309,"context_line":"                            return hashlib.md5(value.encode()).hexdigest()"},{"line_number":1310,"context_line":"                return 0"},{"line_number":1311,"context_line":"        except IOError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_39485a85","line":1308,"updated":"2020-11-13 05:30:02.000000000","message":"pep8: error: Argument 1 to \"join\" of \"str\" has incompatible type \"None\"; expected \"Iterable[str]\"","commit_id":"4b45f24d89416871e1625129e04e477e0bf3cbf1"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"7734884a8faaf9fa0f65f5948875c029adcafc47","unresolved":false,"context_lines":[{"line_number":1305,"context_line":"                        value \u003d value.strip()"},{"line_number":1306,"context_line":"                        if key in [\u0027flags\u0027, \u0027features\u0027] and len(value) \u003e 0:"},{"line_number":1307,"context_line":"                            import hashlib"},{"line_number":1308,"context_line":"                            value \u003d value.split()"},{"line_number":1309,"context_line":"                            value.sort()"},{"line_number":1310,"context_line":"                            value \u003d \u0027\u0027.join(value)"},{"line_number":1311,"context_line":"                            return hashlib.md5(value.encode()).hexdigest()"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_86b78a3a","line":1308,"updated":"2020-11-13 11:41:48.000000000","message":"pep8: error: Incompatible types in assignment (expression has type \"List[str]\", variable has type \"str\")","commit_id":"0f800e43fecb22b900d632383fd1a5c3cd7b7066"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"7734884a8faaf9fa0f65f5948875c029adcafc47","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"                        if key in [\u0027flags\u0027, \u0027features\u0027] and len(value) \u003e 0:"},{"line_number":1307,"context_line":"                            import hashlib"},{"line_number":1308,"context_line":"                            value \u003d value.split()"},{"line_number":1309,"context_line":"                            value.sort()"},{"line_number":1310,"context_line":"                            value \u003d \u0027\u0027.join(value)"},{"line_number":1311,"context_line":"                            return hashlib.md5(value.encode()).hexdigest()"},{"line_number":1312,"context_line":"                return 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_66b22e4b","line":1309,"updated":"2020-11-13 11:41:48.000000000","message":"pep8: error: \"str\" has no attribute \"sort\"","commit_id":"0f800e43fecb22b900d632383fd1a5c3cd7b7066"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"77907f48264fb8c6c9724b1c0d94b1e2f14a62bf","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"        \"\"\"Get host cpu features and return the hash value of cpu features"},{"line_number":1298,"context_line":"        \"\"\""},{"line_number":1299,"context_line":"        try:"},{"line_number":1300,"context_line":"            with open(\"/proc/cpuinfo\", \"r\") as fp:"},{"line_number":1301,"context_line":"                for line in fp.readlines():"},{"line_number":1302,"context_line":"                    if \u0027:\u0027 in line:"},{"line_number":1303,"context_line":"                        key, value \u003d line.split(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_4641f2a8","line":1300,"range":{"start_line":1300,"start_character":23,"end_line":1300,"end_character":37},"updated":"2020-11-13 12:34:21.000000000","message":"I feel unease straight-up parsing /proc/cpuinfo;  libvirt does the work for us (see also: getCapabilities() and domCapabilities()).\n\nAlso ... while I don\u0027t want to block you addressing the immediate bug fix, but please also read this not-yet-implemented this spec:\n\nhttps://opendev.org/openstack/nova-specs/commit/70811da221035044e27\n\n... which talks about using better libvirt APIs — baselineHypervisorCPU() and compareHypervisorCPU() — that take into account \"host hypervisor\u0027s\" capabilities (i.e. KVM, QEMU and details libvirt knows about the host).  This addresses the problems with existing compareCPU() API.","commit_id":"81f451b34ff789e10f1f0dc005b21b658a910c3e"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ec52f53ca89f3e195a7f1c57bf66b2d449cc8e22","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"        \"\"\"Get host cpu features and return the hash value of cpu features"},{"line_number":1298,"context_line":"        \"\"\""},{"line_number":1299,"context_line":"        try:"},{"line_number":1300,"context_line":"            with open(\"/proc/cpuinfo\", \"r\") as fp:"},{"line_number":1301,"context_line":"                for line in fp.readlines():"},{"line_number":1302,"context_line":"                    if \u0027:\u0027 in line:"},{"line_number":1303,"context_line":"                        key, value \u003d line.split(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_3facb0eb","line":1300,"range":{"start_line":1300,"start_character":23,"end_line":1300,"end_character":37},"in_reply_to":"1f621f24_4641f2a8","updated":"2020-11-26 07:58:47.000000000","message":"What you said is right, I will see if I can solve this problem with https://opendev.org/openstack/nova-specs/commit/70811da221035044e27.","commit_id":"81f451b34ff789e10f1f0dc005b21b658a910c3e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ba2d91dd16fe9eab155e57a20d814b2db0b7d4b","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"        \"\"\"Get host cpu features and return the hash value of cpu features"},{"line_number":1298,"context_line":"        \"\"\""},{"line_number":1299,"context_line":"        try:"},{"line_number":1300,"context_line":"            with open(\"/proc/cpuinfo\", \"r\") as fp:"},{"line_number":1301,"context_line":"                for line in fp.readlines():"},{"line_number":1302,"context_line":"                    if \u0027:\u0027 in line:"},{"line_number":1303,"context_line":"                        key, value \u003d line.split(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_069eda05","line":1300,"range":{"start_line":1300,"start_character":23,"end_line":1300,"end_character":37},"in_reply_to":"1f621f24_4641f2a8","updated":"2020-11-13 13:05:42.000000000","message":"we have explictly said that we should not do this in the past and require that all cpu info must come via libvirt.","commit_id":"81f451b34ff789e10f1f0dc005b21b658a910c3e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"77907f48264fb8c6c9724b1c0d94b1e2f14a62bf","unresolved":false,"context_lines":[{"line_number":1308,"context_line":"                            value_list \u003d value.split()"},{"line_number":1309,"context_line":"                            value_list.sort()"},{"line_number":1310,"context_line":"                            value \u003d \u0027\u0027.join(value_list)"},{"line_number":1311,"context_line":"                            return hashlib.md5(value.encode()).hexdigest()"},{"line_number":1312,"context_line":"                return 0"},{"line_number":1313,"context_line":"        except IOError:"},{"line_number":1314,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_06e6dae8","line":1311,"range":{"start_line":1311,"start_character":35,"end_line":1311,"end_character":46},"updated":"2020-11-13 12:34:21.000000000","message":"We don\u0027t want to use \u0027hashlibmd5\u0027; there\u0027s already a major effort in OpenStack upstream to remove the usage of \u0027md5\u0027 (as part of enabling the \"FIPS\" security mode).  Please use the encapsulated Oslo version, as shown here:\n\nhttps://review.opendev.org/#/c/753848/","commit_id":"81f451b34ff789e10f1f0dc005b21b658a910c3e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ba2d91dd16fe9eab155e57a20d814b2db0b7d4b","unresolved":false,"context_lines":[{"line_number":1308,"context_line":"                            value_list \u003d value.split()"},{"line_number":1309,"context_line":"                            value_list.sort()"},{"line_number":1310,"context_line":"                            value \u003d \u0027\u0027.join(value_list)"},{"line_number":1311,"context_line":"                            return hashlib.md5(value.encode()).hexdigest()"},{"line_number":1312,"context_line":"                return 0"},{"line_number":1313,"context_line":"        except IOError:"},{"line_number":1314,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f621f24_468bb2c1","line":1311,"range":{"start_line":1311,"start_character":35,"end_line":1311,"end_character":46},"in_reply_to":"1f621f24_06e6dae8","updated":"2020-11-13 13:05:42.000000000","message":"ya if  we are generatign a has we should use a sha256","commit_id":"81f451b34ff789e10f1f0dc005b21b658a910c3e"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4a275b1f36ecc63e4c43356751475572aab1016e","unresolved":true,"context_lines":[{"line_number":725,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":726,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"            # NOTE(chengsheng): To use new QEMU and libvirt-based"},{"line_number":729,"context_line":"            # CPU configuration APIs: baselineHypervisorCPU()"},{"line_number":730,"context_line":"            # to get cpu feature information from domain capabilities."},{"line_number":731,"context_line":"            emulator_bin, arch,\\"},{"line_number":732,"context_line":"            machine_type, virt_type \u003d self._get_hypervisor_info(self._caps)"},{"line_number":733,"context_line":"            domcap \u003d self._get_domain_capabilities("}],"source_content_type":"text/x-python","patch_set":8,"id":"e1213bfa_3b1c8b40","line":730,"range":{"start_line":728,"start_character":0,"end_line":730,"end_character":70},"updated":"2020-12-02 16:15:43.000000000","message":"nit-pick. The note reads a bit odd.  Did you mean this?\n\n\"Obtain CPU model and feature details from libvirt\u0027s getDomainCapabilities()  API.\"\n\nBut that is visible from reading the code.  If you meant something else, correct me :-)","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ba7db96f8b26daf1ce9f686665322dbf5c5d0aaa","unresolved":true,"context_lines":[{"line_number":725,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":726,"context_line":"            self._caps.parse_str(xmlstr)"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"            # NOTE(chengsheng): To use new QEMU and libvirt-based"},{"line_number":729,"context_line":"            # CPU configuration APIs: baselineHypervisorCPU()"},{"line_number":730,"context_line":"            # to get cpu feature information from domain capabilities."},{"line_number":731,"context_line":"            emulator_bin, arch,\\"},{"line_number":732,"context_line":"            machine_type, virt_type \u003d self._get_hypervisor_info(self._caps)"},{"line_number":733,"context_line":"            domcap \u003d self._get_domain_capabilities("}],"source_content_type":"text/x-python","patch_set":8,"id":"1c0ba53b_bd563a52","line":730,"range":{"start_line":728,"start_character":0,"end_line":730,"end_character":70},"in_reply_to":"e1213bfa_3b1c8b40","updated":"2020-12-03 03:03:06.000000000","message":"This comment is a bit redundant, let me delete it.","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4a275b1f36ecc63e4c43356751475572aab1016e","unresolved":true,"context_lines":[{"line_number":748,"context_line":"                        xml_str \u003d xml_str.decode(\u0027utf-8\u0027)"},{"line_number":749,"context_line":"                    # NOTE(chengsheng): Use baselineHypervisorCPU()"},{"line_number":750,"context_line":"                    # to replace the old baselineCPU()"},{"line_number":751,"context_line":"                    features \u003d self.get_connection().baselineHypervisorCPU("},{"line_number":752,"context_line":"                            emulator_bin,"},{"line_number":753,"context_line":"                            arch,"},{"line_number":754,"context_line":"                            machine_type,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f6a4c6c_127aa802","line":751,"range":{"start_line":751,"start_character":53,"end_line":751,"end_character":74},"updated":"2020-12-02 16:15:43.000000000","message":"I\u0027m wondering if we should take this opportunity to split this out into a wrapper method, baseline_hypervisor_cpu().  Yes, it\u0027ll be slightly more code, but can be clearer and useful for other use-cases.  I\u0027m not insisting on it, though.","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ba7db96f8b26daf1ce9f686665322dbf5c5d0aaa","unresolved":true,"context_lines":[{"line_number":748,"context_line":"                        xml_str \u003d xml_str.decode(\u0027utf-8\u0027)"},{"line_number":749,"context_line":"                    # NOTE(chengsheng): Use baselineHypervisorCPU()"},{"line_number":750,"context_line":"                    # to replace the old baselineCPU()"},{"line_number":751,"context_line":"                    features \u003d self.get_connection().baselineHypervisorCPU("},{"line_number":752,"context_line":"                            emulator_bin,"},{"line_number":753,"context_line":"                            arch,"},{"line_number":754,"context_line":"                            machine_type,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5303f2a0_4f2b4c8d","line":751,"range":{"start_line":751,"start_character":53,"end_line":751,"end_character":74},"in_reply_to":"3f6a4c6c_127aa802","updated":"2020-12-03 03:03:06.000000000","message":"In ‘virt/libvirt/driver.py’, there is already a similar method ‘_get_guest_baseline_cpu_features()’.","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4a275b1f36ecc63e4c43356751475572aab1016e","unresolved":true,"context_lines":[{"line_number":1239,"context_line":"        \"\"\"Compares the given CPU description with the host CPU.\"\"\""},{"line_number":1240,"context_line":"        return self.get_connection().compareCPU(xmlDesc, flags)"},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"    def compare_hypervisor_cpu(self, xmlDesc, flags\u003d0):"},{"line_number":1243,"context_line":"        \"\"\"Compares the given CPU description with the hypervisor CPU.\"\"\""},{"line_number":1244,"context_line":"        caps \u003d self.get_capabilities()"},{"line_number":1245,"context_line":"        emulator_bin, arch,\\"}],"source_content_type":"text/x-python","patch_set":8,"id":"1fe00a55_7d58fc14","line":1242,"range":{"start_line":1242,"start_character":8,"end_line":1242,"end_character":30},"updated":"2020-12-02 16:15:43.000000000","message":"Thanks, we can check off a couple of items from this spec[1]\n\n[1] https://specs.openstack.org/openstack/nova-specs/specs/train/approved/cpu-selection-with-hypervisor-consideration.html","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        \"\"\"Compares the given CPU description with the host CPU.\"\"\""},{"line_number":1240,"context_line":"        return self.get_connection().compareCPU(xmlDesc, flags)"},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"    def compare_hypervisor_cpu(self, xmlDesc, flags\u003d0):"},{"line_number":1243,"context_line":"        \"\"\"Compares the given CPU description with the hypervisor CPU.\"\"\""},{"line_number":1244,"context_line":"        caps \u003d self.get_capabilities()"},{"line_number":1245,"context_line":"        emulator_bin, arch,\\"}],"source_content_type":"text/x-python","patch_set":8,"id":"40a8fd20_92d4af6c","line":1242,"range":{"start_line":1242,"start_character":8,"end_line":1242,"end_character":30},"in_reply_to":"1fe00a55_7d58fc14","updated":"2022-03-31 13:19:18.000000000","message":"Done","commit_id":"44447261c6715180ec65a2291245f06e5a8d0a16"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"9c0e6a66829403aee48cbe66d793d8d27709f653","unresolved":true,"context_lines":[{"line_number":708,"context_line":"                domain \u003d guest.domains.get(virt_type, guest.default_domain)"},{"line_number":709,"context_line":"                emulator_bin \u003d domain.emulator"},{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"}],"source_content_type":"text/x-python","patch_set":12,"id":"8562bdf7_7e2d615f","line":711,"updated":"2021-01-28 10:40:38.000000000","message":"Another thing I learnt during a chat with DanPB from libvirt upstream is that we don\u0027t even need to explicitly fetch \u0027emulator_bin\u0027, \u0027machine_type\u0027, and \u0027arch\u0027; just passing the CONF.libvirt.virt_type to \u0027virt_type\u0027 should be sufficient.\n\nBecause if Nova already knows what arch it is picking for a guest, it doesn\u0027t need to query libvirt again for the host architecture.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5cad70fb0e7c8ac92839db12d6bfd50e067a9e4a","unresolved":true,"context_lines":[{"line_number":708,"context_line":"                domain \u003d guest.domains.get(virt_type, guest.default_domain)"},{"line_number":709,"context_line":"                emulator_bin \u003d domain.emulator"},{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"}],"source_content_type":"text/x-python","patch_set":12,"id":"c14532c6_5d46d86d","line":711,"in_reply_to":"7a546364_11b5aee3","updated":"2021-02-03 15:14:27.000000000","message":"chengsheng, I was partly wrong.  We need to take \u0027machine_type\u0027 into account.  So two things for sure:\n\n- use CONF.libvirt.virty_type as an input to @virttype parameter\n\n- figure out the machine type as an input to @machine parameter -- because Nova enforces an explicit machine type, so we need to take that into account\n\nThe rest of the fields (\u0027emulator_bin\u0027 and \u0027arch\u0027) can be set to \"None\".","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"97b6b824459bef45ffe10d16e8f978c7a64bdd17","unresolved":true,"context_lines":[{"line_number":708,"context_line":"                domain \u003d guest.domains.get(virt_type, guest.default_domain)"},{"line_number":709,"context_line":"                emulator_bin \u003d domain.emulator"},{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"}],"source_content_type":"text/x-python","patch_set":12,"id":"ab9fcb83_8a071506","line":711,"in_reply_to":"8562bdf7_7e2d615f","updated":"2021-01-28 13:02:14.000000000","message":"well not quite. arch and machine_type we shoudl be taking form the image if set.\nif arch is not set on the image then we use the arch form \n\nhttps://docs.openstack.org/nova/latest/configuration/config.html#filter_scheduler.image_properties_default_architecture\n\nwhen scheduling and the hosts arch when booting the vm.\n\nsimilar for machine_type we need to get the machine type form the vm and if not set fallback to \nhttps://docs.openstack.org/nova/latest/configuration/config.html#libvirt.hw_machine_type\nwhich has a different machine type per architeture.\n\nemulator_bin we technically need when generating the xml but we shoudl not need it when geting the capablities.\n\nand virt_type yes is just CONF.libvirt.virt_type","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ed9136c5c1457c6b8f0350459636eedc742a829d","unresolved":true,"context_lines":[{"line_number":708,"context_line":"                domain \u003d guest.domains.get(virt_type, guest.default_domain)"},{"line_number":709,"context_line":"                emulator_bin \u003d domain.emulator"},{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a546364_11b5aee3","line":711,"in_reply_to":"ab9fcb83_8a071506","updated":"2021-01-29 09:55:03.000000000","message":"I agree with Kashyap Chamarthy. This function is to provide parameters for the new libvirt APIs: baselineHypervisorCPU(), compareHypervisorCPU() and getDomainCapabilities(). Sean Mooney mentioned the arch in the image, which affects the scheduling of the vm, which has no effect. Now that libvirt upstream says that ‘emulator_bin’, ‘arch’, and ‘machine_type’ are not required, if there are no other suggestions, then I will modify it.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a4e0df4ce2681dd718105df84bd491172bacf2e","unresolved":true,"context_lines":[{"line_number":708,"context_line":"                domain \u003d guest.domains.get(virt_type, guest.default_domain)"},{"line_number":709,"context_line":"                emulator_bin \u003d domain.emulator"},{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"}],"source_content_type":"text/x-python","patch_set":12,"id":"ee5ec575_890063d9","line":711,"in_reply_to":"c14532c6_5d46d86d","updated":"2022-04-06 10:06:53.000000000","message":"Is this now settled? At least the emulator_bin is not set to None above. I\u0027m also wondering that setting arch to None explicitly before comparision is related to this.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"30afd406e59becab1a4cddc8ca4e2bdfaff9c2e0","unresolved":true,"context_lines":[{"line_number":708,"context_line":"                domain \u003d guest.domains.get(virt_type, guest.default_domain)"},{"line_number":709,"context_line":"                emulator_bin \u003d domain.emulator"},{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"}],"source_content_type":"text/x-python","patch_set":12,"id":"13ada020_d0af1d5c","line":711,"in_reply_to":"ee5ec575_890063d9","updated":"2022-04-08 10:04:19.000000000","message":"So far, no problems have been found with the current method of use.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"97b6b824459bef45ffe10d16e8f978c7a64bdd17","unresolved":true,"context_lines":[{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        Returns an instance of config.LibvirtConfigCaps representing"}],"source_content_type":"text/x-python","patch_set":12,"id":"b9c66445_297e144c","line":713,"range":{"start_line":713,"start_character":8,"end_line":713,"end_character":24},"updated":"2021-01-28 13:02:14.000000000","message":"technically this funciton is ment to get the capablities for all emultors present on the host\nnot just the default machine_type or arch.\n\nwe have for thet last 3 ptgs said that the nova libvirt driver is intended to allow virualtiation of other architetrus with qemu and if that does not currenlty work then its a bug that can be fixed without requireing a blueprint or spec.\n\nso im not conviced its correct to limit the capablities to just the capablits for the default machine type and arch.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"d7e8c0359aa98d300462e442240418cc70549fb8","unresolved":true,"context_lines":[{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        Returns an instance of config.LibvirtConfigCaps representing"}],"source_content_type":"text/x-python","patch_set":12,"id":"bd3831a7_04c0a9c7","line":713,"range":{"start_line":713,"start_character":8,"end_line":713,"end_character":24},"in_reply_to":"0cf747a2_e9204c5c","updated":"2021-02-03 10:29:33.000000000","message":"@Sean: I want to remind. I just replace the cpu model and features, not other capabilities. As far as I know, the cpu feature and model obtained in the original get_capabilities() are used for vm of a specific arch. In the ‘nova hypervisor-show’, you can see that cpu_info contains only one arch, features and model.\nIn addition, _get_cpu_feature_traits() exposes cpu features to placement api for vm scheduling. However, a compute host not supporting multi arch vms, so it is not need to add a union cpu feature to the capabilities of the hypervisor.\nAnd I check the original code, those who need union of the capablityies for all emulators are not in the cpu features.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"ed9136c5c1457c6b8f0350459636eedc742a829d","unresolved":true,"context_lines":[{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        Returns an instance of config.LibvirtConfigCaps representing"}],"source_content_type":"text/x-python","patch_set":12,"id":"e446630b_7410c937","line":713,"range":{"start_line":713,"start_character":8,"end_line":713,"end_character":24},"in_reply_to":"3ad4e13e_9a399738","updated":"2021-01-29 09:55:03.000000000","message":"@Sean: The modification of the previous paragraph is just to replace the model and features. because the model and feature obtained by getDomainCapabilities() may be different.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a4e0df4ce2681dd718105df84bd491172bacf2e","unresolved":true,"context_lines":[{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        Returns an instance of config.LibvirtConfigCaps representing"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a5eed71_75468735","line":713,"range":{"start_line":713,"start_character":8,"end_line":713,"end_character":24},"in_reply_to":"87e12913_427be1a6","updated":"2022-04-06 10:06:53.000000000","message":"Meanwhile there was progress in Yoga supporting emulation. However I don\u0027t see that https://zuul.opendev.org/t/openstack/job/nova-emulation job run on this patch but is should.\n\n//later\n\nthat job was moved to periodic. I pushed a patch to trigger it on this change https://review.opendev.org/c/openstack/nova/+/836764","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"efae11041723e8ebf28f17f5221d41657d602468","unresolved":true,"context_lines":[{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        Returns an instance of config.LibvirtConfigCaps representing"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ad4e13e_9a399738","line":713,"range":{"start_line":713,"start_character":8,"end_line":713,"end_character":24},"in_reply_to":"b9c66445_297e144c","updated":"2021-01-29 08:50:51.000000000","message":"@Sean: Does the current change makes situation worse?","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"cf9761278381a626f8e11761ac4aa2fad56dee8e","unresolved":true,"context_lines":[{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        Returns an instance of config.LibvirtConfigCaps representing"}],"source_content_type":"text/x-python","patch_set":12,"id":"87e12913_427be1a6","line":713,"range":{"start_line":713,"start_character":8,"end_line":713,"end_character":24},"in_reply_to":"bd3831a7_04c0a9c7","updated":"2021-02-03 15:21:43.000000000","message":"I agree with chengsheng here,  We shouldn\u0027t get distracted with supporting multi-arch VMs.\n\nWe want to keep the changes to the most essential ones to start with (replacing the older CPU APIs usage with the newer ones, and fix related fallout).  But \"nice-to-have\" improvements will have to wait until later.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5b719d7efeebf53b992316af186f6c5592c2ceac","unresolved":true,"context_lines":[{"line_number":710,"context_line":"                break"},{"line_number":711,"context_line":"        return emulator_bin, arch, machine_type, virt_type"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def get_capabilities(self):"},{"line_number":714,"context_line":"        \"\"\"Returns the host capabilities information"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        Returns an instance of config.LibvirtConfigCaps representing"}],"source_content_type":"text/x-python","patch_set":12,"id":"0cf747a2_e9204c5c","line":713,"range":{"start_line":713,"start_character":8,"end_line":713,"end_character":24},"in_reply_to":"e446630b_7410c937","updated":"2021-01-29 13:27:32.000000000","message":"it does not nessiasarly make it work but its still just lookign at the host values.\n\nwe shoudl be creating a union of the capablityies for all emulators installed on the host not just the default ones ot make cross arch emultiaton acutlly work.\n\n\njust point out that calling the libvirt fucntion once an only once with a singel arch and machine type is technically still incorrect.\n\neven if we are not supporting multi arch vms deployment we need to look at multiple machine types.\n\nif we just use the host default one we might miss capablieies that should be reported.\n\nthis code is used to generate the set fo traits reported by the hosts and if some feature are only avaiable when using q35 for example if we looked up with PC that would prevent peopel using them.\n\nanywya ill re review the new version later today i just said i would responed to this quest breifly.","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"f406868efb65363f2509c7d4bc4275cc7c7293ab","unresolved":true,"context_lines":[{"line_number":1276,"context_line":"                return xmlDesc"},{"line_number":1277,"context_line":"            else:"},{"line_number":1278,"context_line":"                raise"},{"line_number":1279,"context_line":""},{"line_number":1280,"context_line":"    def is_cpu_control_policy_capable(self):"},{"line_number":1281,"context_line":"        \"\"\"Returns whether kernel configuration CGROUP_SCHED is enabled"},{"line_number":1282,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"de73617c_0a03fc6d","line":1279,"updated":"2021-01-27 18:01:22.000000000","message":"Thanks for the work;  it checks off some of the work items here :-)\n\nhttps://opendev.org/openstack/nova-specs/commit/70811da221035044e27","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5adc94a2c7d95722f30dc5df3abd1dc827267c77","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"                return xmlDesc"},{"line_number":1277,"context_line":"            else:"},{"line_number":1278,"context_line":"                raise"},{"line_number":1279,"context_line":""},{"line_number":1280,"context_line":"    def is_cpu_control_policy_capable(self):"},{"line_number":1281,"context_line":"        \"\"\"Returns whether kernel configuration CGROUP_SCHED is enabled"},{"line_number":1282,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"a6c677f3_8903a202","line":1279,"in_reply_to":"de73617c_0a03fc6d","updated":"2022-03-31 13:19:18.000000000","message":"Done","commit_id":"dd4c093f6550642a4167c598e2c38ff34f5c4882"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e7751c205a72a06b1884efcc5ecf77d6528d6a2f","unresolved":true,"context_lines":[{"line_number":778,"context_line":"                        xml_str \u003d xml_str.decode(\u0027utf-8\u0027)"},{"line_number":779,"context_line":"                    # NOTE(chengsheng): Use baselineHypervisorCPU()"},{"line_number":780,"context_line":"                    # to replace the old baselineCPU()"},{"line_number":781,"context_line":"                    features \u003d self.baseline_hypervisor_cpu(xml_str)"},{"line_number":782,"context_line":"                    if features:"},{"line_number":783,"context_line":"                        cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":784,"context_line":"                        cpu.parse_str(features)"}],"source_content_type":"text/x-python","patch_set":13,"id":"52d04eb9_8658ab07","line":781,"updated":"2021-03-09 18:34:39.000000000","message":"Why do we need to do this? I see \u003cfeatures\u003e elements in the \u0027/capabilities/host/cpu\u0027 element returned by \u0027virsh capabilities\u0027 and presumably the Python equivalent. Can\u0027t we use that?","commit_id":"a60b7664cdc856d2ae303a0b91b063c5c945c11b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":789,"context_line":"        :returns: a config.LibvirtConfigCaps object"},{"line_number":790,"context_line":"        \"\"\""},{"line_number":791,"context_line":"        if not self._caps:"},{"line_number":792,"context_line":"            xmlstr \u003d self.get_connection().getCapabilities()"},{"line_number":793,"context_line":"            self._log_host_capabilities(xmlstr)"},{"line_number":794,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":795,"context_line":"            self._caps.parse_str(xmlstr)"}],"source_content_type":"text/x-python","patch_set":17,"id":"f91b54fb_cd29e34d","line":792,"updated":"2021-07-06 16:57:28.000000000","message":"This was correct previously. I suspect you\u0027ve made a mistake in a rebase. Can you revert back to the previous flow, i.e.:\n\n  if self._caps:\n      return self._caps\n\n  xmlstr \u003d self.get_connection().getCapabilities()\n  ...","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":789,"context_line":"        :returns: a config.LibvirtConfigCaps object"},{"line_number":790,"context_line":"        \"\"\""},{"line_number":791,"context_line":"        if not self._caps:"},{"line_number":792,"context_line":"            xmlstr \u003d self.get_connection().getCapabilities()"},{"line_number":793,"context_line":"            self._log_host_capabilities(xmlstr)"},{"line_number":794,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":795,"context_line":"            self._caps.parse_str(xmlstr)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba2e22e7_b5aa6c92","line":792,"in_reply_to":"f91b54fb_cd29e34d","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":797,"context_line":"            emulator_bin, arch,\\"},{"line_number":798,"context_line":"            machine_type, virt_type \u003d self._get_hypervisor_info(self._caps)"},{"line_number":799,"context_line":"            domcap \u003d self._get_domain_capabilities("},{"line_number":800,"context_line":"                    emulator_bin\u003demulator_bin, arch\u003darch,"},{"line_number":801,"context_line":"                    machine_type\u003dmachine_type, virt_type\u003dvirt_type)"},{"line_number":802,"context_line":"            # NOTE(chengsheng): To use the baselineHypervisorCPU, need to"},{"line_number":803,"context_line":"            # obtain the CPU features and model from getDomainCapabilities."}],"source_content_type":"text/x-python","patch_set":17,"id":"079056da_c140b922","line":800,"range":{"start_line":800,"start_character":16,"end_line":800,"end_character":20},"updated":"2021-07-06 16:57:28.000000000","message":"nit","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":1462,"context_line":""},{"line_number":1463,"context_line":"    def compare_cpu(self, xmlDesc, flags\u003d0):"},{"line_number":1464,"context_line":"        \"\"\"Compares the given CPU description with the host CPU.\"\"\""},{"line_number":1465,"context_line":"        return self.get_connection().compareCPU(xmlDesc, flags)"},{"line_number":1466,"context_line":""},{"line_number":1467,"context_line":"    def compare_hypervisor_cpu(self, xmlDesc, flags\u003d0):"},{"line_number":1468,"context_line":"        \"\"\"Compares the given CPU description with the hypervisor CPU.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"f26f3f39_31a7e2d3","line":1465,"updated":"2021-07-06 16:57:28.000000000","message":"Is this dead code now?","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":1462,"context_line":""},{"line_number":1463,"context_line":"    def compare_cpu(self, xmlDesc, flags\u003d0):"},{"line_number":1464,"context_line":"        \"\"\"Compares the given CPU description with the host CPU.\"\"\""},{"line_number":1465,"context_line":"        return self.get_connection().compareCPU(xmlDesc, flags)"},{"line_number":1466,"context_line":""},{"line_number":1467,"context_line":"    def compare_hypervisor_cpu(self, xmlDesc, flags\u003d0):"},{"line_number":1468,"context_line":"        \"\"\"Compares the given CPU description with the hypervisor CPU.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"8c565f02_3e325436","line":1465,"in_reply_to":"f26f3f39_31a7e2d3","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8130a7cc6e02e8afb737a3830bd225b49fc3945b","unresolved":true,"context_lines":[{"line_number":1497,"context_line":"                        arch,"},{"line_number":1498,"context_line":"                        machine_type,"},{"line_number":1499,"context_line":"                        virt_type,"},{"line_number":1500,"context_line":"                        [xmlDesc])"},{"line_number":1501,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":1502,"context_line":"            error_code \u003d ex.get_error_code()"},{"line_number":1503,"context_line":"            if error_code in (libvirt.VIR_ERR_NO_SUPPORT,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9f8a0e07_ad4deada","line":1500,"updated":"2021-07-06 16:57:28.000000000","message":"This could be much simpler:\n\n  flags \u003d 0\n  if hasattr(libvirt, \u0027VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES\u0027):\n      flags |\u003d libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)\n\n  return self.get_connection().baselineHypervisorCPU(\n      emulator_bin,\n      arch,\n      machine_type,\n      virt_type,\n      [xmlDesc],\n      *flags)","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"7642ffaf15e276c6a32774408c8499a5d50280df","unresolved":false,"context_lines":[{"line_number":1497,"context_line":"                        arch,"},{"line_number":1498,"context_line":"                        machine_type,"},{"line_number":1499,"context_line":"                        virt_type,"},{"line_number":1500,"context_line":"                        [xmlDesc])"},{"line_number":1501,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":1502,"context_line":"            error_code \u003d ex.get_error_code()"},{"line_number":1503,"context_line":"            if error_code in (libvirt.VIR_ERR_NO_SUPPORT,"}],"source_content_type":"text/x-python","patch_set":17,"id":"8cbab3ba_d6462e20","line":1500,"in_reply_to":"9f8a0e07_ad4deada","updated":"2021-07-19 02:29:30.000000000","message":"Done","commit_id":"de2e428d1622f1e2061797fa92f38007f7b91fad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e99154ce48f2564a34339ce842db22ca44219f92","unresolved":true,"context_lines":[{"line_number":792,"context_line":"            return self._caps"},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        xmlstr \u003d self.get_connection().getCapabilities()"},{"line_number":795,"context_line":"        self._log_host_capabilities(xmlstr)"},{"line_number":796,"context_line":"        self._caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":797,"context_line":"        self._caps.parse_str(xmlstr)"},{"line_number":798,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"0a091afb_ce5727d8","line":795,"updated":"2021-09-02 16:06:03.000000000","message":"we log the capabilities here but then at L809-810 we modify what we got so I think to avoid confusion during troubleshooting we should log what we modified (or just log the modified caps)","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6073e2def4d067a438465d446ba36c9ea9dca1d6","unresolved":true,"context_lines":[{"line_number":792,"context_line":"            return self._caps"},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        xmlstr \u003d self.get_connection().getCapabilities()"},{"line_number":795,"context_line":"        self._log_host_capabilities(xmlstr)"},{"line_number":796,"context_line":"        self._caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":797,"context_line":"        self._caps.parse_str(xmlstr)"},{"line_number":798,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"bbc1582f_6326c2f8","line":795,"in_reply_to":"0a091afb_ce5727d8","updated":"2022-04-04 14:03:25.000000000","message":"Hm. we already do similar things for ARM. So feel free to ignore this comment.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e99154ce48f2564a34339ce842db22ca44219f92","unresolved":true,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        emulator_bin, arch,\\"},{"line_number":800,"context_line":"        machine_type, virt_type \u003d self._get_hypervisor_info(self._caps)"},{"line_number":801,"context_line":"        domcap \u003d self._get_domain_capabilities("},{"line_number":802,"context_line":"                emulator_bin\u003demulator_bin, arch\u003darch,"},{"line_number":803,"context_line":"                machine_type\u003dmachine_type, virt_type\u003dvirt_type)"},{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, need to"}],"source_content_type":"text/x-python","patch_set":20,"id":"cfdfa930_719808f5","line":801,"updated":"2021-09-02 16:06:03.000000000","message":"The other caller of this is nova.virt.libvirt.host.Host._add_to_domain_capabilities(). There we  have an exception handling for libvirtError, I\u0027m not sure that error case can happen here too. \n\nAlso I see that domain capabilities are cached in self._domain_caps by the other call site. Why we are querying it again if we already has it in the cache?\n\n//later\n\nso the call graph is something like this \n\nget_domain_capabilities()\n-\u003e get_capabilities() [this] -\u003e _get_domain_capabilities()\n-\u003e _add_to_domain_capabilities() -\u003e _get_domain_capabilities() [again]\n\nI\u0027m not sure if this can be simplified but it is painfully complex to understand what is happening.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"f1cf1b6605a5d472c86b9dfa3b85b5ca27bf42a3","unresolved":true,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        emulator_bin, arch,\\"},{"line_number":800,"context_line":"        machine_type, virt_type \u003d self._get_hypervisor_info(self._caps)"},{"line_number":801,"context_line":"        domcap \u003d self._get_domain_capabilities("},{"line_number":802,"context_line":"                emulator_bin\u003demulator_bin, arch\u003darch,"},{"line_number":803,"context_line":"                machine_type\u003dmachine_type, virt_type\u003dvirt_type)"},{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, need to"}],"source_content_type":"text/x-python","patch_set":20,"id":"e33a8d6c_a1b684fe","line":801,"in_reply_to":"cfdfa930_719808f5","updated":"2021-09-03 04:05:11.000000000","message":"In fact, ‘get_capabilities’ is called before ‘get_domain_capabilities’. it will return directly when ‘get_capabilities’ is called next time.\n        if self._caps:\n            return self._caps","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":false,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        emulator_bin, arch,\\"},{"line_number":800,"context_line":"        machine_type, virt_type \u003d self._get_hypervisor_info(self._caps)"},{"line_number":801,"context_line":"        domcap \u003d self._get_domain_capabilities("},{"line_number":802,"context_line":"                emulator_bin\u003demulator_bin, arch\u003darch,"},{"line_number":803,"context_line":"                machine_type\u003dmachine_type, virt_type\u003dvirt_type)"},{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, need to"}],"source_content_type":"text/x-python","patch_set":20,"id":"06a30dd8_91e7af78","line":801,"in_reply_to":"e33a8d6c_a1b684fe","updated":"2021-10-12 14:22:13.000000000","message":"OK I think I made a mistake in the above call path. \n\nI think what happens is that in a single get_domain_capabilities() call we actually call _get_domain_capabilities() twice. This is suboptimal but only happens once per compute service startup. So I\u0027m fine with it.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e99154ce48f2564a34339ce842db22ca44219f92","unresolved":true,"context_lines":[{"line_number":801,"context_line":"        domcap \u003d self._get_domain_capabilities("},{"line_number":802,"context_line":"                emulator_bin\u003demulator_bin, arch\u003darch,"},{"line_number":803,"context_line":"                machine_type\u003dmachine_type, virt_type\u003dvirt_type)"},{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, need to"},{"line_number":805,"context_line":"        # obtain the CPU features and model from getDomainCapabilities."},{"line_number":806,"context_line":"        # Here replace the CPU features and model in get_capabilities,"},{"line_number":807,"context_line":"        # it will not affect the original functions."},{"line_number":808,"context_line":"        if domcap._cpu:"}],"source_content_type":"text/x-python","patch_set":20,"id":"736965c6_e59c92b4","line":805,"range":{"start_line":804,"start_character":28,"end_line":805,"end_character":71},"updated":"2021-09-02 16:06:03.000000000","message":"Don\u0027t we have that already as a result of getCapabilities() ? Is this somehow related to the condition at L815?","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"f1cf1b6605a5d472c86b9dfa3b85b5ca27bf42a3","unresolved":true,"context_lines":[{"line_number":801,"context_line":"        domcap \u003d self._get_domain_capabilities("},{"line_number":802,"context_line":"                emulator_bin\u003demulator_bin, arch\u003darch,"},{"line_number":803,"context_line":"                machine_type\u003dmachine_type, virt_type\u003dvirt_type)"},{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, need to"},{"line_number":805,"context_line":"        # obtain the CPU features and model from getDomainCapabilities."},{"line_number":806,"context_line":"        # Here replace the CPU features and model in get_capabilities,"},{"line_number":807,"context_line":"        # it will not affect the original functions."},{"line_number":808,"context_line":"        if domcap._cpu:"}],"source_content_type":"text/x-python","patch_set":20,"id":"f862d844_b5d6d9da","line":805,"range":{"start_line":804,"start_character":28,"end_line":805,"end_character":71},"in_reply_to":"736965c6_e59c92b4","updated":"2021-09-03 04:05:11.000000000","message":"The model and features obtained by getCapabilities and getDomainCapabilities may be different. To use the new API, need to use getDomainCapabilities.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c1fccbbcee79855a90712eaf0031d658f4685846","unresolved":false,"context_lines":[{"line_number":801,"context_line":"        domcap \u003d self._get_domain_capabilities("},{"line_number":802,"context_line":"                emulator_bin\u003demulator_bin, arch\u003darch,"},{"line_number":803,"context_line":"                machine_type\u003dmachine_type, virt_type\u003dvirt_type)"},{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, need to"},{"line_number":805,"context_line":"        # obtain the CPU features and model from getDomainCapabilities."},{"line_number":806,"context_line":"        # Here replace the CPU features and model in get_capabilities,"},{"line_number":807,"context_line":"        # it will not affect the original functions."},{"line_number":808,"context_line":"        if domcap._cpu:"}],"source_content_type":"text/x-python","patch_set":20,"id":"53426c05_c690b5a1","line":805,"range":{"start_line":804,"start_character":28,"end_line":805,"end_character":71},"in_reply_to":"f862d844_b5d6d9da","updated":"2021-10-12 14:22:13.000000000","message":"Ack","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e99154ce48f2564a34339ce842db22ca44219f92","unresolved":true,"context_lines":[{"line_number":818,"context_line":"            cpu.vendor \u003d self._caps.host.cpu.vendor"},{"line_number":819,"context_line":"            cpu.features \u003d self._caps.host.cpu.features"},{"line_number":820,"context_line":"            xml_str \u003d cpu.to_xml()"},{"line_number":821,"context_line":"            # NOTE(chengsheng): The current guest CPU config libvirt"},{"line_number":822,"context_line":"            # APIs that Nova uses, compareCPU() and baselineCPU(),"},{"line_number":823,"context_line":"            # are \"not very useful\". because they don\u0027t consider"},{"line_number":824,"context_line":"            # the capabilities of the \"host hypervisor\" (KVM, QEMU and"},{"line_number":825,"context_line":"            # details libvirt knows about the host).  More concretely,"}],"source_content_type":"text/x-python","patch_set":20,"id":"b7ba7078_877d11c8","line":822,"range":{"start_line":821,"start_character":36,"end_line":822,"end_character":65},"updated":"2021-09-02 16:06:03.000000000","message":"as far as I understand you are removing the usage of these APIs. So this sentence is wrongly states that what nova currently uses.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e99154ce48f2564a34339ce842db22ca44219f92","unresolved":true,"context_lines":[{"line_number":840,"context_line":"            features \u003d self.baseline_hypervisor_cpu(xml_str)"},{"line_number":841,"context_line":"            if features:"},{"line_number":842,"context_line":"                cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":843,"context_line":"                cpu.parse_str(features)"},{"line_number":844,"context_line":"                self._caps.host.cpu.features \u003d cpu.features"},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":20,"id":"6a167aed_2aadb6f7","line":843,"range":{"start_line":843,"start_character":16,"end_line":843,"end_character":39},"updated":"2021-09-02 16:06:03.000000000","message":"features can be None here if baseline_hypervisor_cpu got a libvirtError. Then parse_str will raise a TypeError if None is passed in as far as I see.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a4e0df4ce2681dd718105df84bd491172bacf2e","unresolved":false,"context_lines":[{"line_number":840,"context_line":"            features \u003d self.baseline_hypervisor_cpu(xml_str)"},{"line_number":841,"context_line":"            if features:"},{"line_number":842,"context_line":"                cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":843,"context_line":"                cpu.parse_str(features)"},{"line_number":844,"context_line":"                self._caps.host.cpu.features \u003d cpu.features"},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":20,"id":"8041ed40_3074d400","line":843,"range":{"start_line":843,"start_character":16,"end_line":843,"end_character":39},"in_reply_to":"1dcf0658_908c24a7","updated":"2022-04-06 10:06:53.000000000","message":"Ack","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"90889208cda57e8a9cf3d61d5b5c8aac5d881ecc","unresolved":true,"context_lines":[{"line_number":840,"context_line":"            features \u003d self.baseline_hypervisor_cpu(xml_str)"},{"line_number":841,"context_line":"            if features:"},{"line_number":842,"context_line":"                cpu \u003d vconfig.LibvirtConfigCPU()"},{"line_number":843,"context_line":"                cpu.parse_str(features)"},{"line_number":844,"context_line":"                self._caps.host.cpu.features \u003d cpu.features"},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"        return self._caps"}],"source_content_type":"text/x-python","patch_set":20,"id":"1dcf0658_908c24a7","line":843,"range":{"start_line":843,"start_character":16,"end_line":843,"end_character":39},"in_reply_to":"6a167aed_2aadb6f7","updated":"2021-11-29 02:59:00.000000000","message":"You may not see \"if features\", features is None, it will not enter the following line.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e99154ce48f2564a34339ce842db22ca44219f92","unresolved":true,"context_lines":[{"line_number":1470,"context_line":"        caps \u003d self.get_capabilities()"},{"line_number":1471,"context_line":"        emulator_bin, arch,\\"},{"line_number":1472,"context_line":"        machine_type, virt_type \u003d self._get_hypervisor_info(caps)"},{"line_number":1473,"context_line":"        return self.get_connection().compareHypervisorCPU(emulator_bin,"},{"line_number":1474,"context_line":"                                                          arch,"},{"line_number":1475,"context_line":"                                                          machine_type,"},{"line_number":1476,"context_line":"                                                          virt_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"0fd5b362_ed1a9adf","line":1473,"updated":"2021-09-02 16:06:03.000000000","message":"nit: I see that you handle libvirError from this on the caller site while baseline_hypervisor_cpu handles error directly here. Would be nice to consolidate the error handling.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"f1cf1b6605a5d472c86b9dfa3b85b5ca27bf42a3","unresolved":true,"context_lines":[{"line_number":1470,"context_line":"        caps \u003d self.get_capabilities()"},{"line_number":1471,"context_line":"        emulator_bin, arch,\\"},{"line_number":1472,"context_line":"        machine_type, virt_type \u003d self._get_hypervisor_info(caps)"},{"line_number":1473,"context_line":"        return self.get_connection().compareHypervisorCPU(emulator_bin,"},{"line_number":1474,"context_line":"                                                          arch,"},{"line_number":1475,"context_line":"                                                          machine_type,"},{"line_number":1476,"context_line":"                                                          virt_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"d84d5ead_21e54804","line":1473,"in_reply_to":"0fd5b362_ed1a9adf","updated":"2021-09-03 04:05:11.000000000","message":"Yes, avoid duplication of code.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"28e9360482cc1f286ea692fd6e9f756177ef004f","unresolved":true,"context_lines":[{"line_number":1470,"context_line":"        caps \u003d self.get_capabilities()"},{"line_number":1471,"context_line":"        emulator_bin, arch,\\"},{"line_number":1472,"context_line":"        machine_type, virt_type \u003d self._get_hypervisor_info(caps)"},{"line_number":1473,"context_line":"        return self.get_connection().compareHypervisorCPU(emulator_bin,"},{"line_number":1474,"context_line":"                                                          arch,"},{"line_number":1475,"context_line":"                                                          machine_type,"},{"line_number":1476,"context_line":"                                                          virt_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"c3374de9_c3ceaa87","line":1473,"in_reply_to":"9cdb2a59_6904b14c","updated":"2022-04-08 09:51:09.000000000","message":"I follow the handle libvirError of the original code. move can be a bit of a hassle.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6340740b276b5ad2296a7733af48b4a7fa88fb4","unresolved":true,"context_lines":[{"line_number":1470,"context_line":"        caps \u003d self.get_capabilities()"},{"line_number":1471,"context_line":"        emulator_bin, arch,\\"},{"line_number":1472,"context_line":"        machine_type, virt_type \u003d self._get_hypervisor_info(caps)"},{"line_number":1473,"context_line":"        return self.get_connection().compareHypervisorCPU(emulator_bin,"},{"line_number":1474,"context_line":"                                                          arch,"},{"line_number":1475,"context_line":"                                                          machine_type,"},{"line_number":1476,"context_line":"                                                          virt_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"d0c94da1_ee25dff0","line":1473,"in_reply_to":"c3374de9_c3ceaa87","updated":"2022-04-20 16:26:58.000000000","message":"I still think that handling the errors similarly both in compare_hypervisor_cpu and in baseline_hypervisor_cpu has a value","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a4e0df4ce2681dd718105df84bd491172bacf2e","unresolved":true,"context_lines":[{"line_number":1470,"context_line":"        caps \u003d self.get_capabilities()"},{"line_number":1471,"context_line":"        emulator_bin, arch,\\"},{"line_number":1472,"context_line":"        machine_type, virt_type \u003d self._get_hypervisor_info(caps)"},{"line_number":1473,"context_line":"        return self.get_connection().compareHypervisorCPU(emulator_bin,"},{"line_number":1474,"context_line":"                                                          arch,"},{"line_number":1475,"context_line":"                                                          machine_type,"},{"line_number":1476,"context_line":"                                                          virt_type,"}],"source_content_type":"text/x-python","patch_set":20,"id":"9cdb2a59_6904b14c","line":1473,"in_reply_to":"d84d5ead_21e54804","updated":"2022-04-06 10:06:53.000000000","message":"So lets move the repeated error handling from the callers of compare_hypervisor_cpu to here.","commit_id":"2950c59e1f9f25bdb5b64f987061197bcaa6f887"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a4e0df4ce2681dd718105df84bd491172bacf2e","unresolved":true,"context_lines":[{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, we need to"},{"line_number":805,"context_line":"        # obtain the CPU features and model from getDomainCapabilities."},{"line_number":806,"context_line":"        # Here replace the CPU features and model in getCapabilities,"},{"line_number":807,"context_line":"        # it will not affect the original functions."},{"line_number":808,"context_line":"        if domcap._cpu:"},{"line_number":809,"context_line":"            self._caps.host.cpu.model \u003d domcap._cpu.model"},{"line_number":810,"context_line":"            self._caps.host.cpu.features \u003d domcap._cpu.features"}],"source_content_type":"text/x-python","patch_set":24,"id":"e579e67f_3b5b4c17","line":807,"range":{"start_line":807,"start_character":33,"end_line":807,"end_character":51},"updated":"2022-04-06 10:06:53.000000000","message":"original functions of what?\n\nThis now overwrite what is stored in self._caps. Do you mean that a) no other parts of the code depends on the value of self._caps?  b) other parts that depends on the value of self._caps are compatible with the new values read from getDomainCapabilities?","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"3593907841b10156f6d681c579a192d79c01b704","unresolved":true,"context_lines":[{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, we need to"},{"line_number":805,"context_line":"        # obtain the CPU features and model from getDomainCapabilities."},{"line_number":806,"context_line":"        # Here replace the CPU features and model in getCapabilities,"},{"line_number":807,"context_line":"        # it will not affect the original functions."},{"line_number":808,"context_line":"        if domcap._cpu:"},{"line_number":809,"context_line":"            self._caps.host.cpu.model \u003d domcap._cpu.model"},{"line_number":810,"context_line":"            self._caps.host.cpu.features \u003d domcap._cpu.features"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a3df312_de390cbe","line":807,"range":{"start_line":807,"start_character":33,"end_line":807,"end_character":51},"in_reply_to":"26bc4510_678e423b","updated":"2022-04-08 10:27:20.000000000","message":"It does not affect the original code logic and only takes effect when using baseline and compare.","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"235d4c5df393ba756279575db4fb0c4a7907e8aa","unresolved":true,"context_lines":[{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, we need to"},{"line_number":805,"context_line":"        # obtain the CPU features and model from getDomainCapabilities."},{"line_number":806,"context_line":"        # Here replace the CPU features and model in getCapabilities,"},{"line_number":807,"context_line":"        # it will not affect the original functions."},{"line_number":808,"context_line":"        if domcap._cpu:"},{"line_number":809,"context_line":"            self._caps.host.cpu.model \u003d domcap._cpu.model"},{"line_number":810,"context_line":"            self._caps.host.cpu.features \u003d domcap._cpu.features"}],"source_content_type":"text/x-python","patch_set":24,"id":"26bc4510_678e423b","line":807,"range":{"start_line":807,"start_character":33,"end_line":807,"end_character":51},"in_reply_to":"6dc35962_c1cdb431","updated":"2022-04-08 10:08:38.000000000","message":"But what do you mean by \"it will not affect the original functions\"?  I\u0027m also not clear on what the \"original functions\" are :-)","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"},{"author":{"_account_id":12203,"name":"chengsheng","email":"chengsheng@chinatelecom.cn","username":"chengsheng"},"change_message_id":"30afd406e59becab1a4cddc8ca4e2bdfaff9c2e0","unresolved":true,"context_lines":[{"line_number":804,"context_line":"        # NOTE(chengsheng): To use the baselineHypervisorCPU, we need to"},{"line_number":805,"context_line":"        # obtain the CPU features and model from getDomainCapabilities."},{"line_number":806,"context_line":"        # Here replace the CPU features and model in getCapabilities,"},{"line_number":807,"context_line":"        # it will not affect the original functions."},{"line_number":808,"context_line":"        if domcap._cpu:"},{"line_number":809,"context_line":"            self._caps.host.cpu.model \u003d domcap._cpu.model"},{"line_number":810,"context_line":"            self._caps.host.cpu.features \u003d domcap._cpu.features"}],"source_content_type":"text/x-python","patch_set":24,"id":"6dc35962_c1cdb431","line":807,"range":{"start_line":807,"start_character":33,"end_line":807,"end_character":51},"in_reply_to":"e579e67f_3b5b4c17","updated":"2022-04-08 10:04:19.000000000","message":"I checked and confirmed that there are no dependencies.","commit_id":"0b67f208124720cdea6689ddd5fca19617b5c0b6"}]}
