)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c23501b622a0e83fafe8920ee2420ef17874f7ad","unresolved":false,"context_lines":[{"line_number":37,"context_line":"WIP because I need to preserve the \u0027old_flavor\u0027, \u0027new_flavor\u0027 attributes"},{"line_number":38,"context_line":"on the instance for longer (both \u0027_cleanup_resize_vtpm\u0027 and"},{"line_number":39,"context_line":"\u0027_finish_revert_migration_vtpm\u0027 currently fail because of this). Also,"},{"line_number":40,"context_line":"I\u0027ve definitely broken tests."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"Part of blueprint add-emulated-virtual-tpm"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":40,"id":"bf51134e_cafdc56f","line":40,"updated":"2020-07-17 18:19:14.000000000","message":"@dansmith: As noted on IRC on Friday, I need access at the virt driver layer to both the old and new flavor when confirming/reverting a resize, and I don\u0027t have that at the moment because we\u0027re zeroing out those attributes before said calls to virt driver. I\u0027m planning to just delay that zeroing out \u0027til after, but I don\u0027t know if there\u0027ll be knock on effects or not. Seeing as your name is beside all the zeroing out, I figure you\u0027re the person to ask :)","commit_id":"52026608f174cee5ac0fc43873fd5308ca7efd48"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"70e058f67cd0f623390705d2d89fc1c50fbf2dce","unresolved":false,"context_lines":[{"line_number":28,"context_line":"As itself, nova then copies them into the instance directory on the"},{"line_number":29,"context_line":"dest. Nova then (once again, via privsep) changes the ownership back and"},{"line_number":30,"context_line":"moves the files to where libvirt expects to find them. This second step"},{"line_number":31,"context_line":"is handled by \u0027migrate_disk_and_power_off\u0027. Confirming the resize will"},{"line_number":32,"context_line":"result in the original TPM data at \u0027/var/lib/libvirt/swtpm\u0027 being"},{"line_number":33,"context_line":"deleted by libvirt and the copied TPM data in the instance data being"},{"line_number":34,"context_line":"cleaned up by nova (via \u0027confirm_migration\u0027), while reverting it will"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":53,"id":"9f560f44_3185965a","line":31,"range":{"start_line":31,"start_character":15,"end_line":31,"end_character":41},"updated":"2020-09-02 14:39:15.000000000","message":"finish_migration ?","commit_id":"03503e2aaaf69fa857153ac5521390bfbf930a10"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fc6414b9df907b94387575cb1d29211981b038f8","unresolved":false,"context_lines":[{"line_number":28,"context_line":"As itself, nova then copies them into the instance directory on the"},{"line_number":29,"context_line":"dest. Nova then (once again, via privsep) changes the ownership back and"},{"line_number":30,"context_line":"moves the files to where libvirt expects to find them. This second step"},{"line_number":31,"context_line":"is handled by \u0027migrate_disk_and_power_off\u0027. Confirming the resize will"},{"line_number":32,"context_line":"result in the original TPM data at \u0027/var/lib/libvirt/swtpm\u0027 being"},{"line_number":33,"context_line":"deleted by libvirt and the copied TPM data in the instance data being"},{"line_number":34,"context_line":"cleaned up by nova (via \u0027confirm_migration\u0027), while reverting it will"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":53,"id":"9f560f44_317ab6ef","line":31,"range":{"start_line":31,"start_character":15,"end_line":31,"end_character":41},"in_reply_to":"9f560f44_3185965a","updated":"2020-09-02 15:09:26.000000000","message":"Ah, yes /o\\ This is a hangover from the earlier days.","commit_id":"03503e2aaaf69fa857153ac5521390bfbf930a10"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6521755a7475de9f45843f353904a673241936d","unresolved":false,"context_lines":[{"line_number":33,"context_line":"libvirt and the copied TPM data in the instance data being cleaned up by"},{"line_number":34,"context_line":"nova (via \u0027confirm_migration\u0027), while reverting it will result on the"},{"line_number":35,"context_line":"same on the host."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Part of blueprint add-emulated-virtual-tpm"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"[1] https://libvirt.org/migration.html#offline"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":57,"id":"9f560f44_1bf80dc2","line":36,"updated":"2020-09-09 09:41:36.000000000","message":"Dude, where are the doc changes for supporting now resize ?\nhttps://docs.openstack.org/nova/latest/admin/emulated-tpm#limitations\n\nAlso, a relnote would be greatly appreciated.","commit_id":"eb819c8c63d90e26cad992c4ec25807bf5ccde17"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8196bf50c87d2d41ce41054c7088c62c3008e1fd","unresolved":false,"context_lines":[{"line_number":33,"context_line":"libvirt and the copied TPM data in the instance data being cleaned up by"},{"line_number":34,"context_line":"nova (via \u0027confirm_migration\u0027), while reverting it will result on the"},{"line_number":35,"context_line":"same on the host."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Part of blueprint add-emulated-virtual-tpm"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"[1] https://libvirt.org/migration.html#offline"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":57,"id":"9f560f44_8a1325b8","line":36,"in_reply_to":"9f560f44_1bf80dc2","updated":"2020-09-09 14:34:01.000000000","message":"OK, Stephen made a FUP https://review.opendev.org/#/c/750675/1/doc/source/admin/emulated-tpm.rst","commit_id":"eb819c8c63d90e26cad992c4ec25807bf5ccde17"}],"nova/compute/api.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6521755a7475de9f45843f353904a673241936d","unresolved":false,"context_lines":[{"line_number":4039,"context_line":"                raise exception.OperationNotSupportedForVTPM("},{"line_number":4040,"context_line":"                    instance_uuid\u003dinstance.uuid,"},{"line_number":4041,"context_line":"                    operation\u003dinstance_actions.RESIZE)"},{"line_number":4042,"context_line":""},{"line_number":4043,"context_line":"        # ensure there is sufficient headroom for upsizes"},{"line_number":4044,"context_line":"        if flavor_id:"},{"line_number":4045,"context_line":"            self._check_quota_for_upsize(context, instance,"}],"source_content_type":"text/x-python","patch_set":57,"id":"9f560f44_5bbba50d","side":"PARENT","line":4042,"updated":"2020-09-09 09:41:36.000000000","message":"huzzah","commit_id":"b2fbaa87679629dfb0be7a76ee7dc57980e21dcb"}],"nova/conf/libvirt.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3426188e39269d0df2781cbe4f5c2582fcaa1fdd","unresolved":false,"context_lines":[{"line_number":843,"context_line":"\"\"\"),"},{"line_number":844,"context_line":"    cfg.StrOpt(\u0027swtpm_user\u0027,"},{"line_number":845,"context_line":"               default\u003d\u0027tss\u0027,"},{"line_number":846,"context_line":"               choices\u003d("},{"line_number":847,"context_line":"                   (\u0027tss\u0027, \u0027swtpm runs as tss user \u0027),"},{"line_number":848,"context_line":"                   (\u0027root\u0027, \u0027swtpm runs as root user\u0027),"},{"line_number":849,"context_line":"               ),"},{"line_number":850,"context_line":"               help\u003d\"\"\""},{"line_number":851,"context_line":"User that swtpm binary runs as."},{"line_number":852,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_2cc41b41","line":849,"range":{"start_line":846,"start_character":13,"end_line":849,"end_character":17},"updated":"2019-11-11 20:56:39.000000000","message":"this forces the hands of packages\nbe that a distro or openstack project like kolla\nto either run as the tss user or root but if this is execute in the nova_libvirt container they may want to use libvirt or nova as the user","commit_id":"67a73c2c9bae90b819e25fe8343b6d75b8439cd4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ed2e732449b321e8b38b7191478575c2fe7660c5","unresolved":false,"context_lines":[{"line_number":843,"context_line":"\"\"\"),"},{"line_number":844,"context_line":"    cfg.StrOpt(\u0027swtpm_user\u0027,"},{"line_number":845,"context_line":"               default\u003d\u0027tss\u0027,"},{"line_number":846,"context_line":"               choices\u003d("},{"line_number":847,"context_line":"                   (\u0027tss\u0027, \u0027swtpm runs as tss user \u0027),"},{"line_number":848,"context_line":"                   (\u0027root\u0027, \u0027swtpm runs as root user\u0027),"},{"line_number":849,"context_line":"               ),"},{"line_number":850,"context_line":"               help\u003d\"\"\""},{"line_number":851,"context_line":"User that swtpm binary runs as."},{"line_number":852,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_9ca7470a","line":849,"range":{"start_line":846,"start_character":13,"end_line":849,"end_character":17},"in_reply_to":"3fa7e38b_2cc41b41","updated":"2019-11-14 21:18:05.000000000","message":"I updated the spec to imply just a string here.\n\nhttps://review.opendev.org/#/c/686804/6/specs/ussuri/approved/add-emulated-virtual-tpm.rst@86","commit_id":"67a73c2c9bae90b819e25fe8343b6d75b8439cd4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"80fdc6453066e83f3f4ef5852aff7e854671293a","unresolved":false,"context_lines":[{"line_number":843,"context_line":"\"\"\"),"},{"line_number":844,"context_line":"    cfg.StrOpt(\u0027swtpm_user\u0027,"},{"line_number":845,"context_line":"               default\u003d\u0027tss\u0027,"},{"line_number":846,"context_line":"               choices\u003d("},{"line_number":847,"context_line":"                   (\u0027tss\u0027, \u0027swtpm runs as tss user \u0027),"},{"line_number":848,"context_line":"                   (\u0027root\u0027, \u0027swtpm runs as root user\u0027),"},{"line_number":849,"context_line":"               ),"},{"line_number":850,"context_line":"               help\u003d\"\"\""},{"line_number":851,"context_line":"User that swtpm binary runs as."},{"line_number":852,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_9c6c279e","line":849,"range":{"start_line":846,"start_character":13,"end_line":849,"end_character":17},"in_reply_to":"3fa7e38b_9ca7470a","updated":"2019-11-14 21:29:32.000000000","message":"fixed it in the code too, so I don\u0027t forget later.","commit_id":"67a73c2c9bae90b819e25fe8343b6d75b8439cd4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3426188e39269d0df2781cbe4f5c2582fcaa1fdd","unresolved":false,"context_lines":[{"line_number":864,"context_line":"\"\"\"),"},{"line_number":865,"context_line":"    cfg.StrOpt(\u0027swtpm_group\u0027,"},{"line_number":866,"context_line":"               default\u003d\u0027tss\u0027,"},{"line_number":867,"context_line":"               choices\u003d("},{"line_number":868,"context_line":"                   (\u0027tss\u0027, \u0027swtpm runs as tss group \u0027),"},{"line_number":869,"context_line":"                   (\u0027root\u0027, \u0027swtpm runs as root group\u0027),"},{"line_number":870,"context_line":"               ),"},{"line_number":871,"context_line":"               help\u003d\"\"\""},{"line_number":872,"context_line":"Group that swtpm binary runs as."}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_ecbda3b1","line":869,"range":{"start_line":867,"start_character":15,"end_line":869,"end_character":56},"updated":"2019-11-11 20:56:39.000000000","message":"same comment as a above.\ni think this proably should jsut be a string filed witout the choices section. you mention in the commit that this is configurable via libvirt so im not sure we should be resticting it here.","commit_id":"67a73c2c9bae90b819e25fe8343b6d75b8439cd4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"503cef633728bf398283c3b5e24b1a8329c76b8d","unresolved":false,"context_lines":[{"line_number":1434,"context_line":"Enable emulated TPM (Trusted Platform Module) in guests."},{"line_number":1435,"context_line":"\"\"\"),"},{"line_number":1436,"context_line":"    cfg.StrOpt(\u0027swtpm_user\u0027,"},{"line_number":1437,"context_line":"               default\u003d\u0027tss\u0027,"},{"line_number":1438,"context_line":"               help\u003d\"\"\""},{"line_number":1439,"context_line":"User that swtpm binary runs as."},{"line_number":1440,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_d977949f","line":1437,"range":{"start_line":1437,"start_character":8,"end_line":1437,"end_character":15},"updated":"2020-08-26 13:20:47.000000000","message":"Whoops :(","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":1434,"context_line":"Enable emulated TPM (Trusted Platform Module) in guests."},{"line_number":1435,"context_line":"\"\"\"),"},{"line_number":1436,"context_line":"    cfg.StrOpt(\u0027swtpm_user\u0027,"},{"line_number":1437,"context_line":"               default\u003d\u0027tss\u0027,"},{"line_number":1438,"context_line":"               help\u003d\"\"\""},{"line_number":1439,"context_line":"User that swtpm binary runs as."},{"line_number":1440,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_719f7cb3","line":1437,"range":{"start_line":1437,"start_character":8,"end_line":1437,"end_character":15},"in_reply_to":"9f560f44_d977949f","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":21984,"context_line":"    def _test_migrate_disk_and_power_off("},{"line_number":21985,"context_line":"            self, ctxt, flavor_obj, mock_execute, mock_exists, mock_rename,"},{"line_number":21986,"context_line":"            mock_is_shared, mock_get_host_ip, mock_destroy,"},{"line_number":21987,"context_line":"            mock_get_disk_info, mock_vtpm, block_device_info\u003dNone,"},{"line_number":21988,"context_line":"            params_for_instance\u003dNone):"},{"line_number":21989,"context_line":"        \"\"\"Test for nova.virt.libvirt.driver.LivirtConnection"},{"line_number":21990,"context_line":"        .migrate_disk_and_power_off."}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_f4b89f75","line":21987,"range":{"start_line":21987,"start_character":32,"end_line":21987,"end_character":41},"updated":"2020-08-26 11:53:58.000000000","message":"let\u0027s add an assert that it is actually called","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":21984,"context_line":"    def _test_migrate_disk_and_power_off("},{"line_number":21985,"context_line":"            self, ctxt, flavor_obj, mock_execute, mock_exists, mock_rename,"},{"line_number":21986,"context_line":"            mock_is_shared, mock_get_host_ip, mock_destroy,"},{"line_number":21987,"context_line":"            mock_get_disk_info, mock_vtpm, block_device_info\u003dNone,"},{"line_number":21988,"context_line":"            params_for_instance\u003dNone):"},{"line_number":21989,"context_line":"        \"\"\"Test for nova.virt.libvirt.driver.LivirtConnection"},{"line_number":21990,"context_line":"        .migrate_disk_and_power_off."}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_51bd1800","line":21987,"range":{"start_line":21987,"start_character":32,"end_line":21987,"end_character":41},"in_reply_to":"9f560f44_f4b89f75","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":22162,"context_line":""},{"line_number":22163,"context_line":"        self.assertTrue(mock_is_shared_storage.called)"},{"line_number":22164,"context_line":"        mock_destroy.assert_called_once_with(instance)"},{"line_number":22165,"context_line":"        mock_vtpm.assert_called_once()"},{"line_number":22166,"context_line":"        disk_info_text \u003d jsonutils.dumps(disk_info)"},{"line_number":22167,"context_line":"        self.assertEqual(out, disk_info_text)"},{"line_number":22168,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_94a96325","line":22165,"updated":"2020-08-26 11:53:58.000000000","message":"could we assert at least some of the actual parameters of the call?","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":22162,"context_line":""},{"line_number":22163,"context_line":"        self.assertTrue(mock_is_shared_storage.called)"},{"line_number":22164,"context_line":"        mock_destroy.assert_called_once_with(instance)"},{"line_number":22165,"context_line":"        mock_vtpm.assert_called_once()"},{"line_number":22166,"context_line":"        disk_info_text \u003d jsonutils.dumps(disk_info)"},{"line_number":22167,"context_line":"        self.assertEqual(out, disk_info_text)"},{"line_number":22168,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_f1c1cc81","line":22165,"in_reply_to":"9f560f44_94a96325","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"70e058f67cd0f623390705d2d89fc1c50fbf2dce","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":1527,"context_line":"        exc \u003d self.assertRaises(exception.InvalidConfiguration,"},{"line_number":1528,"context_line":"                                drvr.init_host, \u0027dummyhost\u0027)"},{"line_number":1529,"context_line":"        self.assertIn(\"vTPM support requires \u0027[libvirt] virt_type\u0027 of \u0027qemu\u0027 \""},{"line_number":1530,"context_line":"                      \"or \u0027kvm\u0027; found \u0027lxc\u0027.\", six.text_type(exc))"},{"line_number":1531,"context_line":""},{"line_number":1532,"context_line":"    @mock.patch.object(host.Host, \u0027has_min_version\u0027)"},{"line_number":1533,"context_line":"    def test__check_vtpm_support_old_qemu(self, mock_version):"}],"source_content_type":"text/x-python","patch_set":53,"id":"9f560f44_6d58d455","line":1530,"range":{"start_line":1529,"start_character":0,"end_line":1530,"end_character":67},"updated":"2020-09-02 14:39:15.000000000","message":"unrelated","commit_id":"03503e2aaaf69fa857153ac5521390bfbf930a10"}],"nova/tests/unit/virt/libvirt/test_utils.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":765,"context_line":"        swtpm_dir \u003d \u0027base_resize/swtpm\u0027"},{"line_number":766,"context_line":"        mock_exists.assert_called_once_with(vtpm_dir)"},{"line_number":767,"context_line":"        mock_ensure.assert_called_once_with(swtpm_dir)"},{"line_number":768,"context_line":"        mock_move.assert_called_with(vtpm_dir, swtpm_dir)"},{"line_number":769,"context_line":"        mock_chown.assert_called_with("},{"line_number":770,"context_line":"            swtpm_dir, os.geteuid(), os.getegid(), recursive\u003dTrue,"},{"line_number":771,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_b4f4675c","line":768,"range":{"start_line":768,"start_character":18,"end_line":768,"end_character":36},"updated":"2020-08-26 11:53:58.000000000","message":"can this be called_once_with?","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":765,"context_line":"        swtpm_dir \u003d \u0027base_resize/swtpm\u0027"},{"line_number":766,"context_line":"        mock_exists.assert_called_once_with(vtpm_dir)"},{"line_number":767,"context_line":"        mock_ensure.assert_called_once_with(swtpm_dir)"},{"line_number":768,"context_line":"        mock_move.assert_called_with(vtpm_dir, swtpm_dir)"},{"line_number":769,"context_line":"        mock_chown.assert_called_with("},{"line_number":770,"context_line":"            swtpm_dir, os.geteuid(), os.getegid(), recursive\u003dTrue,"},{"line_number":771,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_f146ec20","line":768,"range":{"start_line":768,"start_character":18,"end_line":768,"end_character":36},"in_reply_to":"9f560f44_b4f4675c","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        mock_exists.assert_called_once_with(vtpm_dir)"},{"line_number":767,"context_line":"        mock_ensure.assert_called_once_with(swtpm_dir)"},{"line_number":768,"context_line":"        mock_move.assert_called_with(vtpm_dir, swtpm_dir)"},{"line_number":769,"context_line":"        mock_chown.assert_called_with("},{"line_number":770,"context_line":"            swtpm_dir, os.geteuid(), os.getegid(), recursive\u003dTrue,"},{"line_number":771,"context_line":"        )"},{"line_number":772,"context_line":"        mock_copy.assert_called_with("}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_14e8b379","line":769,"range":{"start_line":769,"start_character":19,"end_line":769,"end_character":37},"updated":"2020-08-26 11:53:58.000000000","message":"ditto","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        mock_exists.assert_called_once_with(vtpm_dir)"},{"line_number":767,"context_line":"        mock_ensure.assert_called_once_with(swtpm_dir)"},{"line_number":768,"context_line":"        mock_move.assert_called_with(vtpm_dir, swtpm_dir)"},{"line_number":769,"context_line":"        mock_chown.assert_called_with("},{"line_number":770,"context_line":"            swtpm_dir, os.geteuid(), os.getegid(), recursive\u003dTrue,"},{"line_number":771,"context_line":"        )"},{"line_number":772,"context_line":"        mock_copy.assert_called_with("}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_515238df","line":769,"range":{"start_line":769,"start_character":19,"end_line":769,"end_character":37},"in_reply_to":"9f560f44_14e8b379","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":769,"context_line":"        mock_chown.assert_called_with("},{"line_number":770,"context_line":"            swtpm_dir, os.geteuid(), os.getegid(), recursive\u003dTrue,"},{"line_number":771,"context_line":"        )"},{"line_number":772,"context_line":"        mock_copy.assert_called_with("},{"line_number":773,"context_line":"            swtpm_dir, \u0027base\u0027, host\u003d\u0027host\u0027, on_completion\u003d_on_completion,"},{"line_number":774,"context_line":"            on_execute\u003d_on_execute,"},{"line_number":775,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_3485f7ad","line":772,"range":{"start_line":772,"start_character":18,"end_line":772,"end_character":36},"updated":"2020-08-26 11:53:58.000000000","message":"ditto","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":769,"context_line":"        mock_chown.assert_called_with("},{"line_number":770,"context_line":"            swtpm_dir, os.geteuid(), os.getegid(), recursive\u003dTrue,"},{"line_number":771,"context_line":"        )"},{"line_number":772,"context_line":"        mock_copy.assert_called_with("},{"line_number":773,"context_line":"            swtpm_dir, \u0027base\u0027, host\u003d\u0027host\u0027, on_completion\u003d_on_completion,"},{"line_number":774,"context_line":"            on_execute\u003d_on_execute,"},{"line_number":775,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_d15768c9","line":772,"range":{"start_line":772,"start_character":18,"end_line":772,"end_character":36},"in_reply_to":"9f560f44_3485f7ad","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":810,"context_line":"        libvirt_utils.restore_vtpm_dir(\u0027dummy\u0027)"},{"line_number":811,"context_line":""},{"line_number":812,"context_line":"        if not exists:"},{"line_number":813,"context_line":"            mock_makedirs.assert_called_with(libvirt_utils.VTPM_DIR)"},{"line_number":814,"context_line":"            mock_chmod.assert_called_with(libvirt_utils.VTPM_DIR, 0o711)"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"        mock_chown.assert_called_with("}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_949043ef","line":813,"range":{"start_line":813,"start_character":26,"end_line":813,"end_character":44},"updated":"2020-08-26 11:53:58.000000000","message":"called_once_with","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":810,"context_line":"        libvirt_utils.restore_vtpm_dir(\u0027dummy\u0027)"},{"line_number":811,"context_line":""},{"line_number":812,"context_line":"        if not exists:"},{"line_number":813,"context_line":"            mock_makedirs.assert_called_with(libvirt_utils.VTPM_DIR)"},{"line_number":814,"context_line":"            mock_chmod.assert_called_with(libvirt_utils.VTPM_DIR, 0o711)"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"        mock_chown.assert_called_with("}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_910690cd","line":813,"range":{"start_line":813,"start_character":26,"end_line":813,"end_character":44},"in_reply_to":"9f560f44_949043ef","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":811,"context_line":""},{"line_number":812,"context_line":"        if not exists:"},{"line_number":813,"context_line":"            mock_makedirs.assert_called_with(libvirt_utils.VTPM_DIR)"},{"line_number":814,"context_line":"            mock_chmod.assert_called_with(libvirt_utils.VTPM_DIR, 0o711)"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"        mock_chown.assert_called_with("},{"line_number":817,"context_line":"            \u0027dummy\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_d4bf5b5e","line":814,"range":{"start_line":814,"start_character":23,"end_line":814,"end_character":41},"updated":"2020-08-26 11:53:58.000000000","message":"ditto","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":811,"context_line":""},{"line_number":812,"context_line":"        if not exists:"},{"line_number":813,"context_line":"            mock_makedirs.assert_called_with(libvirt_utils.VTPM_DIR)"},{"line_number":814,"context_line":"            mock_chmod.assert_called_with(libvirt_utils.VTPM_DIR, 0o711)"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"        mock_chown.assert_called_with("},{"line_number":817,"context_line":"            \u0027dummy\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_71093cdb","line":814,"range":{"start_line":814,"start_character":23,"end_line":814,"end_character":41},"in_reply_to":"9f560f44_d4bf5b5e","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"23549fdf4d26d2c7c2548e64e36649c0e256c7fa","unresolved":false,"context_lines":[{"line_number":1473,"context_line":"        return max(ret) + 1 if ret else 0"},{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"    def _cleanup_rbd(self, instance):"},{"line_number":1476,"context_line":"        # NOTE(nic): On revert_resize, the cleanup steps for the root"},{"line_number":1477,"context_line":"        # volume are handled with an \"rbd snap rollback\" command,"},{"line_number":1478,"context_line":"        # and none of this is needed (and is, in fact, harmful) so"},{"line_number":1479,"context_line":"        # filter out non-ephemerals from the list"}],"source_content_type":"text/x-python","patch_set":27,"id":"ff570b3c_d6ca4e4d","line":1476,"updated":"2020-05-27 15:11:47.000000000","message":"pep8: F821 undefined name \u0027destroy_disks\u0027","commit_id":"cdf6062d9e39d34a3dad881da2df34a7166fa144"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e24f9ac5a003ca84b8a72c13149d94eab63100e7","unresolved":false,"context_lines":[{"line_number":10412,"context_line":"        self,"},{"line_number":10413,"context_line":"        context: nova_context.RequestContext,"},{"line_number":10414,"context_line":"        instance: \u0027objects.Instance\u0027,"},{"line_number":10415,"context_line":"    ):"},{"line_number":10416,"context_line":"        # Handle the case where we\u0027re resizing between different"},{"line_number":10417,"context_line":"        # versions of TPM, or enabling/disabling TPM."},{"line_number":10418,"context_line":"        old_vtpm_config \u003d hardware.get_vtpm_constraint("}],"source_content_type":"text/x-python","patch_set":40,"id":"bf51134e_0a017d3a","line":10415,"updated":"2020-07-17 18:34:33.000000000","message":"Presently, if TPM data exists on the source side it will always get copied, which is why we need the logic here to decide if that data is necessary/compatible. It might make more sense to move this logic to the source side and decide whether or not to copy them in \u0027save_and_migrate_vtpm_dir\u0027 or its caller? It probably wouldn\u0027t save much though since we\u0027d still need to create a secret if the old flavor didn\u0027t need one but the new one does.","commit_id":"52026608f174cee5ac0fc43873fd5308ca7efd48"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":1602,"context_line":"            # the instance no longer cares for its vTPM so delete the related"},{"line_number":1603,"context_line":"            # secret; the deletion of the instance directory and undefining of"},{"line_number":1604,"context_line":"            # the domain will take care of the TPM files themselves"},{"line_number":1605,"context_line":"            crypto.delete_vtpm_secret(context, instance)"},{"line_number":1606,"context_line":""},{"line_number":1607,"context_line":"    # TODO(stephenfin): Fold this back into its only caller, cleanup_resize"},{"line_number":1608,"context_line":"    def _cleanup_resize(self, context, instance, network_info):"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_7452cf36","line":1605,"updated":"2020-08-26 11:53:58.000000000","message":"I would add a debug log message here that we are deleting a secret and therefore making the old vtpm unusable as we resized to a flavor without vtpm requirement. So that it will be easier to debug a user ticket complaining for a lost vtpm after resize","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":1602,"context_line":"            # the instance no longer cares for its vTPM so delete the related"},{"line_number":1603,"context_line":"            # secret; the deletion of the instance directory and undefining of"},{"line_number":1604,"context_line":"            # the domain will take care of the TPM files themselves"},{"line_number":1605,"context_line":"            crypto.delete_vtpm_secret(context, instance)"},{"line_number":1606,"context_line":""},{"line_number":1607,"context_line":"    # TODO(stephenfin): Fold this back into its only caller, cleanup_resize"},{"line_number":1608,"context_line":"    def _cleanup_resize(self, context, instance, network_info):"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_3114e4e8","line":1605,"in_reply_to":"9f560f44_7452cf36","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":10446,"context_line":"            if old_vtpm_config !\u003d new_vtpm_config:"},{"line_number":10447,"context_line":"                # we had vTPM in the old flavor but the new flavor either"},{"line_number":10448,"context_line":"                # doesn\u0027t or has different config; delete old TPM data and let"},{"line_number":10449,"context_line":"                # libvirt create new data"},{"line_number":10450,"context_line":"                if os.path.exists(swtpm_dir):"},{"line_number":10451,"context_line":"                    copy_swtpm_dir \u003d False"},{"line_number":10452,"context_line":"                    shutil.rmtree(swtpm_dir)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_14127362","line":10449,"updated":"2020-08-26 11:53:58.000000000","message":"ditto. I would log a debug message about deleting a vtpm so that it is easier to figure out why the guest lost the vtpm data.","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":10446,"context_line":"            if old_vtpm_config !\u003d new_vtpm_config:"},{"line_number":10447,"context_line":"                # we had vTPM in the old flavor but the new flavor either"},{"line_number":10448,"context_line":"                # doesn\u0027t or has different config; delete old TPM data and let"},{"line_number":10449,"context_line":"                # libvirt create new data"},{"line_number":10450,"context_line":"                if os.path.exists(swtpm_dir):"},{"line_number":10451,"context_line":"                    copy_swtpm_dir \u003d False"},{"line_number":10452,"context_line":"                    shutil.rmtree(swtpm_dir)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_31e984e2","line":10449,"in_reply_to":"9f560f44_14127362","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"387e1aac0a071c1bf266269596c1622b7fc14b64","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        if CONF.libvirt.virt_type not in (\u0027qemu\u0027, \u0027kvm\u0027):"},{"line_number":789,"context_line":"            msg \u003d _("},{"line_number":790,"context_line":"                \"vTPM support requires \u0027[libvirt] virt_type\u0027 of \u0027qemu\u0027 or \""},{"line_number":791,"context_line":"                \"\u0027kvm\u0027; found \u0027%s\u0027.\")"},{"line_number":792,"context_line":"            raise exception.InvalidConfiguration(msg % CONF.libvirt.virt_type)"},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        if not self._host.has_min_version("}],"source_content_type":"text/x-python","patch_set":51,"id":"9f560f44_e0256ac3","line":791,"updated":"2020-08-27 07:56:46.000000000","message":"this change makes the related unit test to fail","commit_id":"cb6bcfbc776e9d544e48ce5f6836dae71b035fea"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6d0bbb003238fa6f4dd30d99433193f9b02416cb","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        if CONF.libvirt.virt_type not in (\u0027qemu\u0027, \u0027kvm\u0027):"},{"line_number":789,"context_line":"            msg \u003d _("},{"line_number":790,"context_line":"                \"vTPM support requires \u0027[libvirt] virt_type\u0027 of \u0027qemu\u0027 or \""},{"line_number":791,"context_line":"                \"\u0027kvm\u0027; found \u0027%s\u0027.\")"},{"line_number":792,"context_line":"            raise exception.InvalidConfiguration(msg % CONF.libvirt.virt_type)"},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        if not self._host.has_min_version("}],"source_content_type":"text/x-python","patch_set":51,"id":"9f560f44_43d6e050","line":791,"in_reply_to":"9f560f44_e0256ac3","updated":"2020-08-27 08:14:00.000000000","message":"Sigh, yeah, whoops. Done","commit_id":"cb6bcfbc776e9d544e48ce5f6836dae71b035fea"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"70e058f67cd0f623390705d2d89fc1c50fbf2dce","unresolved":false,"context_lines":[{"line_number":10522,"context_line":""},{"line_number":10523,"context_line":"        # Convert raw disks to qcow2 if migrating to host which uses"},{"line_number":10524,"context_line":"        # qcow2 from host which uses raw."},{"line_number":10525,"context_line":"        for info in jsonutils.loads(disk_info):"},{"line_number":10526,"context_line":"            path \u003d info[\u0027path\u0027]"},{"line_number":10527,"context_line":"            disk_name \u003d os.path.basename(path)"},{"line_number":10528,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"9f560f44_cdb9207a","line":10525,"range":{"start_line":10525,"start_character":0,"end_line":10525,"end_character":47},"updated":"2020-09-02 14:39:15.000000000","message":"unrelated","commit_id":"03503e2aaaf69fa857153ac5521390bfbf930a10"}],"nova/virt/libvirt/utils.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":672,"context_line":"    inst_base_resize: str,"},{"line_number":673,"context_line":"    inst_base: str,"},{"line_number":674,"context_line":"    dest: str,"},{"line_number":675,"context_line":"    on_execute: ty.Any,"},{"line_number":676,"context_line":"    on_completion: ty.Any,"},{"line_number":677,"context_line":") -\u003e None:"},{"line_number":678,"context_line":"    \"\"\"Save vTPM data to instance directory and migrate to the destination."},{"line_number":679,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_343df7ba","line":676,"range":{"start_line":675,"start_character":0,"end_line":676,"end_character":26},"updated":"2020-08-26 11:53:58.000000000","message":"ty.Callable would be more specific","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":672,"context_line":"    inst_base_resize: str,"},{"line_number":673,"context_line":"    inst_base: str,"},{"line_number":674,"context_line":"    dest: str,"},{"line_number":675,"context_line":"    on_execute: ty.Any,"},{"line_number":676,"context_line":"    on_completion: ty.Any,"},{"line_number":677,"context_line":") -\u003e None:"},{"line_number":678,"context_line":"    \"\"\"Save vTPM data to instance directory and migrate to the destination."},{"line_number":679,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_f190ac50","line":676,"range":{"start_line":675,"start_character":0,"end_line":676,"end_character":26},"in_reply_to":"9f560f44_343df7ba","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    :param instance_uuid: The instance\u0027s UUID."},{"line_number":687,"context_line":"    :param inst_base_resize: The instance\u0027s base resize working directory."},{"line_number":688,"context_line":"    :param inst_base: The instances\u0027s base directory."},{"line_number":689,"context_line":"    :param dest: Destination host."},{"line_number":690,"context_line":"    :param on_execute: Callback method to store PID of process in cache."},{"line_number":691,"context_line":"    :param on_completion: Callback method to remove PID of process from cache."}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_346697ee","line":688,"range":{"start_line":688,"start_character":22,"end_line":688,"end_character":53},"updated":"2020-08-26 11:53:58.000000000","message":"on the destination host","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    :param instance_uuid: The instance\u0027s UUID."},{"line_number":687,"context_line":"    :param inst_base_resize: The instance\u0027s base resize working directory."},{"line_number":688,"context_line":"    :param inst_base: The instances\u0027s base directory."},{"line_number":689,"context_line":"    :param dest: Destination host."},{"line_number":690,"context_line":"    :param on_execute: Callback method to store PID of process in cache."},{"line_number":691,"context_line":"    :param on_completion: Callback method to remove PID of process from cache."}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_519cf868","line":688,"range":{"start_line":688,"start_character":22,"end_line":688,"end_character":53},"in_reply_to":"9f560f44_346697ee","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":725,"context_line":"    # permissions/ownership"},{"line_number":726,"context_line":"    if not os.path.exists(VTPM_DIR):"},{"line_number":727,"context_line":"        nova.privsep.path.makedirs(VTPM_DIR)"},{"line_number":728,"context_line":"        nova.privsep.path.chmod(VTPM_DIR, 0o711)"},{"line_number":729,"context_line":"    elif not os.path.isdir(VTPM_DIR):"},{"line_number":730,"context_line":"        msg \u003d _("},{"line_number":731,"context_line":"            \u0027Guest wants emulated TPM but host path %s is not a directory.\u0027)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_143f1387","line":728,"range":{"start_line":728,"start_character":42,"end_line":728,"end_character":47},"updated":"2020-08-26 11:53:58.000000000","message":"wouldn\u0027t 700 be more secure?","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"503cef633728bf398283c3b5e24b1a8329c76b8d","unresolved":false,"context_lines":[{"line_number":725,"context_line":"    # permissions/ownership"},{"line_number":726,"context_line":"    if not os.path.exists(VTPM_DIR):"},{"line_number":727,"context_line":"        nova.privsep.path.makedirs(VTPM_DIR)"},{"line_number":728,"context_line":"        nova.privsep.path.chmod(VTPM_DIR, 0o711)"},{"line_number":729,"context_line":"    elif not os.path.isdir(VTPM_DIR):"},{"line_number":730,"context_line":"        msg \u003d _("},{"line_number":731,"context_line":"            \u0027Guest wants emulated TPM but host path %s is not a directory.\u0027)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_4b1f29b6","line":728,"range":{"start_line":728,"start_character":42,"end_line":728,"end_character":47},"in_reply_to":"9f560f44_143f1387","updated":"2020-08-26 13:20:47.000000000","message":"It\u0027s a directory though. Don\u0027t directories have to be executable?","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"06a6e3bd3d69a8a33157d0ae4d388139676e47f6","unresolved":false,"context_lines":[{"line_number":725,"context_line":"    # permissions/ownership"},{"line_number":726,"context_line":"    if not os.path.exists(VTPM_DIR):"},{"line_number":727,"context_line":"        nova.privsep.path.makedirs(VTPM_DIR)"},{"line_number":728,"context_line":"        nova.privsep.path.chmod(VTPM_DIR, 0o711)"},{"line_number":729,"context_line":"    elif not os.path.isdir(VTPM_DIR):"},{"line_number":730,"context_line":"        msg \u003d _("},{"line_number":731,"context_line":"            \u0027Guest wants emulated TPM but host path %s is not a directory.\u0027)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_51751831","line":728,"range":{"start_line":728,"start_character":42,"end_line":728,"end_character":47},"in_reply_to":"9f560f44_4b1f29b6","updated":"2020-08-26 13:34:38.000000000","message":"To list the content of the directory the directory needs to be executable. So basically having 711 means others can list the content of the directory leaking the information that the instance has a vtpm or not.","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d7cae352da7bd04f01a6742c5ef255fafd17be47","unresolved":false,"context_lines":[{"line_number":732,"context_line":"        raise exception.Invalid(msg % VTPM_DIR)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    # Set ownership of instance-specific files"},{"line_number":735,"context_line":"    nova.privsep.path.chown("},{"line_number":736,"context_line":"        swtpm_dir,"},{"line_number":737,"context_line":"        CONF.libvirt.swtpm_user,"},{"line_number":738,"context_line":"        CONF.libvirt.swtpm_group,"},{"line_number":739,"context_line":"        recursive\u003dTrue)"},{"line_number":740,"context_line":"    # Move instance-specific directory to global dir"},{"line_number":741,"context_line":"    nova.privsep.path.move_tree(swtpm_dir, VTPM_DIR)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_34705772","line":739,"range":{"start_line":735,"start_character":0,"end_line":739,"end_character":23},"updated":"2020-08-26 11:53:58.000000000","message":"this calls os.chown and that requires numeric user and group ids [1]\n\n[1] https://docs.python.org/3/library/os.html#os.chown","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2316b1ed64a6989f478b5daaa91e8022688b43fd","unresolved":false,"context_lines":[{"line_number":732,"context_line":"        raise exception.Invalid(msg % VTPM_DIR)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    # Set ownership of instance-specific files"},{"line_number":735,"context_line":"    nova.privsep.path.chown("},{"line_number":736,"context_line":"        swtpm_dir,"},{"line_number":737,"context_line":"        CONF.libvirt.swtpm_user,"},{"line_number":738,"context_line":"        CONF.libvirt.swtpm_group,"},{"line_number":739,"context_line":"        recursive\u003dTrue)"},{"line_number":740,"context_line":"    # Move instance-specific directory to global dir"},{"line_number":741,"context_line":"    nova.privsep.path.move_tree(swtpm_dir, VTPM_DIR)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_ff79932e","line":739,"range":{"start_line":735,"start_character":0,"end_line":739,"end_character":23},"in_reply_to":"9f560f44_2b48f5b0","updated":"2020-08-26 14:43:05.000000000","message":"Done","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"503cef633728bf398283c3b5e24b1a8329c76b8d","unresolved":false,"context_lines":[{"line_number":732,"context_line":"        raise exception.Invalid(msg % VTPM_DIR)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    # Set ownership of instance-specific files"},{"line_number":735,"context_line":"    nova.privsep.path.chown("},{"line_number":736,"context_line":"        swtpm_dir,"},{"line_number":737,"context_line":"        CONF.libvirt.swtpm_user,"},{"line_number":738,"context_line":"        CONF.libvirt.swtpm_group,"},{"line_number":739,"context_line":"        recursive\u003dTrue)"},{"line_number":740,"context_line":"    # Move instance-specific directory to global dir"},{"line_number":741,"context_line":"    nova.privsep.path.move_tree(swtpm_dir, VTPM_DIR)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9f560f44_2b48f5b0","line":739,"range":{"start_line":735,"start_character":0,"end_line":739,"end_character":23},"in_reply_to":"9f560f44_34705772","updated":"2020-08-26 13:20:47.000000000","message":"gdi. /me wonders if I inadvertently switched from shutil.chown to os.chown at some point","commit_id":"73d2ef827a1161961f6af1fd18b1e04489ce51b1"}]}
