)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fc829da2e4fe17ae05dbc0aa024ea44392ff1b8b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"282ceaf7_df522e41","updated":"2022-08-04 09:49:53.000000000","message":"Damn, I made a mistake, we don\u0027t persist the mdev *name* in the domain XML but just a regular UUID :\n   \u003chostdev mode\u003d\u0027subsystem\u0027 type\u003d\u0027mdev\u0027 model\u003d\u0027vfio-pci\u0027\u003e\n  \u003csource\u003e\n    \u003caddress uuid\u003d\u0027c2177883-f1bb-47f0-914d-32a22e3a8804\u0027/\u003e\n  \u003c/source\u003e\n  \u003c/hostdev\u003e\n\nhttps://libvirt.org/formatdomain.html#usb-pci-scsi-devices","commit_id":"5a58cbcc2a550fc5a5a112eaa35f29da863623c8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77468137c66993c02f3b23d27042a338edaeb429","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"cf284c52_8b2a066b","updated":"2022-08-03 08:02:17.000000000","message":"I have questions :)","commit_id":"5a58cbcc2a550fc5a5a112eaa35f29da863623c8"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"9c00112d1112426e019dad7bdd0130391d6db809","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a3c89d49_7a4fceb2","updated":"2022-09-12 07:13:31.000000000","message":"Maybe only support this for libvirt versions that support autostart for mdevs? Seems like a lot of logic to implement recreation of mdevs in nova as well","commit_id":"5a58cbcc2a550fc5a5a112eaa35f29da863623c8"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77468137c66993c02f3b23d27042a338edaeb429","unresolved":true,"context_lines":[{"line_number":1079,"context_line":"                ):"},{"line_number":1080,"context_line":"                    msg \u003d (\"Can\u0027t recreate the mediated devices as we don\u0027t \""},{"line_number":1081,"context_line":"                           \"know the parent. Please recreate them before \""},{"line_number":1082,"context_line":"                           \"restarting nova-compute.\")"},{"line_number":1083,"context_line":"                    raise exception.InvalidLibvirtMdevConfig(reason\u003dmsg)"},{"line_number":1084,"context_line":"                parent \u003d libvirt_utils.mdev_name2parent(mdev_uuid)"},{"line_number":1085,"context_line":"                self._create_new_mediated_device(parent, uuid\u003dmdev_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3c540284_b9e16ee0","line":1082,"updated":"2022-08-03 08:02:17.000000000","message":"hm, can we still use dev_info[\u0027parent\u0027] for libvirt \u003c 7.7 or that code path never worked?","commit_id":"5a58cbcc2a550fc5a5a112eaa35f29da863623c8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fc829da2e4fe17ae05dbc0aa024ea44392ff1b8b","unresolved":true,"context_lines":[{"line_number":1079,"context_line":"                ):"},{"line_number":1080,"context_line":"                    msg \u003d (\"Can\u0027t recreate the mediated devices as we don\u0027t \""},{"line_number":1081,"context_line":"                           \"know the parent. Please recreate them before \""},{"line_number":1082,"context_line":"                           \"restarting nova-compute.\")"},{"line_number":1083,"context_line":"                    raise exception.InvalidLibvirtMdevConfig(reason\u003dmsg)"},{"line_number":1084,"context_line":"                parent \u003d libvirt_utils.mdev_name2parent(mdev_uuid)"},{"line_number":1085,"context_line":"                self._create_new_mediated_device(parent, uuid\u003dmdev_uuid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"edcd27c1_3bc2da4b","line":1082,"in_reply_to":"3c540284_b9e16ee0","updated":"2022-08-04 09:49:53.000000000","message":"Well, the bug was due to a stupid copy/paste, the logic was wrong. See what we were doing before this change :\n- look at all the instances and give me all the mdev UUIDs each instance has in the XML\n- verify whether the related mdev exists in sysfs for this UUID\n- well, if not, then we don\u0027t have a mdev but we know we should recreate it.\n\nThen, what we do ? We ask libvirt to get the mdev information (L1076). But heh, the mdev is not existing ! \n\nTo answer your question, _get_mediated_device_information() returns you a dict for the mdev, where *indeed* we have a key named \"parent\", even before libvirt 7.7.\n\nBut, see, given the mdev doesn\u0027t exist, we couldn\u0027t get the parent :) \n\nFortunately, after libvirt 7.7, now the parent name is *also* in the mdev name, so we can get it, without asking libvirt (or Placement).\nWhat we could do for libvirt \u003c7.7 is to ask Placement which RP is getting an allocation for this mdev, and that\u0027s what someone tried to work on with https://review.opendev.org/c/openstack/nova/+/810220 but I think that\u0027s simplier to no longer accept to recreate mdevs if libvirt \u003c7.7 and just wait for libvirt to provide us what we need.","commit_id":"5a58cbcc2a550fc5a5a112eaa35f29da863623c8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77468137c66993c02f3b23d27042a338edaeb429","unresolved":true,"context_lines":[{"line_number":1081,"context_line":"                           \"know the parent. Please recreate them before \""},{"line_number":1082,"context_line":"                           \"restarting nova-compute.\")"},{"line_number":1083,"context_line":"                    raise exception.InvalidLibvirtMdevConfig(reason\u003dmsg)"},{"line_number":1084,"context_line":"                parent \u003d libvirt_utils.mdev_name2parent(mdev_uuid)"},{"line_number":1085,"context_line":"                self._create_new_mediated_device(parent, uuid\u003dmdev_uuid)"},{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"    def _check_file_backed_memory_support(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"74eb097d_bd6795af","line":1084,"updated":"2022-08-03 08:02:17.000000000","message":"does the parent from the libvirt devname suffix the same as the parent we get via cfgdev.parent from libvirt? If yes then I don\u0027t see why we need to have two ways to read that parent info. The cfgdev.parent way seems the more stable one so I would like to use that.","commit_id":"5a58cbcc2a550fc5a5a112eaa35f29da863623c8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fc829da2e4fe17ae05dbc0aa024ea44392ff1b8b","unresolved":true,"context_lines":[{"line_number":1081,"context_line":"                           \"know the parent. Please recreate them before \""},{"line_number":1082,"context_line":"                           \"restarting nova-compute.\")"},{"line_number":1083,"context_line":"                    raise exception.InvalidLibvirtMdevConfig(reason\u003dmsg)"},{"line_number":1084,"context_line":"                parent \u003d libvirt_utils.mdev_name2parent(mdev_uuid)"},{"line_number":1085,"context_line":"                self._create_new_mediated_device(parent, uuid\u003dmdev_uuid)"},{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"    def _check_file_backed_memory_support(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9bd6fbfd_b06cc07b","line":1084,"in_reply_to":"74eb097d_bd6795af","updated":"2022-08-04 09:49:53.000000000","message":"We can\u0027t obtain anything from libvirt as the mdev no longer exists. What we only have is the mdev UUID in the guest domain XML.\n\n... // later.\n\nOh, shit, I\u0027m *again* wrong : the above can\u0027t work : we don\u0027t have a libvirt name stored in the instance domain XML but just a regular UUID4 corresponding to the mdev UUID.\n\nShit, what we then only need for this code is to drop the call to mdev_name2parent() as it won\u0027t never be useful in recreate.","commit_id":"5a58cbcc2a550fc5a5a112eaa35f29da863623c8"}]}
