)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"618dcb69bae7abb41b945447d79899c5e88cf565","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e20b85da_802d547d","updated":"2025-02-14 13:48:41.000000000","message":"I have disk.swap in xml\nbut disk.swap is not present in data storage\n\n```\n$ ls /tmp/tmp8k_cvrc6/b09bdf2f-0ef9-41d7-893f-2160bf55b05c/\ndisk  disk.info\n\n$ cat /tmp/tmp8k_cvrc6/b09bdf2f-0ef9-41d7-893f-2160bf55b05c/disk.info \n{\"/tmp/tmp8k_cvrc6/b09bdf2f-0ef9-41d7-893f-2160bf55b05c/disk\": \"qcow2\", \"/tmp/tmp8k_cvrc6/b09bdf2f-0ef9-41d7-893f-2160bf55b05c/disk.swap\": \"qcow2\", \"/tmp/tmp8k_cvrc6/b09bdf2f-0ef9-41d7-893f-2160bf55b05c/disk.config\": \"raw\"}\n```\n\nso  test should fail at guest.launch at https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L8134","commit_id":"0245fca48b7bf7f226a1b002edfc423c1b625869"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"3dbb78565c0fccda1aa79ce2b7857fe2cdfd1e54","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a28c4d66_aa08c811","updated":"2025-02-14 10:40:04.000000000","message":"during finish_migrtion:\n\n- `_create_image`: creates disk, but not creating for disk.swap in shared storage\n- `_create_guest_with_network`: launch the the VM, right now its failing because disk.swap is present in xml but not in nova/instance/ins-id/\n\nControlflow is as follows:\n- during resize_instance when nova ask to poweroff VM and copy all disks to new HOST, it skips[1] disk.swap, because it won\u0027t have any userdata and its easy to just create new during finish_resize\n- during finish_resize apart from BDM info given to driver,  imagebackend reads disk.info file but as disks are already listed in disk.info do not recreate them, which it does during new new VM creation.\n- now the issue is because we did not copied disk.swap from src HOST to target HOST, and not created later too, launch VM is failing, because it expects it from xml \n\nI suggest (added in fix patch) and tested in env with shared storage.\n- if we remove disk.swap from disk.info file, imagebackend create disk.swap without issue, ad VM get launched successfully\n\n[1] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L12239","commit_id":"0245fca48b7bf7f226a1b002edfc423c1b625869"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"43011460a11eace5b46e3e6e768a4b9128d77fac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9328b6af_2f512313","updated":"2025-02-14 13:45:33.000000000","message":"in VM xml for disks, its coming as raw, but I wanted it to qcow2\n\n```\n\u003cdisk type\u003d\"file\" device\u003d\"disk\"\u003e\n      \u003cdriver type\u003d\"raw\" cache\u003d\"none\"/\u003e\n      \u003csource file\u003d\"/tmp/tmp8k_cvrc6/b09bdf2f-0ef9-41d7-893f-2160bf55b05c/disk\"/\u003e\n      \u003ctarget dev\u003d\"vda\" bus\u003d\"virtio\"/\u003e\n    \u003c/disk\u003e\n    \u003cdisk type\u003d\"file\" device\u003d\"disk\"\u003e\n      \u003cdriver type\u003d\"raw\" cache\u003d\"none\"/\u003e\n      \u003csource file\u003d\"/tmp/tmp8k_cvrc6/b09bdf2f-0ef9-41d7-893f-2160bf55b05c/disk.eph0\"/\u003e\n      \u003ctarget dev\u003d\"vdb\" bus\u003d\"virtio\"/\u003e\n    \u003c/disk\u003e\n    \u003cdisk type\u003d\"file\" device\u003d\"disk\"\u003e\n      \u003cdriver type\u003d\"raw\" cache\u003d\"none\"/\u003e\n      \u003csource file\u003d\"/tmp/tmp8k_cvrc6/b09bdf2f-0ef9-41d7-893f-2160bf55b05c/disk.swap\"/\u003e\n      \u003ctarget dev\u003d\"vdc\" bus\u003d\"virtio\"/\u003e\n    \u003c/disk\u003e\n\n```","commit_id":"0245fca48b7bf7f226a1b002edfc423c1b625869"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"1bc129f607f5ccc8118b2218f2f59e3ecd23cf5f","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f883668e_53be11d5","in_reply_to":"a13e1792_4ee8d5fc","updated":"2025-02-14 14:01:54.000000000","message":"guest obj is not mocked\n`\u003cGuest 1 instance-00000001 bf956e49-2398-4d01-b06b-cfb8ada938e1\u003e`","commit_id":"0245fca48b7bf7f226a1b002edfc423c1b625869"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"6c4a1e30ac0af88e13a1ca915ef708c262c349f7","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a13e1792_4ee8d5fc","in_reply_to":"e20b85da_802d547d","updated":"2025-02-14 13:52:19.000000000","message":"it must be because launch mocked too.","commit_id":"0245fca48b7bf7f226a1b002edfc423c1b625869"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"16a07190f1da8e268037d8bff7087c8c5cce2b6c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9af15c41_750b8bf3","updated":"2025-02-18 15:31:19.000000000","message":"recheck nova-tox-functional\ncould not mock imagebackend","commit_id":"e8ef1de1ff5b9b2fdafaf07e028471ccb15703b9"}],"nova/tests/functional/regressions/test_bug_2095391.py":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"9d77b64b5e1158a48de301e08b9cfb92a68055b5","unresolved":true,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # NOTE(auniyal): create_swap at imagebackend did not get called"},{"line_number":77,"context_line":"        # during finish_resize"},{"line_number":78,"context_line":"        self.imagebackend.mock_create_swap.assert_not_called()"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        host2 \u003d server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":81,"context_line":"        self.assertNotEqual(host1, host2)"}],"source_content_type":"text/x-python","patch_set":7,"id":"04118ffc_1f62a1a5","line":78,"range":{"start_line":78,"start_character":0,"end_line":78,"end_character":62},"updated":"2025-02-19 16:56:44.000000000","message":"after fix too this is not getting called","commit_id":"fbe8c4d98000e5ab59a49a6d8e50e8ad9160280f"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6f4da0c32482d9b7366c65224280dcf280c92b7d","unresolved":true,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # NOTE(auniyal): create_swap at imagebackend did not get called"},{"line_number":77,"context_line":"        # during finish_resize"},{"line_number":78,"context_line":"        self.imagebackend.mock_create_swap.assert_not_called()"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        host2 \u003d server[\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":81,"context_line":"        self.assertNotEqual(host1, host2)"}],"source_content_type":"text/x-python","patch_set":7,"id":"4cdc7eb4_7cffdd73","line":78,"range":{"start_line":78,"start_character":0,"end_line":78,"end_character":62},"in_reply_to":"04118ffc_1f62a1a5","updated":"2025-02-28 01:26:08.000000000","message":"It took me awhile to understand why this is but the tl;dr is that `_create_swap()` is called only for creating the base image (the backing file) for swap -- it is not the thing that creates the qcow2 overlay for the specific instance.\n\nThis is expected because the base image for the swap got created when you first created the first instance with swap\u003d1, and if it is on shared storage, all computes will be sharing the same base image directory (image cache). So the destination compute already has the base image and does not need to create it again. It will only create the overlay when `create_qcow2_image()` is called in the imagebackend.","commit_id":"fbe8c4d98000e5ab59a49a6d8e50e8ad9160280f"}]}
