)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"62eaa4ce08cdafb781d84a2ecc26a778ba2db397","unresolved":true,"context_lines":[{"line_number":7,"context_line":"libvirt: Create qcow2 disks with the correct size without extending"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"All callers to the create_image method of the Qcow2 imagebackend provide"},{"line_number":10,"context_line":"a size and so we should just always create the initial image using that"},{"line_number":11,"context_line":"size. The name of the method is also misleading and changed to better"},{"line_number":12,"context_line":"reflect that an image is being created here and not copied."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"e556b747_fd7d246d","line":10,"range":{"start_line":10,"start_character":2,"end_line":10,"end_character":6},"updated":"2021-03-10 22:05:13.000000000","message":"To be clear, they provide a size argument. The size could be None.","commit_id":"be06b53e8b3b6fb1ac9629f47a57628da559ff51"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c00b2bc623c4c2861a465133786e063a2d06d8f5","unresolved":true,"context_lines":[{"line_number":7,"context_line":"libvirt: Create qcow2 disks with the correct size without extending"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"All callers to the create_image method of the Qcow2 imagebackend provide"},{"line_number":10,"context_line":"a size and so we should just always create the initial image using that"},{"line_number":11,"context_line":"size. The name of the method is also misleading and changed to better"},{"line_number":12,"context_line":"reflect that an image is being created here and not copied."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3e7e9110_fb9d6912","line":10,"updated":"2021-06-28 07:49:14.000000000","message":"create_image is called from  nova.virt.libvirt.imagebackend.Image.cache() where size is defaulted to None, and there are cache() calls without specifying a size parameter e.g.: https://github.com/openstack/nova/blob/1f6c35171213c954317595d84c62f1dfddc69a5a/nova/virt/libvirt/driver.py#L4540 \n\nDid I miss something that make this code path still work with size being None?","commit_id":"f4b7eda079fc4a951c54973545b5c1f688f32720"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"d20309fec4625ee6dfd32b584f7aee91a59d6d76","unresolved":true,"context_lines":[{"line_number":7,"context_line":"libvirt: Create qcow2 disks with the correct size without extending"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"All callers to the create_image method of the Qcow2 imagebackend provide"},{"line_number":10,"context_line":"a size and so we should just always create the initial image using that"},{"line_number":11,"context_line":"size. The name of the method is also misleading and changed to better"},{"line_number":12,"context_line":"reflect that an image is being created here and not copied."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"a21d3483_aacc76b4","line":10,"in_reply_to":"3e7e9110_fb9d6912","updated":"2021-06-28 10:35:09.000000000","message":"That example is specifically against the flat/raw imagebackend.\n\nLooking through everything again the only call I\u0027m worried about now is _try_fetch_image_cache within _rebase_original_qcow2_image but as the comment suggests this is on;y used to cache the base file and not the already resized disk:\n\nhttps://github.com/openstack/nova/blob/1f6c35171213c954317595d84c62f1dfddc69a5a/nova/virt/libvirt/driver.py#L4730-L4732\n\nI\u0027ll keep checking this out.","commit_id":"f4b7eda079fc4a951c54973545b5c1f688f32720"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e662e328e7df5b8b01094804279f30197e361969","unresolved":true,"context_lines":[{"line_number":7,"context_line":"libvirt: Create qcow2 disks with the correct size without extending"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"All callers to the create_image method of the Qcow2 imagebackend provide"},{"line_number":10,"context_line":"a size and so we should just always create the initial image using that"},{"line_number":11,"context_line":"size. The name of the method is also misleading and changed to better"},{"line_number":12,"context_line":"reflect that an image is being created here and not copied."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d8bd5634_515cfbcc","line":10,"in_reply_to":"a21d3483_aacc76b4","updated":"2021-06-29 11:33:17.000000000","message":"OK. Thanks for the explanation. I\u0027m dropping my -1 then. Let me know if this is ready to go from your view too.","commit_id":"f4b7eda079fc4a951c54973545b5c1f688f32720"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"64bee5075222a2fc0342c7dadfb0f9105db704e0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5a49caad_1d208969","updated":"2022-01-21 11:12:35.000000000","message":"recheck","commit_id":"4a968c98c160cd86c3de32c7455140b5610e02c1"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"276de25d121d37f3927803b5c60f96f674bdadb1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8d133296_35fe00aa","updated":"2022-01-24 16:14:28.000000000","message":"recheck","commit_id":"4a968c98c160cd86c3de32c7455140b5610e02c1"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"8f4e6962cc71c2b6b27b649de432a41a642fae17","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c02dc3ee_3ad8dcac","updated":"2022-01-17 09:55:18.000000000","message":"recheck","commit_id":"4a968c98c160cd86c3de32c7455140b5610e02c1"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3560aad023a08328c14298d2b0036f26f71445ac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"eb3a13be_31d6aedf","updated":"2022-01-25 11:14:17.000000000","message":"recheck","commit_id":"4a968c98c160cd86c3de32c7455140b5610e02c1"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"fe6d3646eb6da6fe6780c84d5d5ccfd8c998be01","unresolved":true,"context_lines":[{"line_number":630,"context_line":"            libvirt_utils.create_cow_image(base, target)"},{"line_number":631,"context_line":"            if size:"},{"line_number":632,"context_line":"                image \u003d imgmodel.LocalFileImage(target, imgmodel.FORMAT_QCOW2)"},{"line_number":633,"context_line":"                disk.extend(image, size)"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"        # Download the unmodified base image unless we already have a copy."},{"line_number":636,"context_line":"        if not os.path.exists(base):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f24e556_d95e2b9d","side":"PARENT","line":633,"range":{"start_line":633,"start_character":16,"end_line":633,"end_character":40},"updated":"2021-03-08 15:11:47.000000000","message":"I wonder why was it calling the disk.extend() to begin with, though.\n\nI see that extend() in turn calls `qemu-img resize`:\n\n    processutils.execute(\u0027qemu-img\u0027, \u0027resize\u0027, image.path, size)","commit_id":"cf9e057530325d5d9e21a7af6fab9e8b4e27e6ac"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"62eaa4ce08cdafb781d84a2ecc26a778ba2db397","unresolved":true,"context_lines":[{"line_number":630,"context_line":"            libvirt_utils.create_cow_image(base, target)"},{"line_number":631,"context_line":"            if size:"},{"line_number":632,"context_line":"                image \u003d imgmodel.LocalFileImage(target, imgmodel.FORMAT_QCOW2)"},{"line_number":633,"context_line":"                disk.extend(image, size)"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"        # Download the unmodified base image unless we already have a copy."},{"line_number":636,"context_line":"        if not os.path.exists(base):"}],"source_content_type":"text/x-python","patch_set":2,"id":"8c64c962_60a4f1a8","side":"PARENT","line":633,"updated":"2021-03-10 22:05:13.000000000","message":"Okay, so previously we were doing:\n\n  qemu-img create -f qcow2 backing_file\u003dfoo backing_fmt\u003dbar PATH  # libvirt_utils.create_cow_image\n  qemu-img resize PATH SIZE  # from disk_extend\n\nand now we\u0027re doing:\n\n  qemu-img create -f qcow2 backing_file\u003dfoo backing_fmt\u003dbar size\u003dSIZE PATH\n\nMakes sense to me.\n\nIf you wanted another follow-up, disk is a _terrible_ name for the import. I thought it was a variable and wondered what scope it was in /o\\ Renaming that to e.g. \u0027disk_api\u0027 would be super","commit_id":"31889ce296d1e1a62fe5825292479009118ddfab"}]}
