)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bdf8e6b161cf85449d6b5dd3c7a21e8defdc2af8","unresolved":false,"context_lines":[{"line_number":10,"context_line":"resources info in the instance object, then users can build"},{"line_number":11,"context_line":"a VM with vpmems. Also this patch add the support for"},{"line_number":12,"context_line":"data cleanup on the backend device of the vpmems."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I725deb0312c930087c9e60115abe68b4e06e6804"},{"line_number":15,"context_line":"Partially-Implements: blueprint virtual-persistent-memory"},{"line_number":16,"context_line":"Co-Authored-By: He Jie Xu \u003chejie.xu@intel.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5faad753_b9e7b5e4","line":13,"updated":"2019-09-11 23:11:56.000000000","message":"Can you add some context here about how this implies a NUMA topology because libvirt won\u0027t let us use VPMEM without NUMA? Might be helpful to link to the libvirt code I pointed out on IRC earlier to call that out","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"5f88a39d8f0b2fedc1e49dd3b14301aaf244d021","unresolved":false,"context_lines":[{"line_number":10,"context_line":"resources info in the instance object, then users can build"},{"line_number":11,"context_line":"a VM with vpmems. Also this patch add the support for"},{"line_number":12,"context_line":"data cleanup on the backend device of the vpmems."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I725deb0312c930087c9e60115abe68b4e06e6804"},{"line_number":15,"context_line":"Partially-Implements: blueprint virtual-persistent-memory"},{"line_number":16,"context_line":"Co-Authored-By: He Jie Xu \u003chejie.xu@intel.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5faad753_ebff8efe","line":13,"in_reply_to":"5faad753_b9e7b5e4","updated":"2019-09-12 03:14:36.000000000","message":"Done","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"}],"nova/exception.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[{"line_number":2497,"context_line":""},{"line_number":2498,"context_line":""},{"line_number":2499,"context_line":"class VPMEMCleanupFailed(NovaException):"},{"line_number":2500,"context_line":"    msg_fmt \u003d _(\"Failed to cleanup the vpmem backend device %(dev)s: \""},{"line_number":2501,"context_line":"                \"%(error)s\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_b37254e2","line":2500,"range":{"start_line":2500,"start_character":27,"end_line":2500,"end_character":34},"updated":"2019-08-30 20:49:36.000000000","message":"clean up","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"deb8bf1b0fe34a7c100cfdf242131b7cde8dadf1","unresolved":false,"context_lines":[{"line_number":2497,"context_line":""},{"line_number":2498,"context_line":""},{"line_number":2499,"context_line":"class VPMEMCleanupFailed(NovaException):"},{"line_number":2500,"context_line":"    msg_fmt \u003d _(\"Failed to cleanup the vpmem backend device %(dev)s: \""},{"line_number":2501,"context_line":"                \"%(error)s\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_80db2e1f","line":2500,"range":{"start_line":2500,"start_character":27,"end_line":2500,"end_character":34},"in_reply_to":"7faddb67_b37254e2","updated":"2019-09-02 13:02:05.000000000","message":"Done","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"}],"nova/privsep/libvirt.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[{"line_number":256,"context_line":""},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"@nova.privsep.sys_admin_pctxt.entrypoint"},{"line_number":259,"context_line":"def cleanup_vpmem(devpath):"},{"line_number":260,"context_line":"    cmd \u003d ("},{"line_number":261,"context_line":"        \u0027sudo daxio -z -o %s \u0027 % devpath,"},{"line_number":262,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_5eba070b","line":259,"range":{"start_line":259,"start_character":4,"end_line":259,"end_character":17},"updated":"2019-08-30 20:49:36.000000000","message":"We need to make sure the code path exists that scrubs all the unassigned vpmems on compute startup. I don\u0027t think it does currently. We need to have that in place before/with the patch that contains the code to assign vpmems to VMs (i.e. this one).","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[{"line_number":258,"context_line":"@nova.privsep.sys_admin_pctxt.entrypoint"},{"line_number":259,"context_line":"def cleanup_vpmem(devpath):"},{"line_number":260,"context_line":"    cmd \u003d ("},{"line_number":261,"context_line":"        \u0027sudo daxio -z -o %s \u0027 % devpath,"},{"line_number":262,"context_line":"    )"},{"line_number":263,"context_line":"    processutils.execute(\"\".join(cmd), shell\u003dTrue, check_exit_code\u003d0)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_f3452c70","line":261,"range":{"start_line":261,"start_character":9,"end_line":261,"end_character":13},"updated":"2019-08-30 20:49:36.000000000","message":"sudo should be redundant since this is in a privsep context","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    cmd \u003d ("},{"line_number":261,"context_line":"        \u0027sudo daxio -z -o %s \u0027 % devpath,"},{"line_number":262,"context_line":"    )"},{"line_number":263,"context_line":"    processutils.execute(\"\".join(cmd), shell\u003dTrue, check_exit_code\u003d0)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_930cf842","line":263,"range":{"start_line":263,"start_character":25,"end_line":263,"end_character":37},"updated":"2019-08-30 20:49:36.000000000","message":"This doesn\u0027t make any sense. Did you mean for cmd to be a list (or tuple) of CLI tokens and to * it here?","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    cmd \u003d ("},{"line_number":261,"context_line":"        \u0027sudo daxio -z -o %s \u0027 % devpath,"},{"line_number":262,"context_line":"    )"},{"line_number":263,"context_line":"    processutils.execute(\"\".join(cmd), shell\u003dTrue, check_exit_code\u003d0)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_b309f431","line":263,"range":{"start_line":263,"start_character":39,"end_line":263,"end_character":49},"updated":"2019-08-30 20:49:36.000000000","message":"Why is this necessary?","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"7faddb67_fe21739f","line":264,"updated":"2019-08-30 20:49:36.000000000","message":"Summary: I think this should just be\n\n @nova.privsep...\n def cleanup_pmem(devpath):\n     processutils.execute(\u0027daxio\u0027, \u0027-z\u0027, \u0027-o\u0027, devpath, check_exit_code\u003d0)","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"deb8bf1b0fe34a7c100cfdf242131b7cde8dadf1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"7faddb67_a02e6af7","line":264,"in_reply_to":"7faddb67_fe21739f","updated":"2019-09-02 13:02:05.000000000","message":"Done","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"}],"nova/tests/unit/virt/libvirt/fakelibvirt.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"904de06f454a7d613018452620afcfb58846fa50","unresolved":false,"context_lines":[{"line_number":868,"context_line":"            vpmems \u003d device_nodes.findall(\u0027./memory\u0027)"},{"line_number":869,"context_line":"            for vpmem in vpmems:"},{"line_number":870,"context_line":"                model \u003d vpmem.get(\u0027model\u0027)"},{"line_number":871,"context_line":"                if model \u003d\u003d \u0027nvdimm\u0027:"},{"line_number":872,"context_line":"                    source \u003d vpmem.find(\u0027./source\u0027)"},{"line_number":873,"context_line":"                    target \u003d vpmem.find(\u0027./target\u0027)"},{"line_number":874,"context_line":"                    path \u003d source.find(\u0027./path\u0027).text"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_e06357b0","line":871,"range":{"start_line":871,"start_character":15,"end_line":871,"end_character":37},"updated":"2019-09-10 15:09:16.000000000","message":"ok so this is need to avoid standard dims which we could use for huge page/guest memory but i don\u0027t think we currently use that so this is just a note to self/context","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"904de06f454a7d613018452620afcfb58846fa50","unresolved":false,"context_lines":[{"line_number":1044,"context_line":"        vpmems \u003d \u0027\u0027"},{"line_number":1045,"context_line":"        for vpmem in self._def[\u0027devices\u0027][\u0027vpmems\u0027]:"},{"line_number":1046,"context_line":"            vpmems +\u003d \u0027\u0027\u0027"},{"line_number":1047,"context_line":"    \u003cmemory model\u003d\u0027nvdimm\u0027 access\u003d\u0027shared\u0027\u003e"},{"line_number":1048,"context_line":"      \u003csource\u003e"},{"line_number":1049,"context_line":"        \u003cpath\u003e%(path)s\u003c/path\u003e"},{"line_number":1050,"context_line":"        \u003calignsize\u003e%(alignsize)s\u003c/alignsize\u003e"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_40d02b20","line":1047,"range":{"start_line":1047,"start_character":27,"end_line":1047,"end_character":43},"updated":"2019-09-10 15:09:16.000000000","message":"not that shared acess may not stirctly be required for pmem as unlike hugepages it will not be used for guest to host comunication like we do with vhost user but it also is likely we will want to make this shared at some point so im fine with this as a defult. also im awrae this is the fake test code but im going in gerrit order so im commenting as i go.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"904de06f454a7d613018452620afcfb58846fa50","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"    \u003cmemory model\u003d\u0027nvdimm\u0027 access\u003d\u0027shared\u0027\u003e"},{"line_number":1048,"context_line":"      \u003csource\u003e"},{"line_number":1049,"context_line":"        \u003cpath\u003e%(path)s\u003c/path\u003e"},{"line_number":1050,"context_line":"        \u003calignsize\u003e%(alignsize)s\u003c/alignsize\u003e"},{"line_number":1051,"context_line":"        \u003cpmem/\u003e"},{"line_number":1052,"context_line":"      \u003c/source\u003e"},{"line_number":1053,"context_line":"      \u003ctarget\u003e"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_6090c74f","line":1050,"range":{"start_line":1050,"start_character":8,"end_line":1050,"end_character":44},"updated":"2019-09-10 15:09:16.000000000","message":"note we are not speficyifng a unit for the allignment so we will need to ensure its in KiB in the code later.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[{"line_number":18364,"context_line":"                self.assertEqual(\"/dev/dax0.0\", device.source_path)"},{"line_number":18365,"context_line":"                break"},{"line_number":18366,"context_line":"        else:"},{"line_number":18367,"context_line":"            assert False, \"Unable to find any vpmem device for the guest.\""},{"line_number":18368,"context_line":""},{"line_number":18369,"context_line":""},{"line_number":18370,"context_line":"class TestGuestConfigSysinfoSerialOS(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_fe565305","line":18367,"range":{"start_line":18367,"start_character":12,"end_line":18367,"end_character":25},"updated":"2019-08-30 20:49:36.000000000","message":"this is spelled self.fail(...) in tests","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bf40af59c3d5f9ad1699caa08ec40c085948dc8","unresolved":false,"context_lines":[{"line_number":856,"context_line":"        \u0027task_state\u0027: None,"},{"line_number":857,"context_line":"        \u0027vm_state\u0027: None,"},{"line_number":858,"context_line":"        \u0027trusted_certs\u0027: None,"},{"line_number":859,"context_line":"        \u0027resources\u0027: None"},{"line_number":860,"context_line":"    }"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_5e2ecb43","line":859,"updated":"2019-09-10 16:58:25.000000000","message":"nit: add a trailing comma here and make life easier for the next person touching this","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":856,"context_line":"        \u0027task_state\u0027: None,"},{"line_number":857,"context_line":"        \u0027vm_state\u0027: None,"},{"line_number":858,"context_line":"        \u0027trusted_certs\u0027: None,"},{"line_number":859,"context_line":"        \u0027resources\u0027: None"},{"line_number":860,"context_line":"    }"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_4e44cc1b","line":859,"in_reply_to":"5faad753_5e2ecb43","updated":"2019-09-11 08:13:45.000000000","message":"Done","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bf40af59c3d5f9ad1699caa08ec40c085948dc8","unresolved":false,"context_lines":[{"line_number":18382,"context_line":"                self.assertEqual(\"nvdimm\", device.model)"},{"line_number":18383,"context_line":"                self.assertEqual(\"/dev/dax0.0\", device.source_path)"},{"line_number":18384,"context_line":"                break"},{"line_number":18385,"context_line":"        else:"},{"line_number":18386,"context_line":"            self.fail(\"Unable to find any vpmem device for the guest.\")"},{"line_number":18387,"context_line":""},{"line_number":18388,"context_line":""},{"line_number":18389,"context_line":"class TestGuestConfigSysinfoSerialOS(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_dee63b17","line":18386,"range":{"start_line":18385,"start_character":0,"end_line":18386,"end_character":71},"updated":"2019-09-10 16:58:25.000000000","message":"Rather than doing this, could you assert the length of \u0027cfg.devices\u0027 since you should know that, right? As things stand, you\u0027re asserting that you have devices, but not that one of those devices is definitely of type \u0027LibvirtConfigGuestVPMEM\u0027","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":18382,"context_line":"                self.assertEqual(\"nvdimm\", device.model)"},{"line_number":18383,"context_line":"                self.assertEqual(\"/dev/dax0.0\", device.source_path)"},{"line_number":18384,"context_line":"                break"},{"line_number":18385,"context_line":"        else:"},{"line_number":18386,"context_line":"            self.fail(\"Unable to find any vpmem device for the guest.\")"},{"line_number":18387,"context_line":""},{"line_number":18388,"context_line":""},{"line_number":18389,"context_line":"class TestGuestConfigSysinfoSerialOS(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_4e2b6c2f","line":18386,"range":{"start_line":18385,"start_character":0,"end_line":18386,"end_character":71},"in_reply_to":"5faad753_dee63b17","updated":"2019-09-11 08:13:45.000000000","message":"Emm...I don\u0027t know all devices, and I don\u0027t care other devices. I know how many vpmem devices I will have.\nSo I can assert the vpmems amount.","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bf40af59c3d5f9ad1699caa08ec40c085948dc8","unresolved":false,"context_lines":[{"line_number":23688,"context_line":"                          drvr._discover_vpmems, vpmem_conf)"},{"line_number":23689,"context_line":""},{"line_number":23690,"context_line":"    @mock.patch(\u0027nova.virt.hardware.get_vpmems\u0027)"},{"line_number":23691,"context_line":"    def test_get_ordered_vpmems(self, mock_labels):"},{"line_number":23692,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":23693,"context_line":"        drvr._vpmems_by_name \u003d {\u0027ns_0\u0027: self.vpmem_0,"},{"line_number":23694,"context_line":"                                \u0027ns_1\u0027: self.vpmem_1,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_bec49f60","line":23691,"updated":"2019-09-10 16:58:25.000000000","message":"could do with some comments here","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":23688,"context_line":"                          drvr._discover_vpmems, vpmem_conf)"},{"line_number":23689,"context_line":""},{"line_number":23690,"context_line":"    @mock.patch(\u0027nova.virt.hardware.get_vpmems\u0027)"},{"line_number":23691,"context_line":"    def test_get_ordered_vpmems(self, mock_labels):"},{"line_number":23692,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":23693,"context_line":"        drvr._vpmems_by_name \u003d {\u0027ns_0\u0027: self.vpmem_0,"},{"line_number":23694,"context_line":"                                \u0027ns_1\u0027: self.vpmem_1,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_0e9ed453","line":23691,"in_reply_to":"5faad753_bec49f60","updated":"2019-09-11 08:13:45.000000000","message":"Done","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bf40af59c3d5f9ad1699caa08ec40c085948dc8","unresolved":false,"context_lines":[{"line_number":23712,"context_line":"        self.assertEqual(\u0027SMALL\u0027, vpmems[2].label)"},{"line_number":23713,"context_line":""},{"line_number":23714,"context_line":"    @mock.patch(\u0027nova.privsep.libvirt.cleanup_vpmem\u0027)"},{"line_number":23715,"context_line":"    def test_cleanup_vpmems(self, mock_cleanup_vpmem):"},{"line_number":23716,"context_line":"        vpmems \u003d [self.vpmem_0, self.vpmem_1, self.vpmem_2]"},{"line_number":23717,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":23718,"context_line":"        drvr._cleanup_vpmems(vpmems)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_9e9e8361","line":23715,"range":{"start_line":23715,"start_character":34,"end_line":23715,"end_character":52},"updated":"2019-09-10 16:58:25.000000000","message":"you should assert that this was called 3 times\n\n  mock_cleanup_vpmem.assert_has_calls([\n      mock.call(...),\n      ...\n  ])","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":23712,"context_line":"        self.assertEqual(\u0027SMALL\u0027, vpmems[2].label)"},{"line_number":23713,"context_line":""},{"line_number":23714,"context_line":"    @mock.patch(\u0027nova.privsep.libvirt.cleanup_vpmem\u0027)"},{"line_number":23715,"context_line":"    def test_cleanup_vpmems(self, mock_cleanup_vpmem):"},{"line_number":23716,"context_line":"        vpmems \u003d [self.vpmem_0, self.vpmem_1, self.vpmem_2]"},{"line_number":23717,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":23718,"context_line":"        drvr._cleanup_vpmems(vpmems)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_aec5403e","line":23715,"range":{"start_line":23715,"start_character":34,"end_line":23715,"end_character":52},"in_reply_to":"5faad753_9e9e8361","updated":"2019-09-11 08:13:45.000000000","message":"Done","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dfba08302fb550a6138c23f1dc6b16e6f860909b","unresolved":false,"context_lines":[{"line_number":23847,"context_line":"    def setUp(self):"},{"line_number":23848,"context_line":"        super(LibvirtPMEMNamespaceTests, self).setUp()"},{"line_number":23849,"context_line":"        self.useFixture(fakelibvirt.FakeLibvirtFixture())"},{"line_number":23850,"context_line":"        self.context \u003d context.get_admin_context()"},{"line_number":23851,"context_line":"        self.vpmem_0 \u003d objects.LibvirtVPMEMDevice("},{"line_number":23852,"context_line":"                label\u003d\u00274GB\u0027,"},{"line_number":23853,"context_line":"                name\u003d\u0027ns_0\u0027, devpath\u003d\u0027/dev/dax0.0\u0027,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5faad753_79a37d9f","line":23850,"range":{"start_line":23850,"start_character":0,"end_line":23850,"end_character":50},"updated":"2019-09-11 23:10:55.000000000","message":"I\u0027m not entirely sure this is necessary since we only use it in one test, but it\u0027s done this way in other tests so meh","commit_id":"2de971dc1c9be8efb140870fbda556ba6ff1f46b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"98496ea1ce09795d8bdd8d87c01af6073cb7e8db","unresolved":false,"context_lines":[{"line_number":24386,"context_line":"        self.resource_3 \u003d objects.Resource("},{"line_number":24387,"context_line":"                provider_uuid\u003duuids.rp_uuid,"},{"line_number":24388,"context_line":"                resource_class\u003d\"CUSTOM_RESOURCE_0\","},{"line_number":24389,"context_line":"                identifier\u003d\u0027resource_0\u0027)"},{"line_number":24390,"context_line":""},{"line_number":24391,"context_line":"        self.pmem_namespaces \u003d \u0027\u0027\u0027"},{"line_number":24392,"context_line":"            [{\"dev\":\"namespace0.0\","}],"source_content_type":"text/x-python","patch_set":36,"id":"5faad753_43c554f0","line":24389,"updated":"2019-09-12 20:29:14.000000000","message":"✔","commit_id":"ae7680d8f4c35421b82ca998f36ee98bacf4ca2f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"98496ea1ce09795d8bdd8d87c01af6073cb7e8db","unresolved":false,"context_lines":[{"line_number":24476,"context_line":""},{"line_number":24477,"context_line":"    @mock.patch(\u0027nova.virt.hardware.get_vpmems\u0027)"},{"line_number":24478,"context_line":"    def test_get_ordered_vpmems(self, mock_labels):"},{"line_number":24479,"context_line":"        # get orgered vpmems based on flavor extra_specs"},{"line_number":24480,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":24481,"context_line":"        drvr._vpmems_by_name \u003d {\u0027ns_0\u0027: self.vpmem_0,"},{"line_number":24482,"context_line":"                                \u0027ns_1\u0027: self.vpmem_1,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5faad753_a3b3e897","line":24479,"range":{"start_line":24479,"start_character":14,"end_line":24479,"end_character":21},"updated":"2019-09-12 20:29:14.000000000","message":"ordered","commit_id":"ae7680d8f4c35421b82ca998f36ee98bacf4ca2f"}],"nova/virt/hardware.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bc00b231705db07e5c367d0dafbb23144139f1f5","unresolved":false,"context_lines":[{"line_number":1931,"context_line":"    return objects.NUMATopology(cells\u003dcells)"},{"line_number":1932,"context_line":""},{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"def get_vpmems(flavor):"},{"line_number":1935,"context_line":"    \"\"\"Return vpmems related to input request."},{"line_number":1936,"context_line":""},{"line_number":1937,"context_line":"    :param flavor: a flavor object to read extra specs from"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_6d02f0bc","line":1934,"updated":"2019-08-28 07:34:45.000000000","message":"you can put the order thing to next patch also, then you won\u0027t have this empty method.","commit_id":"cccbaa1d1b301811640d5184921a1006904eefb0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[{"line_number":1936,"context_line":""},{"line_number":1937,"context_line":"    :param flavor: a flavor object to read extra specs from"},{"line_number":1938,"context_line":"    :returns: a vpmem label list"},{"line_number":1939,"context_line":"    \"\"\""},{"line_number":1940,"context_line":"    return []"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_fe6f33c1","line":1939,"updated":"2019-08-30 20:49:36.000000000","message":"Guess you\u0027re planning to do this in the next patch.\n\nNot sure if that\u0027s the right staging, but if it is, this needs to at least have a TODO.","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"deb8bf1b0fe34a7c100cfdf242131b7cde8dadf1","unresolved":false,"context_lines":[{"line_number":1936,"context_line":""},{"line_number":1937,"context_line":"    :param flavor: a flavor object to read extra specs from"},{"line_number":1938,"context_line":"    :returns: a vpmem label list"},{"line_number":1939,"context_line":"    \"\"\""},{"line_number":1940,"context_line":"    return []"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_4008d67e","line":1939,"in_reply_to":"7faddb67_fe6f33c1","updated":"2019-09-02 13:02:05.000000000","message":"Done","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7ff9207525a511808954fda7ce659330b68cc4a5","unresolved":false,"context_lines":[{"line_number":2069,"context_line":"            id\u003d0,"},{"line_number":2070,"context_line":"            cpuset\u003dset(range(flavor.vcpus)),"},{"line_number":2071,"context_line":"            memory\u003dflavor.memory_mb,"},{"line_number":2072,"context_line":"            cpu_policy\u003dcpu_policy,"},{"line_number":2073,"context_line":"            cpu_thread_policy\u003dcpu_thread_policy)"},{"line_number":2074,"context_line":"    numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":2075,"context_line":"    return numa_topology"}],"source_content_type":"text/x-python","patch_set":27,"id":"5faad753_54ed3e23","line":2072,"updated":"2019-09-11 08:25:27.000000000","message":"I think we can just set this as None. Then it will be going to shared policy.","commit_id":"a5d25b8cc89723375cb4c64943206c94d4ecf0da"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"dfffb1e2da1b5bbec5830c85f094ee9b90a35461","unresolved":false,"context_lines":[{"line_number":2069,"context_line":"            id\u003d0,"},{"line_number":2070,"context_line":"            cpuset\u003dset(range(flavor.vcpus)),"},{"line_number":2071,"context_line":"            memory\u003dflavor.memory_mb,"},{"line_number":2072,"context_line":"            cpu_policy\u003dcpu_policy,"},{"line_number":2073,"context_line":"            cpu_thread_policy\u003dcpu_thread_policy)"},{"line_number":2074,"context_line":"    numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":2075,"context_line":"    return numa_topology"}],"source_content_type":"text/x-python","patch_set":27,"id":"5faad753_4b6115a9","line":2072,"in_reply_to":"5faad753_54ed3e23","updated":"2019-09-11 11:42:18.000000000","message":"Done","commit_id":"a5d25b8cc89723375cb4c64943206c94d4ecf0da"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7ff9207525a511808954fda7ce659330b68cc4a5","unresolved":false,"context_lines":[{"line_number":2070,"context_line":"            cpuset\u003dset(range(flavor.vcpus)),"},{"line_number":2071,"context_line":"            memory\u003dflavor.memory_mb,"},{"line_number":2072,"context_line":"            cpu_policy\u003dcpu_policy,"},{"line_number":2073,"context_line":"            cpu_thread_policy\u003dcpu_thread_policy)"},{"line_number":2074,"context_line":"    numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":2075,"context_line":"    return numa_topology"},{"line_number":2076,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5faad753_945096d6","line":2073,"range":{"start_line":2073,"start_character":30,"end_line":2073,"end_character":47},"updated":"2019-09-11 08:25:27.000000000","message":"ditto","commit_id":"a5d25b8cc89723375cb4c64943206c94d4ecf0da"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"dfffb1e2da1b5bbec5830c85f094ee9b90a35461","unresolved":false,"context_lines":[{"line_number":2070,"context_line":"            cpuset\u003dset(range(flavor.vcpus)),"},{"line_number":2071,"context_line":"            memory\u003dflavor.memory_mb,"},{"line_number":2072,"context_line":"            cpu_policy\u003dcpu_policy,"},{"line_number":2073,"context_line":"            cpu_thread_policy\u003dcpu_thread_policy)"},{"line_number":2074,"context_line":"    numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":2075,"context_line":"    return numa_topology"},{"line_number":2076,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5faad753_6b6411ba","line":2073,"range":{"start_line":2073,"start_character":30,"end_line":2073,"end_character":47},"in_reply_to":"5faad753_945096d6","updated":"2019-09-11 11:42:18.000000000","message":"Done","commit_id":"a5d25b8cc89723375cb4c64943206c94d4ecf0da"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dfba08302fb550a6138c23f1dc6b16e6f860909b","unresolved":false,"context_lines":[{"line_number":2067,"context_line":""},{"line_number":2068,"context_line":"    return objects.NUMATopology(cells\u003dcells)"},{"line_number":2069,"context_line":""},{"line_number":2070,"context_line":""},{"line_number":2071,"context_line":"def get_guest_numa(flavor):"},{"line_number":2072,"context_line":"    single_cell \u003d objects.InstanceNUMACell("},{"line_number":2073,"context_line":"            id\u003d0,"},{"line_number":2074,"context_line":"            cpuset\u003dset(range(flavor.vcpus)),"},{"line_number":2075,"context_line":"            memory\u003dflavor.memory_mb,"},{"line_number":2076,"context_line":"            cpu_policy\u003dNone,"},{"line_number":2077,"context_line":"            cpu_thread_policy\u003dNone)"},{"line_number":2078,"context_line":"    numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":2079,"context_line":"    return numa_topology"},{"line_number":2080,"context_line":""},{"line_number":2081,"context_line":""},{"line_number":2082,"context_line":"def get_vpmems(flavor):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5faad753_999e7952","line":2079,"range":{"start_line":2070,"start_character":0,"end_line":2079,"end_character":24},"updated":"2019-09-11 23:10:55.000000000","message":"This needs to die","commit_id":"2de971dc1c9be8efb140870fbda556ba6ff1f46b"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"5f88a39d8f0b2fedc1e49dd3b14301aaf244d021","unresolved":false,"context_lines":[{"line_number":2067,"context_line":""},{"line_number":2068,"context_line":"    return objects.NUMATopology(cells\u003dcells)"},{"line_number":2069,"context_line":""},{"line_number":2070,"context_line":""},{"line_number":2071,"context_line":"def get_guest_numa(flavor):"},{"line_number":2072,"context_line":"    single_cell \u003d objects.InstanceNUMACell("},{"line_number":2073,"context_line":"            id\u003d0,"},{"line_number":2074,"context_line":"            cpuset\u003dset(range(flavor.vcpus)),"},{"line_number":2075,"context_line":"            memory\u003dflavor.memory_mb,"},{"line_number":2076,"context_line":"            cpu_policy\u003dNone,"},{"line_number":2077,"context_line":"            cpu_thread_policy\u003dNone)"},{"line_number":2078,"context_line":"    numa_topology \u003d objects.InstanceNUMATopology(cells\u003d[single_cell])"},{"line_number":2079,"context_line":"    return numa_topology"},{"line_number":2080,"context_line":""},{"line_number":2081,"context_line":""},{"line_number":2082,"context_line":"def get_vpmems(flavor):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5faad753_28accc32","line":2079,"range":{"start_line":2070,"start_character":0,"end_line":2079,"end_character":24},"in_reply_to":"5faad753_999e7952","updated":"2019-09-12 03:14:36.000000000","message":"yeah, I forgot to remove this.","commit_id":"2de971dc1c9be8efb140870fbda556ba6ff1f46b"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"904de06f454a7d613018452620afcfb58846fa50","unresolved":false,"context_lines":[{"line_number":3166,"context_line":"        return root"},{"line_number":3167,"context_line":""},{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"class LibvirtConfigGuestVPMEM(LibvirtConfigGuestDevice):"},{"line_number":3170,"context_line":"    def __init__(self, **kwargs):"},{"line_number":3171,"context_line":"        super(LibvirtConfigGuestVPMEM, self).__init__("},{"line_number":3172,"context_line":"            root_name\u003d\"memory\", **kwargs)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_db12cd58","line":3169,"range":{"start_line":3169,"start_character":6,"end_line":3169,"end_character":29},"updated":"2019-09-10 15:09:16.000000000","message":"i probably would have created a generic memory device and then subclasses it for PMEM but i guess we can do that refactoring when we need generic memory devices.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"fe7b67cd523016e39296220e94c7a3749863390c","unresolved":false,"context_lines":[{"line_number":3166,"context_line":"        return root"},{"line_number":3167,"context_line":""},{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"class LibvirtConfigGuestVPMEM(LibvirtConfigGuestDevice):"},{"line_number":3170,"context_line":"    def __init__(self, **kwargs):"},{"line_number":3171,"context_line":"        super(LibvirtConfigGuestVPMEM, self).__init__("},{"line_number":3172,"context_line":"            root_name\u003d\"memory\", **kwargs)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_06cd54b7","line":3169,"range":{"start_line":3169,"start_character":6,"end_line":3169,"end_character":29},"in_reply_to":"5faad753_db12cd58","updated":"2019-09-11 17:08:49.000000000","message":"yes, agree","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"904de06f454a7d613018452620afcfb58846fa50","unresolved":false,"context_lines":[{"line_number":3172,"context_line":"            root_name\u003d\"memory\", **kwargs)"},{"line_number":3173,"context_line":""},{"line_number":3174,"context_line":"        self.model \u003d \"nvdimm\""},{"line_number":3175,"context_line":"        self.access \u003d \"shared\""},{"line_number":3176,"context_line":"        self.source_path \u003d kwargs.get(\"devpath\", \"\")"},{"line_number":3177,"context_line":"        self.align_size \u003d kwargs.get(\"align_kb\", 0)"},{"line_number":3178,"context_line":"        self.pmem \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_e0ca7718","line":3175,"range":{"start_line":3175,"start_character":8,"end_line":3175,"end_character":30},"updated":"2019-09-10 15:09:16.000000000","message":"i dont think this is strictly needed but it will proably be what most people want so it makes sense to follow the path of hupgepages and file backed memory that also hard-code shared.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"11af0c40bfdca9140d3e9337cc55356cd2db6cac","unresolved":false,"context_lines":[{"line_number":3172,"context_line":"            root_name\u003d\"memory\", **kwargs)"},{"line_number":3173,"context_line":""},{"line_number":3174,"context_line":"        self.model \u003d \"nvdimm\""},{"line_number":3175,"context_line":"        self.access \u003d \"shared\""},{"line_number":3176,"context_line":"        self.source_path \u003d kwargs.get(\"devpath\", \"\")"},{"line_number":3177,"context_line":"        self.align_size \u003d kwargs.get(\"align_kb\", 0)"},{"line_number":3178,"context_line":"        self.pmem \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_b3ccb6bc","line":3175,"range":{"start_line":3175,"start_character":8,"end_line":3175,"end_character":30},"in_reply_to":"5faad753_46d34c61","updated":"2019-09-11 20:35:34.000000000","message":"https://github.com/qemu/qemu/blob/master/docs/nvdimm.txt#L158","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"fe7b67cd523016e39296220e94c7a3749863390c","unresolved":false,"context_lines":[{"line_number":3172,"context_line":"            root_name\u003d\"memory\", **kwargs)"},{"line_number":3173,"context_line":""},{"line_number":3174,"context_line":"        self.model \u003d \"nvdimm\""},{"line_number":3175,"context_line":"        self.access \u003d \"shared\""},{"line_number":3176,"context_line":"        self.source_path \u003d kwargs.get(\"devpath\", \"\")"},{"line_number":3177,"context_line":"        self.align_size \u003d kwargs.get(\"align_kb\", 0)"},{"line_number":3178,"context_line":"        self.pmem \u003d True"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_46d34c61","line":3175,"range":{"start_line":3175,"start_character":8,"end_line":3175,"end_character":30},"in_reply_to":"5faad753_e0ca7718","updated":"2019-09-11 17:08:49.000000000","message":"it is required, but why .... I\u0027m losing my memory...\nI have confirmed with virtualization team before.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"904de06f454a7d613018452620afcfb58846fa50","unresolved":false,"context_lines":[{"line_number":3174,"context_line":"        self.model \u003d \"nvdimm\""},{"line_number":3175,"context_line":"        self.access \u003d \"shared\""},{"line_number":3176,"context_line":"        self.source_path \u003d kwargs.get(\"devpath\", \"\")"},{"line_number":3177,"context_line":"        self.align_size \u003d kwargs.get(\"align_kb\", 0)"},{"line_number":3178,"context_line":"        self.pmem \u003d True"},{"line_number":3179,"context_line":""},{"line_number":3180,"context_line":"        self.target_size \u003d kwargs.get(\"size_kb\", 0) - self.align_size"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_608447b2","line":3177,"range":{"start_line":3177,"start_character":9,"end_line":3177,"end_character":51},"updated":"2019-09-10 15:09:16.000000000","message":"ok so as noted this is in kibibytes so  we dont need to specfy the unit on the xml element although explicitly setting to  unit\u003d\u0027KiB\u0027 would not hurt.\n\nthis is correct however","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"904de06f454a7d613018452620afcfb58846fa50","unresolved":false,"context_lines":[{"line_number":3177,"context_line":"        self.align_size \u003d kwargs.get(\"align_kb\", 0)"},{"line_number":3178,"context_line":"        self.pmem \u003d True"},{"line_number":3179,"context_line":""},{"line_number":3180,"context_line":"        self.target_size \u003d kwargs.get(\"size_kb\", 0) - self.align_size"},{"line_number":3181,"context_line":"        self.target_node \u003d 0"},{"line_number":3182,"context_line":"        self.label_size \u003d 2 * units.Ki"},{"line_number":3183,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_7b5cfa7d","line":3180,"range":{"start_line":3180,"start_character":8,"end_line":3180,"end_character":69},"updated":"2019-09-10 15:09:16.000000000","message":"this wont guarantee this is a multiple of the alignment in the general case but as mentioned on irc we are relying on the fact that ndctl will return a size that is always a multiple of the alignment.\n\ncan you add a comment stating that\n\nalso you mentioned that we are doing this to make room for the lable.\n\nif we want to be fully corerct we should also be checking that he lable is smaller then the alingment.\nthe lable is being hardcoded to 2 KBs\nso it will always be smaller in pratice then the alignment.\n\nso ill leave that up to other to decided if we shoudl add a check and raise a value error or not.\nits probably overkill.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":3177,"context_line":"        self.align_size \u003d kwargs.get(\"align_kb\", 0)"},{"line_number":3178,"context_line":"        self.pmem \u003d True"},{"line_number":3179,"context_line":""},{"line_number":3180,"context_line":"        self.target_size \u003d kwargs.get(\"size_kb\", 0) - self.align_size"},{"line_number":3181,"context_line":"        self.target_node \u003d 0"},{"line_number":3182,"context_line":"        self.label_size \u003d 2 * units.Ki"},{"line_number":3183,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_a9bf7af9","line":3180,"range":{"start_line":3180,"start_character":8,"end_line":3180,"end_character":69},"in_reply_to":"5faad753_7b5cfa7d","updated":"2019-09-11 08:13:45.000000000","message":"Sorry for misleading, my mistake. I forgot some important things.\n\nThe size return from ndctl already subtract the alignsize. It\u0027s to say, when create a 4096MB namespace (with 2MB alignment), we will get 4094MB from ndctl. It\u0027s not relavant to label. It\u0027s because \u0027devdax\u0027 mode require a portion of the namespace capacity to be reserved for metadata. see https://github.com/pmem/ndctl/issues/79.\n\nThe namespace label area is a small persistent partition of capacity available on some NVDIMM devices. The label area is used to resolve aliasing between pmem and blk capacity by delineating namespace boundaries. The label size is used by QEMU to create a label area in vpmem I think. For now, we don\u0027t support label size configuration in Nova.\nsee https://pmem.io/ndctl/ndctl-write-labels.html\n\nIn a word, it\u0027s no need to subtract the alignsize again. I tested the new code without subtracting, it works well.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bf40af59c3d5f9ad1699caa08ec40c085948dc8","unresolved":false,"context_lines":[{"line_number":2546,"context_line":"        self.uuid \u003d None"},{"line_number":2547,"context_line":"        self.name \u003d None"},{"line_number":2548,"context_line":"        self.memory \u003d 500 * units.Mi"},{"line_number":2549,"context_line":"        self.max_memory_size \u003d None"},{"line_number":2550,"context_line":"        self.max_memory_slots \u003d 0"},{"line_number":2551,"context_line":"        self.membacking \u003d None"},{"line_number":2552,"context_line":"        self.memtune \u003d None"},{"line_number":2553,"context_line":"        self.numatune \u003d None"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_648f7623","line":2550,"range":{"start_line":2549,"start_character":0,"end_line":2550,"end_character":33},"updated":"2019-09-10 16:58:25.000000000","message":"What\u0027s this for? A comment in the commit message would be really helpful. Consider splitting it out to a separate patch","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dfba08302fb550a6138c23f1dc6b16e6f860909b","unresolved":false,"context_lines":[{"line_number":2546,"context_line":"        self.uuid \u003d None"},{"line_number":2547,"context_line":"        self.name \u003d None"},{"line_number":2548,"context_line":"        self.memory \u003d 500 * units.Mi"},{"line_number":2549,"context_line":"        self.max_memory_size \u003d None"},{"line_number":2550,"context_line":"        self.max_memory_slots \u003d 0"},{"line_number":2551,"context_line":"        self.membacking \u003d None"},{"line_number":2552,"context_line":"        self.memtune \u003d None"},{"line_number":2553,"context_line":"        self.numatune \u003d None"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_d9b5d1ce","line":2550,"range":{"start_line":2549,"start_character":0,"end_line":2550,"end_character":33},"in_reply_to":"5faad753_0ecc945f","updated":"2019-09-11 23:10:55.000000000","message":"Okay, can you provide a little context in the commit message.\n\n  We modify the root \u003cdomain\u003e element generated for libvirt to\n  include \u003cmaxMemory\u003e elements, which are required when a\n  memory backing device is used.","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":2546,"context_line":"        self.uuid \u003d None"},{"line_number":2547,"context_line":"        self.name \u003d None"},{"line_number":2548,"context_line":"        self.memory \u003d 500 * units.Mi"},{"line_number":2549,"context_line":"        self.max_memory_size \u003d None"},{"line_number":2550,"context_line":"        self.max_memory_slots \u003d 0"},{"line_number":2551,"context_line":"        self.membacking \u003d None"},{"line_number":2552,"context_line":"        self.memtune \u003d None"},{"line_number":2553,"context_line":"        self.numatune \u003d None"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_0ecc945f","line":2550,"range":{"start_line":2549,"start_character":0,"end_line":2550,"end_character":33},"in_reply_to":"5faad753_648f7623","updated":"2019-09-11 08:13:45.000000000","message":"have some comments here:\nhttps://review.opendev.org/#/c/678455/25/nova/virt/libvirt/driver.py@5614\n\nI would like to keep it in this patch, it\u0027s too small, and I use it in this patch.","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"5f88a39d8f0b2fedc1e49dd3b14301aaf244d021","unresolved":false,"context_lines":[{"line_number":2546,"context_line":"        self.uuid \u003d None"},{"line_number":2547,"context_line":"        self.name \u003d None"},{"line_number":2548,"context_line":"        self.memory \u003d 500 * units.Mi"},{"line_number":2549,"context_line":"        self.max_memory_size \u003d None"},{"line_number":2550,"context_line":"        self.max_memory_slots \u003d 0"},{"line_number":2551,"context_line":"        self.membacking \u003d None"},{"line_number":2552,"context_line":"        self.memtune \u003d None"},{"line_number":2553,"context_line":"        self.numatune \u003d None"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_4b182274","line":2550,"range":{"start_line":2549,"start_character":0,"end_line":2550,"end_character":33},"in_reply_to":"5faad753_d9b5d1ce","updated":"2019-09-12 03:14:36.000000000","message":"Okay, in case of you not noticed, the \u003cmaxMemory\u003e  element will not generated if we have no vpmems.","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8446074011ca91d737afad3fdf12e7233ef78f55","unresolved":false,"context_lines":[{"line_number":3167,"context_line":"        return root"},{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":""},{"line_number":3170,"context_line":"class LibvirtConfigGuestVPMEM(LibvirtConfigGuestDevice):"},{"line_number":3171,"context_line":"    def __init__(self, **kwargs):"},{"line_number":3172,"context_line":"        super(LibvirtConfigGuestVPMEM, self).__init__("},{"line_number":3173,"context_line":"            root_name\u003d\"memory\", **kwargs)"}],"source_content_type":"text/x-python","patch_set":36,"id":"5faad753_54a755a8","line":3170,"updated":"2019-09-12 20:26:36.000000000","message":"As Sean noted previously, it would be good to have a more generic memory backing element parent for this to inherit from, but it\u0027s an easy follow-up for later","commit_id":"ae7680d8f4c35421b82ca998f36ee98bacf4ca2f"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bc00b231705db07e5c367d0dafbb23144139f1f5","unresolved":false,"context_lines":[{"line_number":5556,"context_line":"                    break"},{"line_number":5557,"context_line":"        return ordered_vpmems"},{"line_number":5558,"context_line":""},{"line_number":5559,"context_line":"    def _get_vpmems(self, instance, prefix\u003dNone):"},{"line_number":5560,"context_line":"        vpmems \u003d []"},{"line_number":5561,"context_line":"        resources \u003d instance.resources"},{"line_number":5562,"context_line":"        if prefix \u003d\u003d \u0027old\u0027 and instance.migration_context:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_4d41340a","line":5559,"range":{"start_line":5559,"start_character":8,"end_line":5559,"end_character":49},"updated":"2019-08-28 07:34:45.000000000","message":"I would prefer to make this method more generic, like _get_resource_for_instance(self, resources, rc_prefix)","commit_id":"cccbaa1d1b301811640d5184921a1006904eefb0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ca844dcf11c211e9bb1716cb026f84b01be25bc4","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1283,"context_line":"            except Exception as e:"},{"line_number":1284,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1285,"context_line":"                                                   error\u003de)"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"},{"line_number":1288,"context_line":"        \"\"\"Detaches encrypted volumes attached to instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_7eb02341","line":1285,"updated":"2019-08-30 20:49:36.000000000","message":"Is this going to blow up the compute service? That would be a bit extreme.\n\nBut if a vpmem cleanup has failed, we should take it out of the list of available vpmems.\n\nAlso, this will bail on the first failure, which is probably not what we want.\n\nI guess it depends on how the cleanup command failed. If the daxio command doesn\u0027t exist, they\u0027re all going to fail anyway, huh?\n\nBut I don\u0027t think we should go to the trouble of trying to figure that out. We just need to try them all and react appropriately for each failure.","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"deb8bf1b0fe34a7c100cfdf242131b7cde8dadf1","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1283,"context_line":"            except Exception as e:"},{"line_number":1284,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1285,"context_line":"                                                   error\u003de)"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"},{"line_number":1288,"context_line":"        \"\"\"Detaches encrypted volumes attached to instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_605b9285","line":1285,"in_reply_to":"7faddb67_7eb02341","updated":"2019-09-02 13:02:05.000000000","message":"It won\u0027t blow up the compute service, if this failed, we just got a error instance.\nBesides, maybe cleanup all unassigned vpmems is not very necessary if we can clean up the vpmem correctly each time, such as destroy or revert/confirm resize.","commit_id":"48b124541e6bf3f0964e9e8557f54fc9593afc6e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c78605651b9f23bc8b76f41bcdbacffbb3e4167b","unresolved":false,"context_lines":[{"line_number":1194,"context_line":"    def cleanup(self, context, instance, network_info, block_device_info\u003dNone,"},{"line_number":1195,"context_line":"                destroy_disks\u003dTrue, migrate_data\u003dNone, destroy_vifs\u003dTrue):"},{"line_number":1196,"context_line":"        # zero the data on backend pmem device"},{"line_number":1197,"context_line":"        vpmems \u003d self._get_vpmems(instance)"},{"line_number":1198,"context_line":"        if vpmems:"},{"line_number":1199,"context_line":"            self._cleanup_vpmems(vpmems)"},{"line_number":1200,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_874a2b24","line":1197,"updated":"2019-09-05 06:09:30.000000000","message":"do you have unittest cover this path?","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"f97fb03d4e30d3bbd2dc4a836ae061e2f8051308","unresolved":false,"context_lines":[{"line_number":1194,"context_line":"    def cleanup(self, context, instance, network_info, block_device_info\u003dNone,"},{"line_number":1195,"context_line":"                destroy_disks\u003dTrue, migrate_data\u003dNone, destroy_vifs\u003dTrue):"},{"line_number":1196,"context_line":"        # zero the data on backend pmem device"},{"line_number":1197,"context_line":"        vpmems \u003d self._get_vpmems(instance)"},{"line_number":1198,"context_line":"        if vpmems:"},{"line_number":1199,"context_line":"            self._cleanup_vpmems(vpmems)"},{"line_number":1200,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_98f36ce7","line":1197,"in_reply_to":"7faddb67_874a2b24","updated":"2019-09-05 09:09:58.000000000","message":"I think there are many testcases covering the cleanup method. So i guess I just need add tests for _get_vpmems\n, _cleanup_vpmems, and _get_ordered_vpmems, right?","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c78605651b9f23bc8b76f41bcdbacffbb3e4167b","unresolved":false,"context_lines":[{"line_number":1296,"context_line":"            try:"},{"line_number":1297,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1298,"context_line":"            except Exception as e:"},{"line_number":1299,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1300,"context_line":"                                                   error\u003de)"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_674b6f27","line":1299,"updated":"2019-09-05 06:09:30.000000000","message":"I didn\u0027t see unittest cover this also.","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"15db73dec45a8ad0a960a16cbb3a17fb27654566","unresolved":false,"context_lines":[{"line_number":1296,"context_line":"            try:"},{"line_number":1297,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1298,"context_line":"            except Exception as e:"},{"line_number":1299,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1300,"context_line":"                                                   error\u003de)"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_42dadee8","line":1299,"in_reply_to":"7faddb67_674b6f27","updated":"2019-09-05 10:37:00.000000000","message":"Done","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c78605651b9f23bc8b76f41bcdbacffbb3e4167b","unresolved":false,"context_lines":[{"line_number":1395,"context_line":"        # zero the data on backend old pmem device"},{"line_number":1396,"context_line":"        vpmems \u003d self._get_vpmems(instance, prefix\u003d\u0027old\u0027)"},{"line_number":1397,"context_line":"        if vpmems:"},{"line_number":1398,"context_line":"            self._cleanup_vpmems(vpmems)"},{"line_number":1399,"context_line":""},{"line_number":1400,"context_line":"        # Deletion can fail over NFS, so retry the deletion as required."},{"line_number":1401,"context_line":"        # Set maximum attempt as 5, most test can remove the directory"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_276337b3","line":1398,"updated":"2019-09-05 06:09:30.000000000","message":"ditto","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"4cadfc166e4e2bdef09489340ac00972e20c4704","unresolved":false,"context_lines":[{"line_number":5449,"context_line":"        inst_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":5450,"context_line":"        disk_mapping \u003d disk_info[\u0027mapping\u0027]"},{"line_number":5451,"context_line":"        vpmems \u003d self._get_ordered_vpmems(instance, flavor)"},{"line_number":5452,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5453,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5454,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5455,"context_line":"                    flavor, image_meta)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_676e0f65","line":5452,"updated":"2019-09-05 06:22:38.000000000","message":"also need test for this case.","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"f97fb03d4e30d3bbd2dc4a836ae061e2f8051308","unresolved":false,"context_lines":[{"line_number":5449,"context_line":"        inst_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":5450,"context_line":"        disk_mapping \u003d disk_info[\u0027mapping\u0027]"},{"line_number":5451,"context_line":"        vpmems \u003d self._get_ordered_vpmems(instance, flavor)"},{"line_number":5452,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5453,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5454,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5455,"context_line":"                    flavor, image_meta)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_b80ae8cd","line":5452,"in_reply_to":"7faddb67_676e0f65","updated":"2019-09-05 09:09:58.000000000","message":"already have one","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c78605651b9f23bc8b76f41bcdbacffbb3e4167b","unresolved":false,"context_lines":[{"line_number":5568,"context_line":""},{"line_number":5569,"context_line":"        return guest"},{"line_number":5570,"context_line":""},{"line_number":5571,"context_line":"    def _get_ordered_vpmems(self, instance, flavor):"},{"line_number":5572,"context_line":"        ordered_vpmems \u003d []"},{"line_number":5573,"context_line":"        vpmems \u003d self._get_vpmems(instance)"},{"line_number":5574,"context_line":"        labels \u003d hardware.get_vpmems(flavor)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_a76e4793","line":5571,"updated":"2019-09-05 06:09:30.000000000","message":"also didn\u0027t see the test for this.","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"15db73dec45a8ad0a960a16cbb3a17fb27654566","unresolved":false,"context_lines":[{"line_number":5568,"context_line":""},{"line_number":5569,"context_line":"        return guest"},{"line_number":5570,"context_line":""},{"line_number":5571,"context_line":"    def _get_ordered_vpmems(self, instance, flavor):"},{"line_number":5572,"context_line":"        ordered_vpmems \u003d []"},{"line_number":5573,"context_line":"        vpmems \u003d self._get_vpmems(instance)"},{"line_number":5574,"context_line":"        labels \u003d hardware.get_vpmems(flavor)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_02e06696","line":5571,"in_reply_to":"7faddb67_a76e4793","updated":"2019-09-05 10:37:00.000000000","message":"Done","commit_id":"35aa950977a6e63a561a6a205ec8a43b9e8f2e40"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1090d624d1eeeb5f0813d19c713dee2718d09c58","unresolved":false,"context_lines":[{"line_number":4664,"context_line":"        if not topology:"},{"line_number":4665,"context_line":"            # No NUMA topology defined for host - This will only happen with"},{"line_number":4666,"context_line":"            # some libvirt versions and certain platforms."},{"line_number":4667,"context_line":"            return GuestNumaConfig(allowed_cpus, None,"},{"line_number":4668,"context_line":"                                   guest_cpu_numa_config, None)"},{"line_number":4669,"context_line":""},{"line_number":4670,"context_line":"        # Now get configuration from the numa_topology"},{"line_number":4671,"context_line":"        # Init CPUTune configuration"}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_32a9ed7a","line":4668,"range":{"start_line":4667,"start_character":12,"end_line":4668,"end_character":63},"updated":"2019-09-09 03:48:20.000000000","message":"For instance has vpmem, but no NUMA. we create a guest numa for instance, but we don\u0027t want to bind this guest NUMA node to any specific host numa. So we should return at here. You can add a flag to this method, when this host has host numa topology but that flag is true, we return at here also.","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"b01ad9b889d5ceadac3b8552dec1a454a15c79a2","unresolved":false,"context_lines":[{"line_number":4664,"context_line":"        if not topology:"},{"line_number":4665,"context_line":"            # No NUMA topology defined for host - This will only happen with"},{"line_number":4666,"context_line":"            # some libvirt versions and certain platforms."},{"line_number":4667,"context_line":"            return GuestNumaConfig(allowed_cpus, None,"},{"line_number":4668,"context_line":"                                   guest_cpu_numa_config, None)"},{"line_number":4669,"context_line":""},{"line_number":4670,"context_line":"        # Now get configuration from the numa_topology"},{"line_number":4671,"context_line":"        # Init CPUTune configuration"}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_554a5327","line":4668,"range":{"start_line":4667,"start_character":12,"end_line":4668,"end_character":63},"in_reply_to":"5faad753_32a9ed7a","updated":"2019-09-09 05:46:17.000000000","message":"Done","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1090d624d1eeeb5f0813d19c713dee2718d09c58","unresolved":false,"context_lines":[{"line_number":4706,"context_line":"            # set CPUTune for the cell"},{"line_number":4707,"context_line":"            object_numa_cell \u003d instance_numa_topology.cells[guest_node_id]"},{"line_number":4708,"context_line":"            for cpu in guest_config_cell.cpus:"},{"line_number":4709,"context_line":"                pin_cpuset \u003d self._get_pin_cpuset(cpu, object_numa_cell,"},{"line_number":4710,"context_line":"                                                  host_cell)"},{"line_number":4711,"context_line":"                guest_cpu_tune.vcpupin.append(pin_cpuset)"},{"line_number":4712,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_f2bcb5bc","line":4709,"updated":"2019-09-09 03:48:20.000000000","message":"We don\u0027t want to pin this instance to any host topology, so we shouldn\u0027t go to this path.","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"b01ad9b889d5ceadac3b8552dec1a454a15c79a2","unresolved":false,"context_lines":[{"line_number":4706,"context_line":"            # set CPUTune for the cell"},{"line_number":4707,"context_line":"            object_numa_cell \u003d instance_numa_topology.cells[guest_node_id]"},{"line_number":4708,"context_line":"            for cpu in guest_config_cell.cpus:"},{"line_number":4709,"context_line":"                pin_cpuset \u003d self._get_pin_cpuset(cpu, object_numa_cell,"},{"line_number":4710,"context_line":"                                                  host_cell)"},{"line_number":4711,"context_line":"                guest_cpu_tune.vcpupin.append(pin_cpuset)"},{"line_number":4712,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_3551d7d9","line":4709,"in_reply_to":"5faad753_f2bcb5bc","updated":"2019-09-09 05:46:17.000000000","message":"Done","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1090d624d1eeeb5f0813d19c713dee2718d09c58","unresolved":false,"context_lines":[{"line_number":5448,"context_line":"        inst_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":5449,"context_line":"        disk_mapping \u003d disk_info[\u0027mapping\u0027]"},{"line_number":5450,"context_line":"        vpmems \u003d self._get_ordered_vpmems(instance, flavor)"},{"line_number":5451,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5452,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5453,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5454,"context_line":"                    flavor, image_meta)"},{"line_number":5455,"context_line":""},{"line_number":5456,"context_line":"        virt_type \u003d CONF.libvirt.virt_type"},{"line_number":5457,"context_line":"        guest \u003d vconfig.LibvirtConfigGuest()"}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_f28ef52c","line":5454,"range":{"start_line":5451,"start_character":8,"end_line":5454,"end_character":39},"updated":"2019-09-09 03:48:20.000000000","message":"If you do a respin, it will be great to add comment to explan what is this case about","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"b01ad9b889d5ceadac3b8552dec1a454a15c79a2","unresolved":false,"context_lines":[{"line_number":5448,"context_line":"        inst_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":5449,"context_line":"        disk_mapping \u003d disk_info[\u0027mapping\u0027]"},{"line_number":5450,"context_line":"        vpmems \u003d self._get_ordered_vpmems(instance, flavor)"},{"line_number":5451,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5452,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5453,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5454,"context_line":"                    flavor, image_meta)"},{"line_number":5455,"context_line":""},{"line_number":5456,"context_line":"        virt_type \u003d CONF.libvirt.virt_type"},{"line_number":5457,"context_line":"        guest \u003d vconfig.LibvirtConfigGuest()"}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_f2f4b55d","line":5454,"range":{"start_line":5451,"start_character":8,"end_line":5454,"end_character":39},"in_reply_to":"5faad753_f28ef52c","updated":"2019-09-09 05:46:17.000000000","message":"Done","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"b01ad9b889d5ceadac3b8552dec1a454a15c79a2","unresolved":false,"context_lines":[{"line_number":5448,"context_line":"        inst_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":5449,"context_line":"        disk_mapping \u003d disk_info[\u0027mapping\u0027]"},{"line_number":5450,"context_line":"        vpmems \u003d self._get_ordered_vpmems(instance, flavor)"},{"line_number":5451,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5452,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5453,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5454,"context_line":"                    flavor, image_meta)"},{"line_number":5455,"context_line":""},{"line_number":5456,"context_line":"        virt_type \u003d CONF.libvirt.virt_type"},{"line_number":5457,"context_line":"        guest \u003d vconfig.LibvirtConfigGuest()"}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_f5649fbb","line":5454,"range":{"start_line":5451,"start_character":8,"end_line":5454,"end_character":39},"in_reply_to":"5faad753_f28ef52c","updated":"2019-09-09 05:46:17.000000000","message":"Done","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1090d624d1eeeb5f0813d19c713dee2718d09c58","unresolved":false,"context_lines":[{"line_number":5604,"context_line":"            vpmem_config \u003d vconfig.LibvirtConfigGuestVPMEM("},{"line_number":5605,"context_line":"                devpath\u003dvpmem.devpath, size_kb\u003dsize_kb, align_kb\u003dalign_kb)"},{"line_number":5606,"context_line":""},{"line_number":5607,"context_line":"            guest.max_memory_size +\u003d size_kb"},{"line_number":5608,"context_line":"            guest.max_memory_slots +\u003d 1"},{"line_number":5609,"context_line":"            guest.add_device(vpmem_config)"},{"line_number":5610,"context_line":""},{"line_number":5611,"context_line":"    def _guest_add_mdevs(self, guest, chosen_mdevs):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_92dc6147","line":5608,"range":{"start_line":5607,"start_character":12,"end_line":5608,"end_character":39},"updated":"2019-09-09 03:48:20.000000000","message":"if you do a respin, it will be great to add some comment at here.","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"b01ad9b889d5ceadac3b8552dec1a454a15c79a2","unresolved":false,"context_lines":[{"line_number":5604,"context_line":"            vpmem_config \u003d vconfig.LibvirtConfigGuestVPMEM("},{"line_number":5605,"context_line":"                devpath\u003dvpmem.devpath, size_kb\u003dsize_kb, align_kb\u003dalign_kb)"},{"line_number":5606,"context_line":""},{"line_number":5607,"context_line":"            guest.max_memory_size +\u003d size_kb"},{"line_number":5608,"context_line":"            guest.max_memory_slots +\u003d 1"},{"line_number":5609,"context_line":"            guest.add_device(vpmem_config)"},{"line_number":5610,"context_line":""},{"line_number":5611,"context_line":"    def _guest_add_mdevs(self, guest, chosen_mdevs):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_52034943","line":5608,"range":{"start_line":5607,"start_character":12,"end_line":5608,"end_character":39},"in_reply_to":"5faad753_92dc6147","updated":"2019-09-09 05:46:17.000000000","message":"Done","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"b01ad9b889d5ceadac3b8552dec1a454a15c79a2","unresolved":false,"context_lines":[{"line_number":5604,"context_line":"            vpmem_config \u003d vconfig.LibvirtConfigGuestVPMEM("},{"line_number":5605,"context_line":"                devpath\u003dvpmem.devpath, size_kb\u003dsize_kb, align_kb\u003dalign_kb)"},{"line_number":5606,"context_line":""},{"line_number":5607,"context_line":"            guest.max_memory_size +\u003d size_kb"},{"line_number":5608,"context_line":"            guest.max_memory_slots +\u003d 1"},{"line_number":5609,"context_line":"            guest.add_device(vpmem_config)"},{"line_number":5610,"context_line":""},{"line_number":5611,"context_line":"    def _guest_add_mdevs(self, guest, chosen_mdevs):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5faad753_9559abff","line":5608,"range":{"start_line":5607,"start_character":12,"end_line":5608,"end_character":39},"in_reply_to":"5faad753_92dc6147","updated":"2019-09-09 05:46:17.000000000","message":"Done","commit_id":"911bad164422a7e2450a5a69621bfa38e6d594db"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"904de06f454a7d613018452620afcfb58846fa50","unresolved":false,"context_lines":[{"line_number":5454,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5455,"context_line":"            # if we have vpmems but no numa topology,"},{"line_number":5456,"context_line":"            # generate a numa for guest to attach vpmems"},{"line_number":5457,"context_line":"            # and do not bind host numa"},{"line_number":5458,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5459,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5460,"context_line":"                    flavor, image_meta)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_1bcce5ba","line":5457,"range":{"start_line":5457,"start_character":14,"end_line":5457,"end_character":39},"updated":"2019-09-10 15:09:16.000000000","message":"am this is not what im expecting.\n\nim expecting use to allow  the pmem to come form any host numa node but that the guest is still pinned to host numa node so it does not float.\n\ni need to check what this does.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":5454,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5455,"context_line":"            # if we have vpmems but no numa topology,"},{"line_number":5456,"context_line":"            # generate a numa for guest to attach vpmems"},{"line_number":5457,"context_line":"            # and do not bind host numa"},{"line_number":5458,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5459,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5460,"context_line":"                    flavor, image_meta)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5faad753_09232e07","line":5457,"range":{"start_line":5457,"start_character":14,"end_line":5457,"end_character":39},"in_reply_to":"5faad753_1bcce5ba","updated":"2019-09-11 08:13:45.000000000","message":"vpmems feature do not support numa affinity for now.","commit_id":"ebd1ff91d6a3e468ebc4b3fc8c93fcb01f0393a5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bf40af59c3d5f9ad1699caa08ec40c085948dc8","unresolved":false,"context_lines":[{"line_number":1294,"context_line":"        for vpmem in vpmems:"},{"line_number":1295,"context_line":"            try:"},{"line_number":1296,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1297,"context_line":"            except Exception as e:"},{"line_number":1298,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1299,"context_line":"                                                   error\u003de)"},{"line_number":1300,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_fe221701","line":1297,"range":{"start_line":1297,"start_character":19,"end_line":1297,"end_character":28},"updated":"2019-09-10 16:58:25.000000000","message":"ProcessExecutionError","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bcc69c6c5060d9a0b26fa12e53e3b42da2a3631a","unresolved":false,"context_lines":[{"line_number":1294,"context_line":"        for vpmem in vpmems:"},{"line_number":1295,"context_line":"            try:"},{"line_number":1296,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1297,"context_line":"            except Exception as e:"},{"line_number":1298,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1299,"context_line":"                                                   error\u003de)"},{"line_number":1300,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_bf147d4f","line":1297,"range":{"start_line":1297,"start_character":19,"end_line":1297,"end_character":28},"in_reply_to":"5faad753_5fe54aa7","updated":"2019-09-11 17:49:26.000000000","message":"Yeah, I wasn\u0027t clear. That\u0027s fine by me","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"fe7b67cd523016e39296220e94c7a3749863390c","unresolved":false,"context_lines":[{"line_number":1294,"context_line":"        for vpmem in vpmems:"},{"line_number":1295,"context_line":"            try:"},{"line_number":1296,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1297,"context_line":"            except Exception as e:"},{"line_number":1298,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1299,"context_line":"                                                   error\u003de)"},{"line_number":1300,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_5fe54aa7","line":1297,"range":{"start_line":1297,"start_character":19,"end_line":1297,"end_character":28},"in_reply_to":"5faad753_bf46be20","updated":"2019-09-11 17:08:49.000000000","message":"I would like just catch all possible exceptions and print them out with reraising new VPMEMCleanupFailed exception?\nIs it ok for you?","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0083fb522f7227528b1730b1810a6230f766ce71","unresolved":false,"context_lines":[{"line_number":1294,"context_line":"        for vpmem in vpmems:"},{"line_number":1295,"context_line":"            try:"},{"line_number":1296,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1297,"context_line":"            except Exception as e:"},{"line_number":1298,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1299,"context_line":"                                                   error\u003de)"},{"line_number":1300,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_bf46be20","line":1297,"range":{"start_line":1297,"start_character":19,"end_line":1297,"end_character":28},"in_reply_to":"5faad753_ce43dcae","updated":"2019-09-11 16:59:38.000000000","message":"Indeed. I meant we should catch both ProcessExecutionError and OSError","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":1294,"context_line":"        for vpmem in vpmems:"},{"line_number":1295,"context_line":"            try:"},{"line_number":1296,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1297,"context_line":"            except Exception as e:"},{"line_number":1298,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1299,"context_line":"                                                   error\u003de)"},{"line_number":1300,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_ce43dcae","line":1297,"range":{"start_line":1297,"start_character":19,"end_line":1297,"end_character":28},"in_reply_to":"5faad753_fe221701","updated":"2019-09-11 08:13:45.000000000","message":"if \u0027daxio\u0027 is not installed, will be OSError I think. Do you mean all exceptions will be catched and reraise ProcessExecutionError?","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bf40af59c3d5f9ad1699caa08ec40c085948dc8","unresolved":false,"context_lines":[{"line_number":1295,"context_line":"            try:"},{"line_number":1296,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1297,"context_line":"            except Exception as e:"},{"line_number":1298,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1299,"context_line":"                                                   error\u003de)"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"},{"line_number":1302,"context_line":"        \"\"\"Detaches encrypted volumes attached to instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_3e5f4f73","line":1299,"range":{"start_line":1298,"start_character":0,"end_line":1299,"end_character":59},"updated":"2019-09-10 16:58:25.000000000","message":"I wonder if this is the correct thing to do? As things stand, the rest of the function in \u0027_cleanup_resize\u0027 won\u0027t trigger so we\u0027ll be left with a half cleaned up instance. Is that acceptable?","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0083fb522f7227528b1730b1810a6230f766ce71","unresolved":false,"context_lines":[{"line_number":1295,"context_line":"            try:"},{"line_number":1296,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1297,"context_line":"            except Exception as e:"},{"line_number":1298,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1299,"context_line":"                                                   error\u003de)"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"},{"line_number":1302,"context_line":"        \"\"\"Detaches encrypted volumes attached to instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_bf90fe4f","line":1299,"range":{"start_line":1298,"start_character":0,"end_line":1299,"end_character":59},"in_reply_to":"5faad753_2e8390ce","updated":"2019-09-11 16:59:38.000000000","message":"But we will have stuff leaking. If we fail to detach this, we won\u0027t even try to detach anything else. However, efried notes on IRC that there are many other things already that will do this to us so this is no more broken than before","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":1295,"context_line":"            try:"},{"line_number":1296,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1297,"context_line":"            except Exception as e:"},{"line_number":1298,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1299,"context_line":"                                                   error\u003de)"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"},{"line_number":1302,"context_line":"        \"\"\"Detaches encrypted volumes attached to instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_2e8390ce","line":1299,"range":{"start_line":1298,"start_character":0,"end_line":1299,"end_character":59},"in_reply_to":"5faad753_3e5f4f73","updated":"2019-09-11 08:13:45.000000000","message":"we don\u0027t want the data leaking, so we should let the instance go to error.","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bf40af59c3d5f9ad1699caa08ec40c085948dc8","unresolved":false,"context_lines":[{"line_number":5455,"context_line":"            # if we have vpmems but no numa topology,"},{"line_number":5456,"context_line":"            # generate a numa for guest to attach vpmems"},{"line_number":5457,"context_line":"            # and do not bind host numa"},{"line_number":5458,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5459,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5460,"context_line":"                    flavor, image_meta)"},{"line_number":5461,"context_line":"            need_pin \u003d False"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_7e98671a","line":5458,"updated":"2019-09-10 16:58:25.000000000","message":"Nooooope. This is a hack and we shouldn\u0027t do it. It\u0027ll have knock on effects later if this is moved, for example. We already have this problem solved for mempages. Using an explicit mempage size (configured using the \u0027hw:mem_page_size\u0027 extra spec or \u0027hw_mem_page_size\u0027 image metadata policy) will result in us adding NUMA topology to the instance. We can just copy that pattern here.\n\nLater: We do it in \u0027nova.virt.hardware.numa_get_constraints\u0027. You\u0027ll probably want a new \u0027_get_numa_vpmem_constraint\u0027 function","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c79bdfd909ca40e1c4f700804b9ad5bdc90bb99b","unresolved":false,"context_lines":[{"line_number":5455,"context_line":"            # if we have vpmems but no numa topology,"},{"line_number":5456,"context_line":"            # generate a numa for guest to attach vpmems"},{"line_number":5457,"context_line":"            # and do not bind host numa"},{"line_number":5458,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5459,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5460,"context_line":"                    flavor, image_meta)"},{"line_number":5461,"context_line":"            need_pin \u003d False"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_3e3e6fda","line":5458,"range":{"start_line":5458,"start_character":12,"end_line":5458,"end_character":53},"updated":"2019-09-10 16:01:03.000000000","message":"This isn\u0027t right I think. I found I saw a \u0027hw:numa_nodes\u003d1\u0027 extra spec being added. But we said, we only implicit to create one for the vpmem instnace. So we shouldn\u0027t operate the instance.flavor directly at here. Also I\u0027m thinking about that can we just build a single cel numa object instead of calling the hardware.numa_get_constraints?","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"7e873b0fb0a61ce90dc3c47d67cab0bac163764f","unresolved":false,"context_lines":[{"line_number":5455,"context_line":"            # if we have vpmems but no numa topology,"},{"line_number":5456,"context_line":"            # generate a numa for guest to attach vpmems"},{"line_number":5457,"context_line":"            # and do not bind host numa"},{"line_number":5458,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5459,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5460,"context_line":"                    flavor, image_meta)"},{"line_number":5461,"context_line":"            need_pin \u003d False"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_0937aee5","line":5458,"range":{"start_line":5458,"start_character":12,"end_line":5458,"end_character":53},"in_reply_to":"5faad753_04f56283","updated":"2019-09-11 08:13:45.000000000","message":"add a new method get_guest_numa.","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1cf95fadc07e84042622ba289b48e3128a4cab24","unresolved":false,"context_lines":[{"line_number":5455,"context_line":"            # if we have vpmems but no numa topology,"},{"line_number":5456,"context_line":"            # generate a numa for guest to attach vpmems"},{"line_number":5457,"context_line":"            # and do not bind host numa"},{"line_number":5458,"context_line":"            flavor.extra_specs[\u0027hw:numa_nodes\u0027] \u003d \u00271\u0027"},{"line_number":5459,"context_line":"            numa_topology \u003d hardware.numa_get_constraints("},{"line_number":5460,"context_line":"                    flavor, image_meta)"},{"line_number":5461,"context_line":"            need_pin \u003d False"}],"source_content_type":"text/x-python","patch_set":25,"id":"5faad753_04f56283","line":5458,"range":{"start_line":5458,"start_character":12,"end_line":5458,"end_character":53},"in_reply_to":"5faad753_3e3e6fda","updated":"2019-09-10 16:58:45.000000000","message":"\u003e This isn\u0027t right I think. I found I saw a \u0027hw:numa_nodes\u003d1\u0027 extra\n \u003e spec being added. But we said, we only implicit to create one for\n \u003e the vpmem instnace. So we shouldn\u0027t operate the instance.flavor\n \u003e directly at here. Also I\u0027m thinking about that can we just build a\n \u003e single cel numa object instead of calling the hardware.numa_get_constraints?\n\nJinx :-D","commit_id":"b54e24528884ea3cc9c1914cc376431b91e8cd59"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e6bb64b9f9f141f88cc55caa91d78c16b1fb6d0f","unresolved":false,"context_lines":[{"line_number":5465,"context_line":"        need_pin \u003d True"},{"line_number":5466,"context_line":"        vpmems \u003d self._get_ordered_vpmems(instance, flavor)"},{"line_number":5467,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5468,"context_line":"            # if we have vpmems but no numa topology,"},{"line_number":5469,"context_line":"            # generate a numa for guest to attach vpmems"},{"line_number":5470,"context_line":"            # and do not bind host numa"},{"line_number":5471,"context_line":"            numa_topology \u003d hardware.get_guest_numa(flavor)"},{"line_number":5472,"context_line":"            need_pin \u003d False"},{"line_number":5473,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5faad753_1a0608d0","line":5470,"range":{"start_line":5468,"start_character":0,"end_line":5470,"end_character":39},"updated":"2019-09-11 13:02:21.000000000","message":"I don\u0027t get why we have to special case things like this. Guest NUMA topologies are mapped to host NUMA topologies on a cell by cell basis. Why can\u0027t we do the same thing here? For that matter, why do we need a NUMA topology to use VPMEM?","commit_id":"0c856d82c4310c6c06e1c12db854589ff8353690"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"a9c93d6d74e8c718d488c8b8ca73aeac5826945e","unresolved":false,"context_lines":[{"line_number":5465,"context_line":"        need_pin \u003d True"},{"line_number":5466,"context_line":"        vpmems \u003d self._get_ordered_vpmems(instance, flavor)"},{"line_number":5467,"context_line":"        if vpmems and not numa_topology:"},{"line_number":5468,"context_line":"            # if we have vpmems but no numa topology,"},{"line_number":5469,"context_line":"            # generate a numa for guest to attach vpmems"},{"line_number":5470,"context_line":"            # and do not bind host numa"},{"line_number":5471,"context_line":"            numa_topology \u003d hardware.get_guest_numa(flavor)"},{"line_number":5472,"context_line":"            need_pin \u003d False"},{"line_number":5473,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5faad753_455578c5","line":5470,"range":{"start_line":5468,"start_character":0,"end_line":5470,"end_character":39},"in_reply_to":"5faad753_1a0608d0","updated":"2019-09-11 18:59:58.000000000","message":"This is droped.\n\nthis patch will create numa toplogy instead https://review.opendev.org/#/c/678456/","commit_id":"0c856d82c4310c6c06e1c12db854589ff8353690"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2888fd236c4858efdd6601221aec52635793931b","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        self._undefine_domain(instance)"},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"    def _cleanup_vpmems(self, vpmems):"},{"line_number":1368,"context_line":"        for vpmem in vpmems:"},{"line_number":1369,"context_line":"            try:"},{"line_number":1370,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1371,"context_line":"            except Exception as e:"},{"line_number":1372,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1373,"context_line":"                                                   error\u003de)"},{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"},{"line_number":1376,"context_line":"        \"\"\"Detaches encrypted volumes attached to instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":36,"id":"5faad753_fe52e53a","line":1373,"range":{"start_line":1368,"start_character":2,"end_line":1373,"end_character":59},"updated":"2019-09-12 12:20:53.000000000","message":"nit: i would prefer to try and clean up as many devices as we can keeping a list of all that failed and there error\nthen raise one excetion at the end but im fine with leaving this to a future patch to address. \n\nbasically i would prefer if the cleanup rutines tried to clean up as much as possibel collecting all errors and then only notify after tehy have run out of things that hey can cleanup so the operator has less work to do. the other cleanup funtion fail fast also so given this is a bigger propblem im fine with this also failing fast for now.","commit_id":"ae7680d8f4c35421b82ca998f36ee98bacf4ca2f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8446074011ca91d737afad3fdf12e7233ef78f55","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        self._undefine_domain(instance)"},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"    def _cleanup_vpmems(self, vpmems):"},{"line_number":1368,"context_line":"        for vpmem in vpmems:"},{"line_number":1369,"context_line":"            try:"},{"line_number":1370,"context_line":"                nova.privsep.libvirt.cleanup_vpmem(vpmem.devpath)"},{"line_number":1371,"context_line":"            except Exception as e:"},{"line_number":1372,"context_line":"                raise exception.VPMEMCleanupFailed(dev\u003dvpmem.devpath,"},{"line_number":1373,"context_line":"                                                   error\u003de)"},{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"    def _detach_encrypted_volumes(self, instance, block_device_info):"},{"line_number":1376,"context_line":"        \"\"\"Detaches encrypted volumes attached to instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":36,"id":"5faad753_d4b4a5d3","line":1373,"range":{"start_line":1368,"start_character":2,"end_line":1373,"end_character":59},"in_reply_to":"5faad753_fe52e53a","updated":"2019-09-12 20:26:36.000000000","message":"+1 good call","commit_id":"ae7680d8f4c35421b82ca998f36ee98bacf4ca2f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8446074011ca91d737afad3fdf12e7233ef78f55","unresolved":false,"context_lines":[{"line_number":5678,"context_line":"        ordered_vpmems \u003d []"},{"line_number":5679,"context_line":"        vpmems \u003d self._get_vpmems(instance)"},{"line_number":5680,"context_line":"        labels \u003d hardware.get_vpmems(flavor)"},{"line_number":5681,"context_line":"        for label in labels:"},{"line_number":5682,"context_line":"            for vpmem in vpmems:"},{"line_number":5683,"context_line":"                if vpmem.label \u003d\u003d label:"},{"line_number":5684,"context_line":"                    ordered_vpmems.append(vpmem)"},{"line_number":5685,"context_line":"                    vpmems.remove(vpmem)"},{"line_number":5686,"context_line":"                    break"},{"line_number":5687,"context_line":"        return ordered_vpmems"},{"line_number":5688,"context_line":""},{"line_number":5689,"context_line":"    def _get_vpmems(self, instance, prefix\u003dNone):"},{"line_number":5690,"context_line":"        vpmems \u003d []"}],"source_content_type":"text/x-python","patch_set":36,"id":"5faad753_744051a6","line":5687,"range":{"start_line":5681,"start_character":0,"end_line":5687,"end_character":29},"updated":"2019-09-12 20:26:36.000000000","message":"If you return a dictionary from \u0027_get_vpmems\u0027 and key it on vpmem.label, this would become:\n\n  return [vpmems[label] for label in labels]\n\nIt should be a good deal faster too. Another fixup for later","commit_id":"ae7680d8f4c35421b82ca998f36ee98bacf4ca2f"}]}
