)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"7a611f0fbd4b16ce1a1e11d33edfec4fce904ab1","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Nova resize don\u0027t extend disk in one specific case"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova resize not apply extend virtual size of the instance if the image"},{"line_number":10,"context_line":"is not accessible by the customer (public image use to build the"},{"line_number":11,"context_line":"instance is now private image because this image is deprecated) and the"},{"line_number":12,"context_line":"source compute of the resize don\u0027t have anymore the base image."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Related-Bug: #1558880"},{"line_number":15,"context_line":"Change-Id: I4d6dfca1efe10caebb017b6ec96820979018203f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"cc58c857_d6d6ff18","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":63},"updated":"2021-12-09 12:50:41.000000000","message":"If that\u0027s the case wouldn\u0027t we expect the resize to fail as we\u0027d need access to the image either from Glance or cached on the computes?","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"88d62924_17206966","updated":"2021-12-09 15:14:21.000000000","message":"Apologies for the confusion, still -1 for a few test issues but I get what you\u0027re trying to do now.\n\nI wonder if we could also exercise this in a functional test somehow?","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1e4636567bd06eefe95aaff5c912e707220379c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a4ce7bec_cc5bbf00","updated":"2021-12-08 15:38:31.000000000","message":"This is an area of code i dont often review so ill defer to others who are more knoladgeable\nin this area but this looks reasonable to me.\n\na fixes release note would be nice to add in a followup but over all  i think this deserving of a +1","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"030d57ccb19c2b8a3bbd08d0488ace64c66146ef","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"320fa154_824b75f4","updated":"2021-12-09 12:30:57.000000000","message":"lee  mentioned on irc that he tought there was something incorrect with this patch but did not say what it was so removing +1 for now. i dont know exactly what that is so i wont -1 but i have added lee as a reviewer to the change","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"7f89308be3afc4d749aa33860140314d3f22c184","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0e387df8_27d66624","updated":"2021-12-08 13:08:32.000000000","message":"recheck","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f4649bd9b9cb3d5b90f6db6499de52c32c40a2af","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"ddd78f92_f0e563d9","updated":"2022-01-18 12:46:55.000000000","message":"i guess this works but im very surpeised the with statement is not raising an error","commit_id":"fb12fee9d55535a01fae20008a0f54ba31f6aebe"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"68b462c929b0576bf3da7f0b602ee9a2fa0594bc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"16f2c810_4e1b156c","updated":"2021-12-10 13:17:05.000000000","message":"recheck","commit_id":"fb12fee9d55535a01fae20008a0f54ba31f6aebe"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"6548bba1a0455d4ef7d5389be1bef65718a0a073","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"23f3ef47_b10e2957","updated":"2021-12-13 08:47:14.000000000","message":"recheck","commit_id":"fb12fee9d55535a01fae20008a0f54ba31f6aebe"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"cdbc2116c9a352b48927fc877f2b0f993efff17a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"b1f74bcf_4853751d","updated":"2021-12-10 15:54:43.000000000","message":"recheck","commit_id":"fb12fee9d55535a01fae20008a0f54ba31f6aebe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"831d0802818f7721b942df024662a1ce6ad10565","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"324aaf41_c005c56b","updated":"2022-03-02 11:36:04.000000000","message":"This looks good to me.","commit_id":"f7af85dd7431eea61cdd2b1723a5dbcc3d9471ed"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4629750a2db12a3eb761bd8026ed1fed61508657","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"9848c6b7_64182feb","updated":"2022-01-24 10:36:55.000000000","message":"i think this is correct and i think you have addressed lees comments but i would like them to confirm","commit_id":"f7af85dd7431eea61cdd2b1723a5dbcc3d9471ed"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"fd4aada33a4916b82fd2f57f9f17a4f584d11704","unresolved":true,"context_lines":[{"line_number":13624,"context_line":""},{"line_number":13625,"context_line":"        base_dir \u003d os.path.join(CONF.instances_path,"},{"line_number":13626,"context_line":"                                CONF.image_cache.subdirectory_name)"},{"line_number":13627,"context_line":"        trusted_certs \u003d objects.TrustedCerts("},{"line_number":13628,"context_line":"            ids\u003d[\u00270b5d2c72-12cc-4ba6-a8d7-3ff5cc1d8cb8\u0027,"},{"line_number":13629,"context_line":"                 \u0027674736e3-f25c-405c-8362-bbf991e0ce0a\u0027])"},{"line_number":13630,"context_line":"        self.test_instance.update({\u0027user_id\u0027: \u0027fake-user\u0027,"},{"line_number":13631,"context_line":"                                   \u0027os_type\u0027: None,"},{"line_number":13632,"context_line":"                                   \u0027trusted_certs\u0027: trusted_certs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"03dbb426_95787cb2","line":13629,"range":{"start_line":13627,"start_character":8,"end_line":13629,"end_character":57},"updated":"2021-12-07 14:40:20.000000000","message":"im not sure we really need this but it also wont hurt","commit_id":"65ce8e6e31db44eaad960c8fdae6362a2bb8361f"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"a7b2cba7d508cca4aad04b23b974ca5482704533","unresolved":false,"context_lines":[{"line_number":13624,"context_line":""},{"line_number":13625,"context_line":"        base_dir \u003d os.path.join(CONF.instances_path,"},{"line_number":13626,"context_line":"                                CONF.image_cache.subdirectory_name)"},{"line_number":13627,"context_line":"        trusted_certs \u003d objects.TrustedCerts("},{"line_number":13628,"context_line":"            ids\u003d[\u00270b5d2c72-12cc-4ba6-a8d7-3ff5cc1d8cb8\u0027,"},{"line_number":13629,"context_line":"                 \u0027674736e3-f25c-405c-8362-bbf991e0ce0a\u0027])"},{"line_number":13630,"context_line":"        self.test_instance.update({\u0027user_id\u0027: \u0027fake-user\u0027,"},{"line_number":13631,"context_line":"                                   \u0027os_type\u0027: None,"},{"line_number":13632,"context_line":"                                   \u0027trusted_certs\u0027: trusted_certs,"}],"source_content_type":"text/x-python","patch_set":2,"id":"e138bc2c_b8599c45","line":13629,"range":{"start_line":13627,"start_character":8,"end_line":13629,"end_character":57},"in_reply_to":"03dbb426_95787cb2","updated":"2021-12-08 10:11:33.000000000","message":"Done","commit_id":"65ce8e6e31db44eaad960c8fdae6362a2bb8361f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"fd4aada33a4916b82fd2f57f9f17a4f584d11704","unresolved":true,"context_lines":[{"line_number":13652,"context_line":"            if dest \u003d\u003d backfile_path:"},{"line_number":13653,"context_line":"                # dest is created under TempDir() fixture,"},{"line_number":13654,"context_line":"                # it will go away after test cleanup"},{"line_number":13655,"context_line":"                with open(dest, \u0027a\u0027):"},{"line_number":13656,"context_line":"                    pass"},{"line_number":13657,"context_line":""},{"line_number":13658,"context_line":"        with test.nested("},{"line_number":13659,"context_line":"            mock.patch.object(libvirt_driver.libvirt_utils, \u0027copy_image\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fe644423_327b190b","line":13656,"range":{"start_line":13655,"start_character":16,"end_line":13656,"end_character":24},"updated":"2021-12-07 14:40:20.000000000","message":"do we really need to even call open? can we not just have fake_copy_image be a mock that does nothing.\n\nwe do not seam to be asserting that open is called so i dont think this is needed","commit_id":"65ce8e6e31db44eaad960c8fdae6362a2bb8361f"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"a7b2cba7d508cca4aad04b23b974ca5482704533","unresolved":false,"context_lines":[{"line_number":13652,"context_line":"            if dest \u003d\u003d backfile_path:"},{"line_number":13653,"context_line":"                # dest is created under TempDir() fixture,"},{"line_number":13654,"context_line":"                # it will go away after test cleanup"},{"line_number":13655,"context_line":"                with open(dest, \u0027a\u0027):"},{"line_number":13656,"context_line":"                    pass"},{"line_number":13657,"context_line":""},{"line_number":13658,"context_line":"        with test.nested("},{"line_number":13659,"context_line":"            mock.patch.object(libvirt_driver.libvirt_utils, \u0027copy_image\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"6cd47e57_7a970cf0","line":13656,"range":{"start_line":13655,"start_character":16,"end_line":13656,"end_character":24},"in_reply_to":"fe644423_327b190b","updated":"2021-12-08 10:11:33.000000000","message":"Done","commit_id":"65ce8e6e31db44eaad960c8fdae6362a2bb8361f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":false,"context_lines":[{"line_number":13624,"context_line":""},{"line_number":13625,"context_line":"        base_dir \u003d os.path.join(CONF.instances_path,"},{"line_number":13626,"context_line":"                                CONF.image_cache.subdirectory_name)"},{"line_number":13627,"context_line":"        self.test_instance.update({\u0027user_id\u0027: \u0027fake-user\u0027,"},{"line_number":13628,"context_line":"                                   \u0027os_type\u0027: None,"},{"line_number":13629,"context_line":"                                   \u0027kernel_id\u0027: uuids.kernel_id,"},{"line_number":13630,"context_line":"                                   \u0027ramdisk_id\u0027: uuids.ramdisk_id,"},{"line_number":13631,"context_line":"                                   \u0027project_id\u0027: \u0027fake-project\u0027})"},{"line_number":13632,"context_line":"        instance \u003d objects.Instance(**self.test_instance)"},{"line_number":13633,"context_line":""},{"line_number":13634,"context_line":"        backing_file \u003d imagecache.get_cache_fname(instance.image_ref)"}],"source_content_type":"text/x-python","patch_set":3,"id":"81731fea_06cb2d11","line":13631,"range":{"start_line":13627,"start_character":0,"end_line":13631,"end_character":65},"updated":"2021-12-09 15:14:21.000000000","message":"supernit - feel free to ignore\n\n  self.test_instance.update({\n      \u0027user_id\u0027: \u0027fake-user\u0027,\n      \u0027os_type\u0027: None,\n      \u0027kernel_id\u0027: uuids.kernel_id,\n      \u0027ramdisk_id\u0027: uuids.ramdisk_id,\n      \u0027project_id\u0027: \u0027fake-project\u0027\n  })","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f4649bd9b9cb3d5b90f6db6499de52c32c40a2af","unresolved":false,"context_lines":[{"line_number":13624,"context_line":""},{"line_number":13625,"context_line":"        base_dir \u003d os.path.join(CONF.instances_path,"},{"line_number":13626,"context_line":"                                CONF.image_cache.subdirectory_name)"},{"line_number":13627,"context_line":"        self.test_instance.update({\u0027user_id\u0027: \u0027fake-user\u0027,"},{"line_number":13628,"context_line":"                                   \u0027os_type\u0027: None,"},{"line_number":13629,"context_line":"                                   \u0027kernel_id\u0027: uuids.kernel_id,"},{"line_number":13630,"context_line":"                                   \u0027ramdisk_id\u0027: uuids.ramdisk_id,"},{"line_number":13631,"context_line":"                                   \u0027project_id\u0027: \u0027fake-project\u0027})"},{"line_number":13632,"context_line":"        instance \u003d objects.Instance(**self.test_instance)"},{"line_number":13633,"context_line":""},{"line_number":13634,"context_line":"        backing_file \u003d imagecache.get_cache_fname(instance.image_ref)"}],"source_content_type":"text/x-python","patch_set":3,"id":"70e16c7e_2499b9c6","line":13631,"range":{"start_line":13627,"start_character":0,"end_line":13631,"end_character":65},"in_reply_to":"81731fea_06cb2d11","updated":"2022-01-18 12:46:55.000000000","message":"done","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":false,"context_lines":[{"line_number":13635,"context_line":"        backfile_path \u003d os.path.join(base_dir, backing_file)"},{"line_number":13636,"context_line":"        disk_size \u003d 10747904"},{"line_number":13637,"context_line":"        virt_disk_size \u003d 25165824"},{"line_number":13638,"context_line":"        disk_info \u003d ["},{"line_number":13639,"context_line":"            {u\u0027backing_file\u0027: backing_file,"},{"line_number":13640,"context_line":"             u\u0027disk_size\u0027: disk_size,"},{"line_number":13641,"context_line":"             u\u0027path\u0027: u\u0027disk_path\u0027,"},{"line_number":13642,"context_line":"             u\u0027type\u0027: u\u0027raw\u0027,"},{"line_number":13643,"context_line":"             u\u0027virt_disk_size\u0027: virt_disk_size}]"},{"line_number":13644,"context_line":""},{"line_number":13645,"context_line":"        with test.nested("},{"line_number":13646,"context_line":"            mock.patch.object(libvirt_driver.libvirt_utils, \u0027copy_image\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"8c4062ea_e4eb6db4","line":13643,"range":{"start_line":13638,"start_character":0,"end_line":13643,"end_character":48},"updated":"2021-12-09 15:14:21.000000000","message":"supernit - feel free to ignore\n\n  disk_info \u003d [{\n      \u0027backing_file\u0027: backing_file,\n      \u0027disk_size\u0027: disk_size,\n      \u0027path\u0027: \u0027disk_path\u0027,\n      \u0027type\u0027: \u0027raw\u0027,\n      \u0027virt_disk_size\u0027: virt_disk_size\n  }]","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f4649bd9b9cb3d5b90f6db6499de52c32c40a2af","unresolved":false,"context_lines":[{"line_number":13635,"context_line":"        backfile_path \u003d os.path.join(base_dir, backing_file)"},{"line_number":13636,"context_line":"        disk_size \u003d 10747904"},{"line_number":13637,"context_line":"        virt_disk_size \u003d 25165824"},{"line_number":13638,"context_line":"        disk_info \u003d ["},{"line_number":13639,"context_line":"            {u\u0027backing_file\u0027: backing_file,"},{"line_number":13640,"context_line":"             u\u0027disk_size\u0027: disk_size,"},{"line_number":13641,"context_line":"             u\u0027path\u0027: u\u0027disk_path\u0027,"},{"line_number":13642,"context_line":"             u\u0027type\u0027: u\u0027raw\u0027,"},{"line_number":13643,"context_line":"             u\u0027virt_disk_size\u0027: virt_disk_size}]"},{"line_number":13644,"context_line":""},{"line_number":13645,"context_line":"        with test.nested("},{"line_number":13646,"context_line":"            mock.patch.object(libvirt_driver.libvirt_utils, \u0027copy_image\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ac24651_ac47797b","line":13643,"range":{"start_line":13638,"start_character":0,"end_line":13643,"end_character":48},"in_reply_to":"8c4062ea_e4eb6db4","updated":"2022-01-18 12:46:55.000000000","message":"done","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":true,"context_lines":[{"line_number":13649,"context_line":"                                  image_id\u003duuids.fake_id)),"},{"line_number":13650,"context_line":"            mock.patch.object(imagebackend.Flat, \u0027resize_image\u0027),"},{"line_number":13651,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027,"},{"line_number":13652,"context_line":"                              return_value\u003ddisk_size),"},{"line_number":13653,"context_line":"            mock.patch.object(imagebackend.Image, \u0027exists\u0027,"},{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"}],"source_content_type":"text/x-python","patch_set":3,"id":"d519fa8c_d53cc129","line":13652,"range":{"start_line":13652,"start_character":30,"end_line":13652,"end_character":52},"updated":"2021-12-09 15:14:21.000000000","message":"new\u003dmock.Mock(return_value\u003ddisk_size) and then drop get_disk_size_mock below.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"bcb1b7d48f5d8fa404aadc9704542ca1f8dd1836","unresolved":false,"context_lines":[{"line_number":13649,"context_line":"                                  image_id\u003duuids.fake_id)),"},{"line_number":13650,"context_line":"            mock.patch.object(imagebackend.Flat, \u0027resize_image\u0027),"},{"line_number":13651,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027,"},{"line_number":13652,"context_line":"                              return_value\u003ddisk_size),"},{"line_number":13653,"context_line":"            mock.patch.object(imagebackend.Image, \u0027exists\u0027,"},{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ae4c77cc_e804ffe1","line":13652,"range":{"start_line":13652,"start_character":30,"end_line":13652,"end_character":52},"in_reply_to":"9707e72c_aa17552d","updated":"2022-01-21 15:32:28.000000000","message":"Done \nThx for the explanation","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f4649bd9b9cb3d5b90f6db6499de52c32c40a2af","unresolved":true,"context_lines":[{"line_number":13649,"context_line":"                                  image_id\u003duuids.fake_id)),"},{"line_number":13650,"context_line":"            mock.patch.object(imagebackend.Flat, \u0027resize_image\u0027),"},{"line_number":13651,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027,"},{"line_number":13652,"context_line":"                              return_value\u003ddisk_size),"},{"line_number":13653,"context_line":"            mock.patch.object(imagebackend.Image, \u0027exists\u0027,"},{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9707e72c_aa17552d","line":13652,"range":{"start_line":13652,"start_character":30,"end_line":13652,"end_character":52},"in_reply_to":"d3d8efc5_c5ca7c5e","updated":"2022-01-18 12:46:55.000000000","message":"this is not done","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"b4630692d1e1fa188f272de9114d6a9c677394fa","unresolved":true,"context_lines":[{"line_number":13649,"context_line":"                                  image_id\u003duuids.fake_id)),"},{"line_number":13650,"context_line":"            mock.patch.object(imagebackend.Flat, \u0027resize_image\u0027),"},{"line_number":13651,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027,"},{"line_number":13652,"context_line":"                              return_value\u003ddisk_size),"},{"line_number":13653,"context_line":"            mock.patch.object(imagebackend.Image, \u0027exists\u0027,"},{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"}],"source_content_type":"text/x-python","patch_set":3,"id":"d3d8efc5_c5ca7c5e","line":13652,"range":{"start_line":13652,"start_character":30,"end_line":13652,"end_character":52},"in_reply_to":"d519fa8c_d53cc129","updated":"2021-12-10 10:23:43.000000000","message":"I don\u0027t know how to do it because disk_size is a value define in the test. Can you help me?","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":true,"context_lines":[{"line_number":13651,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027,"},{"line_number":13652,"context_line":"                              return_value\u003ddisk_size),"},{"line_number":13653,"context_line":"            mock.patch.object(imagebackend.Image, \u0027exists\u0027,"},{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"},{"line_number":13656,"context_line":"              get_disk_size_mock, exists_path):"},{"line_number":13657,"context_line":"            conn._create_images_and_backing(self.context, instance,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3364d98b_0cf18cac","line":13654,"range":{"start_line":13654,"start_character":30,"end_line":13654,"end_character":47},"updated":"2021-12-09 15:14:21.000000000","message":"new\u003dmock.Mock(return_value\u003dTrue) and then drop exists_path below.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"b4630692d1e1fa188f272de9114d6a9c677394fa","unresolved":false,"context_lines":[{"line_number":13651,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027,"},{"line_number":13652,"context_line":"                              return_value\u003ddisk_size),"},{"line_number":13653,"context_line":"            mock.patch.object(imagebackend.Image, \u0027exists\u0027,"},{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"},{"line_number":13656,"context_line":"              get_disk_size_mock, exists_path):"},{"line_number":13657,"context_line":"            conn._create_images_and_backing(self.context, instance,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a6636bd_b5eedad7","line":13654,"range":{"start_line":13654,"start_character":30,"end_line":13654,"end_character":47},"in_reply_to":"3364d98b_0cf18cac","updated":"2021-12-10 10:23:43.000000000","message":"Done","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":true,"context_lines":[{"line_number":13652,"context_line":"                              return_value\u003ddisk_size),"},{"line_number":13653,"context_line":"            mock.patch.object(imagebackend.Image, \u0027exists\u0027,"},{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"},{"line_number":13656,"context_line":"              get_disk_size_mock, exists_path):"},{"line_number":13657,"context_line":"            conn._create_images_and_backing(self.context, instance,"},{"line_number":13658,"context_line":"                                            \"/fake/instance/dir\", disk_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"e56d2b13_bcad1f58","line":13655,"range":{"start_line":13655,"start_character":14,"end_line":13655,"end_character":29},"updated":"2021-12-09 15:14:21.000000000","message":"Can you assert this is called below?","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"b4630692d1e1fa188f272de9114d6a9c677394fa","unresolved":false,"context_lines":[{"line_number":13652,"context_line":"                              return_value\u003ddisk_size),"},{"line_number":13653,"context_line":"            mock.patch.object(imagebackend.Image, \u0027exists\u0027,"},{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"},{"line_number":13656,"context_line":"              get_disk_size_mock, exists_path):"},{"line_number":13657,"context_line":"            conn._create_images_and_backing(self.context, instance,"},{"line_number":13658,"context_line":"                                            \"/fake/instance/dir\", disk_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"46c1c118_0cd6b879","line":13655,"range":{"start_line":13655,"start_character":14,"end_line":13655,"end_character":29},"in_reply_to":"e56d2b13_bcad1f58","updated":"2021-12-10 10:23:43.000000000","message":"Done","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":false,"context_lines":[{"line_number":13654,"context_line":"                              return_value\u003dTrue),"},{"line_number":13655,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"},{"line_number":13656,"context_line":"              get_disk_size_mock, exists_path):"},{"line_number":13657,"context_line":"            conn._create_images_and_backing(self.context, instance,"},{"line_number":13658,"context_line":"                                            \"/fake/instance/dir\", disk_info,"},{"line_number":13659,"context_line":"                                            fallback_from_host\u003d\"fake_host\")"},{"line_number":13660,"context_line":"            fetch_image_mock.assert_has_calls(["},{"line_number":13661,"context_line":"                mock.call(context\u003dself.context,"},{"line_number":13662,"context_line":"                          target\u003dbackfile_path,"}],"source_content_type":"text/x-python","patch_set":3,"id":"15b676d4_f67a5d93","line":13659,"range":{"start_line":13657,"start_character":0,"end_line":13659,"end_character":75},"updated":"2021-12-09 15:14:21.000000000","message":"supernit - feel free to ignore\n\n  conn._create_images_and_backing(\n      self.context, instance, \"/fake/instance/dir\", disk_info,\n      fallback_from_host\u003d\"fake_host\")","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"7a611f0fbd4b16ce1a1e11d33edfec4fce904ab1","unresolved":true,"context_lines":[{"line_number":13657,"context_line":"            conn._create_images_and_backing(self.context, instance,"},{"line_number":13658,"context_line":"                                            \"/fake/instance/dir\", disk_info,"},{"line_number":13659,"context_line":"                                            fallback_from_host\u003d\"fake_host\")"},{"line_number":13660,"context_line":"            fetch_image_mock.assert_has_calls(["},{"line_number":13661,"context_line":"                mock.call(context\u003dself.context,"},{"line_number":13662,"context_line":"                          target\u003dbackfile_path,"},{"line_number":13663,"context_line":"                          image_id\u003dself.test_instance[\u0027image_ref\u0027],"},{"line_number":13664,"context_line":"                          trusted_certs\u003dNone),"}],"source_content_type":"text/x-python","patch_set":3,"id":"e9eda99e_85fb02eb","line":13661,"range":{"start_line":13660,"start_character":29,"end_line":13661,"end_character":26},"updated":"2021-12-09 12:50:41.000000000","message":"assert_called_once_with ?","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"5345491819de16789565b2dd6080ac7023b8d471","unresolved":false,"context_lines":[{"line_number":13657,"context_line":"            conn._create_images_and_backing(self.context, instance,"},{"line_number":13658,"context_line":"                                            \"/fake/instance/dir\", disk_info,"},{"line_number":13659,"context_line":"                                            fallback_from_host\u003d\"fake_host\")"},{"line_number":13660,"context_line":"            fetch_image_mock.assert_has_calls(["},{"line_number":13661,"context_line":"                mock.call(context\u003dself.context,"},{"line_number":13662,"context_line":"                          target\u003dbackfile_path,"},{"line_number":13663,"context_line":"                          image_id\u003dself.test_instance[\u0027image_ref\u0027],"},{"line_number":13664,"context_line":"                          trusted_certs\u003dNone),"}],"source_content_type":"text/x-python","patch_set":3,"id":"8bd08983_fde945a6","line":13661,"range":{"start_line":13660,"start_character":29,"end_line":13661,"end_character":26},"in_reply_to":"e9eda99e_85fb02eb","updated":"2021-12-09 13:43:08.000000000","message":"Ack","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":true,"context_lines":[{"line_number":13663,"context_line":"                          image_id\u003dself.test_instance[\u0027image_ref\u0027],"},{"line_number":13664,"context_line":"                          trusted_certs\u003dNone),"},{"line_number":13665,"context_line":"            ])"},{"line_number":13666,"context_line":"            resize_image_mock.assert_called_once_with(virt_disk_size)"},{"line_number":13667,"context_line":""},{"line_number":13668,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.utils.create_image\u0027,"},{"line_number":13669,"context_line":"                new\u003dmock.NonCallableMock())"}],"source_content_type":"text/x-python","patch_set":3,"id":"af866e2e_edc3ba95","line":13666,"range":{"start_line":13666,"start_character":12,"end_line":13666,"end_character":69},"updated":"2021-12-09 15:14:21.000000000","message":"Do you also need to mock out imagebackend.Flat.correct_format?","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f4649bd9b9cb3d5b90f6db6499de52c32c40a2af","unresolved":false,"context_lines":[{"line_number":13663,"context_line":"                          image_id\u003dself.test_instance[\u0027image_ref\u0027],"},{"line_number":13664,"context_line":"                          trusted_certs\u003dNone),"},{"line_number":13665,"context_line":"            ])"},{"line_number":13666,"context_line":"            resize_image_mock.assert_called_once_with(virt_disk_size)"},{"line_number":13667,"context_line":""},{"line_number":13668,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.utils.create_image\u0027,"},{"line_number":13669,"context_line":"                new\u003dmock.NonCallableMock())"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f3d5e44_6d0b1bef","line":13666,"range":{"start_line":13666,"start_character":12,"end_line":13666,"end_character":69},"in_reply_to":"6ff9f2b2_6cdf09bc","updated":"2022-01-18 12:46:55.000000000","message":"Ack","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"b4630692d1e1fa188f272de9114d6a9c677394fa","unresolved":true,"context_lines":[{"line_number":13663,"context_line":"                          image_id\u003dself.test_instance[\u0027image_ref\u0027],"},{"line_number":13664,"context_line":"                          trusted_certs\u003dNone),"},{"line_number":13665,"context_line":"            ])"},{"line_number":13666,"context_line":"            resize_image_mock.assert_called_once_with(virt_disk_size)"},{"line_number":13667,"context_line":""},{"line_number":13668,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.utils.create_image\u0027,"},{"line_number":13669,"context_line":"                new\u003dmock.NonCallableMock())"}],"source_content_type":"text/x-python","patch_set":3,"id":"6ff9f2b2_6cdf09bc","line":13666,"range":{"start_line":13666,"start_character":12,"end_line":13666,"end_character":69},"in_reply_to":"af866e2e_edc3ba95","updated":"2021-12-10 10:23:43.000000000","message":"I don\u0027t know if it\u0027s required to test if the type of the disk is raw because it\u0027s hardcoded in the test at the beginning.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f4649bd9b9cb3d5b90f6db6499de52c32c40a2af","unresolved":true,"context_lines":[{"line_number":13656,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027,"},{"line_number":13657,"context_line":"                new\u003dmock.Mock(return_value\u003ddisk_size)),"},{"line_number":13658,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"},{"line_number":13659,"context_line":"              get_disk_size_mock):"},{"line_number":13660,"context_line":"            conn._create_images_and_backing("},{"line_number":13661,"context_line":"                self.context, instance, \"/fake/instance/dir\", disk_info,"},{"line_number":13662,"context_line":"                fallback_from_host\u003d\"fake_host\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"778a2c88_72238b16","line":13659,"range":{"start_line":13659,"start_character":13,"end_line":13659,"end_character":32},"updated":"2022-01-18 12:46:55.000000000","message":"i woudl expect this to cause an error.\n\nwhen you define new a mock should not be passed normally\n\nat least if this was done as a decorator it would not work.\n\ni suspenct that this is somehow being set to None and its only working because you are not usihjng it later.","commit_id":"fb12fee9d55535a01fae20008a0f54ba31f6aebe"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"bcb1b7d48f5d8fa404aadc9704542ca1f8dd1836","unresolved":false,"context_lines":[{"line_number":13656,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027,"},{"line_number":13657,"context_line":"                new\u003dmock.Mock(return_value\u003ddisk_size)),"},{"line_number":13658,"context_line":"        ) as (copy_image_mock, fetch_image_mock, resize_image_mock,"},{"line_number":13659,"context_line":"              get_disk_size_mock):"},{"line_number":13660,"context_line":"            conn._create_images_and_backing("},{"line_number":13661,"context_line":"                self.context, instance, \"/fake/instance/dir\", disk_info,"},{"line_number":13662,"context_line":"                fallback_from_host\u003d\"fake_host\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"299d2a5d_351634f5","line":13659,"range":{"start_line":13659,"start_character":13,"end_line":13659,"end_character":32},"in_reply_to":"778a2c88_72238b16","updated":"2022-01-21 15:32:28.000000000","message":"Done","commit_id":"fb12fee9d55535a01fae20008a0f54ba31f6aebe"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"fd4aada33a4916b82fd2f57f9f17a4f584d11704","unresolved":true,"context_lines":[{"line_number":571,"context_line":"                image \u003d imgmodel.LocalFileImage(target,"},{"line_number":572,"context_line":"                                                self.driver_format)"},{"line_number":573,"context_line":"                disk.extend(image, size)"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"        generating \u003d \u0027image_id\u0027 not in kwargs"},{"line_number":576,"context_line":"        if generating:"},{"line_number":577,"context_line":"            if not self.exists():"}],"source_content_type":"text/x-python","patch_set":2,"id":"edf275c8_2eaa82c5","side":"PARENT","line":574,"updated":"2021-12-07 14:40:20.000000000","message":"ok so this is just re-factoring to use the resize_image function which does exactly this.\nits technically unrelated but im fine with this cleanup.","commit_id":"7670303aabe16d1d7c25e411d7bd413aee7fdcf3"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"a7b2cba7d508cca4aad04b23b974ca5482704533","unresolved":false,"context_lines":[{"line_number":571,"context_line":"                image \u003d imgmodel.LocalFileImage(target,"},{"line_number":572,"context_line":"                                                self.driver_format)"},{"line_number":573,"context_line":"                disk.extend(image, size)"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"        generating \u003d \u0027image_id\u0027 not in kwargs"},{"line_number":576,"context_line":"        if generating:"},{"line_number":577,"context_line":"            if not self.exists():"}],"source_content_type":"text/x-python","patch_set":2,"id":"1bcd9135_4de3f8e4","side":"PARENT","line":574,"in_reply_to":"edf275c8_2eaa82c5","updated":"2021-12-08 10:11:33.000000000","message":"Ack","commit_id":"7670303aabe16d1d7c25e411d7bd413aee7fdcf3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"fd4aada33a4916b82fd2f57f9f17a4f584d11704","unresolved":true,"context_lines":[{"line_number":580,"context_line":"            # accessible anymore by the customer and the base image is"},{"line_number":581,"context_line":"            # available on source compute during the resize of the"},{"line_number":582,"context_line":"            # instance."},{"line_number":583,"context_line":"            else:"},{"line_number":584,"context_line":"                if size:"},{"line_number":585,"context_line":"                    self.resize_image(size)"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            if not os.path.exists(base):"},{"line_number":588,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"b7013168_7c6505bb","line":585,"range":{"start_line":583,"start_character":11,"end_line":585,"end_character":43},"updated":"2021-12-07 14:40:20.000000000","message":"and then this is the fix for the bug which also uses the exsitign funciton.\n\nThe base image should always be avaiable on the source compute since it will be kept there until the vm is deleted so i dont think we have to worry about it being missing? so i think this is correct.","commit_id":"65ce8e6e31db44eaad960c8fdae6362a2bb8361f"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"a7b2cba7d508cca4aad04b23b974ca5482704533","unresolved":true,"context_lines":[{"line_number":580,"context_line":"            # accessible anymore by the customer and the base image is"},{"line_number":581,"context_line":"            # available on source compute during the resize of the"},{"line_number":582,"context_line":"            # instance."},{"line_number":583,"context_line":"            else:"},{"line_number":584,"context_line":"                if size:"},{"line_number":585,"context_line":"                    self.resize_image(size)"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            if not os.path.exists(base):"},{"line_number":588,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3e0ca973_557a10fc","line":585,"range":{"start_line":583,"start_character":11,"end_line":585,"end_character":43},"in_reply_to":"b7013168_7c6505bb","updated":"2021-12-08 10:11:33.000000000","message":"The base image is not every time available on my side because the customer can behave a big private image or a big snapshot and in this case, the base image is not required because the disk type is a raw file.","commit_id":"65ce8e6e31db44eaad960c8fdae6362a2bb8361f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"7a611f0fbd4b16ce1a1e11d33edfec4fce904ab1","unresolved":true,"context_lines":[{"line_number":567,"context_line":"        @utils.synchronized(filename, external\u003dTrue, lock_path\u003dself.lock_path)"},{"line_number":568,"context_line":"        def copy_raw_image(base, target, size):"},{"line_number":569,"context_line":"            libvirt_utils.copy_image(base, target)"},{"line_number":570,"context_line":"            if size:"},{"line_number":571,"context_line":"                self.resize_image(size)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        generating \u003d \u0027image_id\u0027 not in kwargs"},{"line_number":574,"context_line":"        if generating:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fd941cab_7804490c","line":571,"range":{"start_line":570,"start_character":0,"end_line":571,"end_character":39},"updated":"2021-12-09 12:50:41.000000000","message":"This is unrelated, I appreciate this is essentially the same as resize_image as target is always self.path but I\u0027d rather keep this the same.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"5345491819de16789565b2dd6080ac7023b8d471","unresolved":false,"context_lines":[{"line_number":567,"context_line":"        @utils.synchronized(filename, external\u003dTrue, lock_path\u003dself.lock_path)"},{"line_number":568,"context_line":"        def copy_raw_image(base, target, size):"},{"line_number":569,"context_line":"            libvirt_utils.copy_image(base, target)"},{"line_number":570,"context_line":"            if size:"},{"line_number":571,"context_line":"                self.resize_image(size)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        generating \u003d \u0027image_id\u0027 not in kwargs"},{"line_number":574,"context_line":"        if generating:"}],"source_content_type":"text/x-python","patch_set":3,"id":"802459b9_4d98f0fa","line":571,"range":{"start_line":570,"start_character":0,"end_line":571,"end_character":39},"in_reply_to":"fd941cab_7804490c","updated":"2021-12-09 13:43:08.000000000","message":"Ack","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8b0b262df1dce5ba3fa11a0cb8b757514f5fb01c","unresolved":true,"context_lines":[{"line_number":567,"context_line":"        @utils.synchronized(filename, external\u003dTrue, lock_path\u003dself.lock_path)"},{"line_number":568,"context_line":"        def copy_raw_image(base, target, size):"},{"line_number":569,"context_line":"            libvirt_utils.copy_image(base, target)"},{"line_number":570,"context_line":"            if size:"},{"line_number":571,"context_line":"                self.resize_image(size)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        generating \u003d \u0027image_id\u0027 not in kwargs"},{"line_number":574,"context_line":"        if generating:"}],"source_content_type":"text/x-python","patch_set":3,"id":"c4f56acc_8a5a3f69","line":571,"range":{"start_line":570,"start_character":0,"end_line":571,"end_character":39},"in_reply_to":"fd941cab_7804490c","updated":"2021-12-09 13:01:14.000000000","message":"yep i noted that in my first review that it was an unrealted change, i was ok with the refactorign but would have prefered it to be a sperate patch.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"7a611f0fbd4b16ce1a1e11d33edfec4fce904ab1","unresolved":true,"context_lines":[{"line_number":576,"context_line":"                # Generating image in place"},{"line_number":577,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"            # NOTE(plibeau): extend the disk in the case of image is not"},{"line_number":580,"context_line":"            # accessible anymore by the customer and the base image is"},{"line_number":581,"context_line":"            # available on source compute during the resize of the"},{"line_number":582,"context_line":"            # instance."},{"line_number":583,"context_line":"            else:"},{"line_number":584,"context_line":"                if size:"},{"line_number":585,"context_line":"                    self.resize_image(size)"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            if not os.path.exists(base):"},{"line_number":588,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"64c13b81_dfee6c6d","line":585,"range":{"start_line":579,"start_character":0,"end_line":585,"end_character":43},"updated":"2021-12-09 12:50:41.000000000","message":"I\u0027m pretty confused by this, the branch you\u0027re taking here is when self.exists is True, meaning the disk is already present. What you\u0027ve written in this comment appears to have no relevance to what you\u0027re actually doing in the code.\n\nIf generating the disk and it already exists resize it to size, something that shouldn\u0027t be required as during a resize we create a fresh disk causing the above branch to be taken.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"5345491819de16789565b2dd6080ac7023b8d471","unresolved":true,"context_lines":[{"line_number":576,"context_line":"                # Generating image in place"},{"line_number":577,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"            # NOTE(plibeau): extend the disk in the case of image is not"},{"line_number":580,"context_line":"            # accessible anymore by the customer and the base image is"},{"line_number":581,"context_line":"            # available on source compute during the resize of the"},{"line_number":582,"context_line":"            # instance."},{"line_number":583,"context_line":"            else:"},{"line_number":584,"context_line":"                if size:"},{"line_number":585,"context_line":"                    self.resize_image(size)"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            if not os.path.exists(base):"},{"line_number":588,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"d21e52c6_0ffbf8b0","line":585,"range":{"start_line":579,"start_character":0,"end_line":585,"end_character":43},"in_reply_to":"64c13b81_dfee6c6d","updated":"2021-12-09 13:43:08.000000000","message":"I will contact you in irc to check with you.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8b0b262df1dce5ba3fa11a0cb8b757514f5fb01c","unresolved":true,"context_lines":[{"line_number":576,"context_line":"                # Generating image in place"},{"line_number":577,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"            # NOTE(plibeau): extend the disk in the case of image is not"},{"line_number":580,"context_line":"            # accessible anymore by the customer and the base image is"},{"line_number":581,"context_line":"            # available on source compute during the resize of the"},{"line_number":582,"context_line":"            # instance."},{"line_number":583,"context_line":"            else:"},{"line_number":584,"context_line":"                if size:"},{"line_number":585,"context_line":"                    self.resize_image(size)"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            if not os.path.exists(base):"},{"line_number":588,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"41e565a5_12f9f8f8","line":585,"range":{"start_line":579,"start_character":0,"end_line":585,"end_character":43},"in_reply_to":"64c13b81_dfee6c6d","updated":"2021-12-09 13:01:14.000000000","message":"well no during a resize we shoudl be copying the disk form the source host and then extendign it\nwe wont be creating a new disk unless we are talking about swap or perhaps ephmeral but the root disk should be a copy and would need to be grown.\n\nthat i think is the usecase they want to adress and specificly for raw disk not qcow where we would not need to worry about backing files.\n\nat least that is what i got form https://review.opendev.org/c/openstack/nova/+/820531/2/nova/virt/libvirt/imagebackend.py#585","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85fc3db6fea9c54eabf4f6071f30d23167ff78b7","unresolved":true,"context_lines":[{"line_number":576,"context_line":"                # Generating image in place"},{"line_number":577,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"            # NOTE(plibeau): extend the disk in the case of image is not"},{"line_number":580,"context_line":"            # accessible anymore by the customer and the base image is"},{"line_number":581,"context_line":"            # available on source compute during the resize of the"},{"line_number":582,"context_line":"            # instance."},{"line_number":583,"context_line":"            else:"},{"line_number":584,"context_line":"                if size:"},{"line_number":585,"context_line":"                    self.resize_image(size)"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            if not os.path.exists(base):"},{"line_number":588,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"31787352_67980656","line":585,"range":{"start_line":579,"start_character":0,"end_line":585,"end_character":43},"in_reply_to":"d21e52c6_0ffbf8b0","updated":"2021-12-09 15:14:21.000000000","message":"Thanks both and apologies for confusing things here. I think I see what you\u0027re doing now. Would you mind rewriting the comment to something like:\n\n  # NOTE(plibeau): Extend the existing instance disk after \n  # _try_fetch_image_cache has copied the base disk over from the \n  # src host during a resize.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"},{"author":{"_account_id":33607,"name":"Pierre Libeau","email":"pierre.libeau@ovhcloud.com","username":"plibeau"},"change_message_id":"b4630692d1e1fa188f272de9114d6a9c677394fa","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                # Generating image in place"},{"line_number":577,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"            # NOTE(plibeau): extend the disk in the case of image is not"},{"line_number":580,"context_line":"            # accessible anymore by the customer and the base image is"},{"line_number":581,"context_line":"            # available on source compute during the resize of the"},{"line_number":582,"context_line":"            # instance."},{"line_number":583,"context_line":"            else:"},{"line_number":584,"context_line":"                if size:"},{"line_number":585,"context_line":"                    self.resize_image(size)"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            if not os.path.exists(base):"},{"line_number":588,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7620f582_f848c53d","line":585,"range":{"start_line":579,"start_character":0,"end_line":585,"end_character":43},"in_reply_to":"d21e52c6_0ffbf8b0","updated":"2021-12-10 10:23:43.000000000","message":"To explain what append in my case: context, the image used during the boot of the instance is now private and the base image on the source compute doesn\u0027t exist.\nduring the resize on the instance in the code we go in \"_try_fetch_image_cache\" (nova/virt/libvirt/driver.py +10359) and go in except because of image.cache can\u0027t find the image (because now the image is private). In the except image.cache is called again without image in a parameter so create_image in call also without image_id. generating is True because image_id is not found in kwargs and the self.exists because it\u0027s a resize so the disk already exists.\nI don\u0027t change in image.cache method the line 280 (if os.path.exists(base) and size \u003e self.get_disk_size(base):) because it\u0027s the same code for another type (qcow2, etc) and it\u0027s not a good idea IMPOV to change that but maybe I\u0027m wrong.","commit_id":"7c89cd470eff5fb8591d5d0ce4edae1c11b71bc4"}]}
