)]}'
{"specs/victoria/approved/glance/calculate-virtual-size.rst":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"359bc7a095e4235d8c2498942bea13dd666acfb9","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"https://blueprints.launchpad.net/glance/+spec/calculate-virtual-size"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Cloud operator wants to set virtual size of image to avoid running `qemu_img`"},{"line_number":8,"context_line":"operations on consumer nodes."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f560f44_b8c47541","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":43},"updated":"2020-08-06 09:47:38.000000000","message":"Perhaps \"\u0027virtual_size\u0027 should be set on\"?","commit_id":"2cacf137e78321d5da35e62fb5466784c14df1b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4f56e48b6c3b75117282dec697bf55a0efbb2f4b","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"https://blueprints.launchpad.net/glance/+spec/calculate-virtual-size"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Cloud operator wants to set virtual size of image to avoid running `qemu_img`"},{"line_number":8,"context_line":"operations on consumer nodes."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f560f44_d8368903","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":43},"in_reply_to":"9f560f44_b8c47541","updated":"2020-08-06 09:58:56.000000000","message":"Done","commit_id":"2cacf137e78321d5da35e62fb5466784c14df1b0"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"359bc7a095e4235d8c2498942bea13dd666acfb9","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Use Case:"},{"line_number":20,"context_line":"---------"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Cloud operator wants to set virtual size of image to avoid running `qemu_img`"},{"line_number":23,"context_line":"operations on consumer nodes."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f560f44_f8df0d0a","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":43},"updated":"2020-08-06 09:47:38.000000000","message":"ditto","commit_id":"2cacf137e78321d5da35e62fb5466784c14df1b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4f56e48b6c3b75117282dec697bf55a0efbb2f4b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Use Case:"},{"line_number":20,"context_line":"---------"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Cloud operator wants to set virtual size of image to avoid running `qemu_img`"},{"line_number":23,"context_line":"operations on consumer nodes."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f560f44_78277dcb","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":43},"in_reply_to":"9f560f44_f8df0d0a","updated":"2020-08-06 09:58:56.000000000","message":"Done","commit_id":"2cacf137e78321d5da35e62fb5466784c14df1b0"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"359bc7a095e4235d8c2498942bea13dd666acfb9","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Proposed change"},{"line_number":26,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Basically each of the file despite of ``disk-format`` begins with header which"},{"line_number":29,"context_line":"stores information about required attributes of file such as size, magic,"},{"line_number":30,"context_line":"version etc. We propose to introduce handler for each of the ``disk format``"},{"line_number":31,"context_line":"which will examine the one chunk at a time during reading process, stores"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f560f44_38d065c9","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":53},"updated":"2020-08-06 09:47:38.000000000","message":"Maybe \"Most of image containers, despite of ``disk-format``,\"?","commit_id":"2cacf137e78321d5da35e62fb5466784c14df1b0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4f56e48b6c3b75117282dec697bf55a0efbb2f4b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Proposed change"},{"line_number":26,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Basically each of the file despite of ``disk-format`` begins with header which"},{"line_number":29,"context_line":"stores information about required attributes of file such as size, magic,"},{"line_number":30,"context_line":"version etc. We propose to introduce handler for each of the ``disk format``"},{"line_number":31,"context_line":"which will examine the one chunk at a time during reading process, stores"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f560f44_d81fa969","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":53},"in_reply_to":"9f560f44_38d065c9","updated":"2020-08-06 09:58:56.000000000","message":"Done","commit_id":"2cacf137e78321d5da35e62fb5466784c14df1b0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e2ed86fa4a81ecf00e7378261d54e2954596e3c0","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Proposed change"},{"line_number":26,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Most of the image containers despite of ``disk-format`` begins with header which"},{"line_number":29,"context_line":"stores information about required attributes of file such as size, magic,"},{"line_number":30,"context_line":"version etc. We propose to introduce handler for each of the ``disk format``"},{"line_number":31,"context_line":"which will examine the one chunk at a time during reading process, stores"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_24b840e3","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":56},"updated":"2020-08-06 13:36:17.000000000","message":"Do you mean \"All supported disk formats\" ?\n\nJust for reference, the supported disk formats are:\nami,ari,aki,vhd,vhdx,vmdk,raw,qcow2,vdi,iso,ploop\n\nIs this true for all of them?","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"daf8dbd70ebd188825d4f0c101fddfb8f1f325be","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Proposed change"},{"line_number":26,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Most of the image containers despite of ``disk-format`` begins with header which"},{"line_number":29,"context_line":"stores information about required attributes of file such as size, magic,"},{"line_number":30,"context_line":"version etc. We propose to introduce handler for each of the ``disk format``"},{"line_number":31,"context_line":"which will examine the one chunk at a time during reading process, stores"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_182bdc82","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":56},"in_reply_to":"9f560f44_04653c46","updated":"2020-08-06 14:09:54.000000000","message":"ari, aki, ami, iso are not really sparse formats, so there\u0027s no need to figure out what size disk they really represent, AFAIK.\n\nploop is not very well-defined so I haven\u0027t looked into it, but not even qemu-img supports it, AFAICT.\n\nBut yes, all the others have the virtual disk size defined in a header we can extract from the stream. The ones I\u0027ve implemented (all the rest) are here:\n\nhttps://review.opendev.org/#/c/744205/10/glance/common/format_inspector.py@673","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"aa152d04e32daeae533c1b4ce9ec73cacdc18480","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Proposed change"},{"line_number":26,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Most of the image containers despite of ``disk-format`` begins with header which"},{"line_number":29,"context_line":"stores information about required attributes of file such as size, magic,"},{"line_number":30,"context_line":"version etc. We propose to introduce handler for each of the ``disk format``"},{"line_number":31,"context_line":"which will examine the one chunk at a time during reading process, stores"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_58b1d4e0","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":56},"in_reply_to":"9f560f44_182bdc82","updated":"2020-08-06 14:43:02.000000000","message":"BTW, I agree the sentence is hard to understand for native speakers. I would also avoid using \"image containers\" because that evokes container_format, which is a different thing. I would suggest:\n\n\"All supported sparse disk image formats (i.e. what glance calls disk_format) simulate a larger virtual disk than the actual data that is stored, and record that virtual size in metadata. We propose a handler for each of the formats that can examine the chunks while streaming the image to extract the relevant metadata to determine the virtual disk size.\"","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c08942b4af8b0c9a66a7f01c4e2dd89bf22d5e24","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Proposed change"},{"line_number":26,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Most of the image containers despite of ``disk-format`` begins with header which"},{"line_number":29,"context_line":"stores information about required attributes of file such as size, magic,"},{"line_number":30,"context_line":"version etc. We propose to introduce handler for each of the ``disk format``"},{"line_number":31,"context_line":"which will examine the one chunk at a time during reading process, stores"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_04653c46","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":56},"in_reply_to":"9f560f44_24b840e3","updated":"2020-08-06 13:45:44.000000000","message":"As far as I know yes it is.","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"72645d5c7c4c440b844c0ed03500c3071a218e33","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Proposed change"},{"line_number":26,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Most of the image containers despite of ``disk-format`` begins with header which"},{"line_number":29,"context_line":"stores information about required attributes of file such as size, magic,"},{"line_number":30,"context_line":"version etc. We propose to introduce handler for each of the ``disk format``"},{"line_number":31,"context_line":"which will examine the one chunk at a time during reading process, stores"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_db1b1e70","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":56},"in_reply_to":"9f560f44_58b1d4e0","updated":"2020-08-06 15:01:20.000000000","message":"Done","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"aa152d04e32daeae533c1b4ce9ec73cacdc18480","unresolved":false,"context_lines":[{"line_number":39,"context_line":"2) Import image API"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"With this change virtual size will be set to image even user tries to use any"},{"line_number":42,"context_line":"of above two methods to create the image.Also images created by nova"},{"line_number":43,"context_line":"(nova-snapshot except \u0027direct-to-backend snapshot\u0027) or cinder"},{"line_number":44,"context_line":"(volume-upload-to-image) will be able to set the virtual size to image as well."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_58ff1466","line":42,"range":{"start_line":42,"start_character":41,"end_line":42,"end_character":42},"updated":"2020-08-06 14:43:02.000000000","message":"Need a space here.","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"72645d5c7c4c440b844c0ed03500c3071a218e33","unresolved":false,"context_lines":[{"line_number":39,"context_line":"2) Import image API"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"With this change virtual size will be set to image even user tries to use any"},{"line_number":42,"context_line":"of above two methods to create the image.Also images created by nova"},{"line_number":43,"context_line":"(nova-snapshot except \u0027direct-to-backend snapshot\u0027) or cinder"},{"line_number":44,"context_line":"(volume-upload-to-image) will be able to set the virtual size to image as well."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_7b3932d5","line":42,"range":{"start_line":42,"start_character":41,"end_line":42,"end_character":42},"in_reply_to":"9f560f44_58ff1466","updated":"2020-08-06 15:01:20.000000000","message":"Done","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"aa152d04e32daeae533c1b4ce9ec73cacdc18480","unresolved":false,"context_lines":[{"line_number":49,"context_line":"container-formats."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"We will be performing this operation during uploading image data to glance"},{"line_number":52,"context_line":"store, so while import operation is in progress virtual size will be set on"},{"line_number":53,"context_line":"image during import operation rather than staging operation."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Alternatives"},{"line_number":56,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_b8ed90b8","line":53,"range":{"start_line":52,"start_character":7,"end_line":53,"end_character":60},"updated":"2020-08-06 14:43:02.000000000","message":"This is a bit confusing and repetitive. Maybe just say \"so for image import this will happen during the actual import phase and not the stage phase.\"","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"72645d5c7c4c440b844c0ed03500c3071a218e33","unresolved":false,"context_lines":[{"line_number":49,"context_line":"container-formats."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"We will be performing this operation during uploading image data to glance"},{"line_number":52,"context_line":"store, so while import operation is in progress virtual size will be set on"},{"line_number":53,"context_line":"image during import operation rather than staging operation."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Alternatives"},{"line_number":56,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_1b791693","line":53,"range":{"start_line":52,"start_character":7,"end_line":53,"end_character":60},"in_reply_to":"9f560f44_b8ed90b8","updated":"2020-08-06 15:01:20.000000000","message":"Done","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"e2ed86fa4a81ecf00e7378261d54e2954596e3c0","unresolved":false,"context_lines":[{"line_number":55,"context_line":"Alternatives"},{"line_number":56,"context_line":"------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"None"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Data model impact"},{"line_number":61,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_e4948839","line":58,"updated":"2020-08-06 13:36:17.000000000","message":"I think an alternative would be to allow services to update the \u0027virtual_size\u0027 image property (it\u0027s currently read-only).  The idea is that Nova and Cinder do what they do now, but instead of losing the info from qemu-img, they\u0027d update it for next time.\n\nI know this sucks, but the advantage is that it would work for \"legacy\" images, and might be worth doing alongside of the current proposal.","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"858176aea3d3b7ec2b23b7dccd0001b17a63b597","unresolved":false,"context_lines":[{"line_number":55,"context_line":"Alternatives"},{"line_number":56,"context_line":"------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"None"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Data model impact"},{"line_number":61,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_f8d8a853","line":58,"in_reply_to":"9f560f44_38598034","updated":"2020-08-06 17:31:04.000000000","message":"Agree entirely that we don\u0027t want to allow arbitrary users to set the field if it\u0027s going to be reliable.  Also, it occurs to me that this situation is a lot different from updating the os_hash_value for \"legacy\" images, where we\u0027d have to stream (download) the entire thing, which would be very resource-intensive.  With the code you\u0027ve got for this, we just need to grab a very small part of the image data to determine the virtual size.  So running some kind of offline script to get the virtual_size of legacy images seems do-able (if someone would actually want to do that).","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"daf8dbd70ebd188825d4f0c101fddfb8f1f325be","unresolved":false,"context_lines":[{"line_number":55,"context_line":"Alternatives"},{"line_number":56,"context_line":"------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"None"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Data model impact"},{"line_number":61,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_38598034","line":58,"in_reply_to":"9f560f44_846f8c29","updated":"2020-08-06 14:09:54.000000000","message":"Presumably we\u0027d need some way to make sure *only* authorized users can set that value. Right now, nova uses the user\u0027s token to interact with glance. Allowing users to say \"nothing to see here, just a 512m cirros image!\" but upload something that expands to multiple TiB is a good way to confused nova and cinder, or otherwise eliminate the value of having this exposed in glance altogether. I\u0027m not opposed to *also* doing that, but it does bring a bunch of additional complexity, AFAIK.","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c08942b4af8b0c9a66a7f01c4e2dd89bf22d5e24","unresolved":false,"context_lines":[{"line_number":55,"context_line":"Alternatives"},{"line_number":56,"context_line":"------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"None"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Data model impact"},{"line_number":61,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_846f8c29","line":58,"in_reply_to":"9f560f44_e4948839","updated":"2020-08-06 13:45:44.000000000","message":"Alternative should also include that how glance should set virtual size while creating image and importin image. At the moment we don\u0027t have any other way than adding import plugin which will perform qemu operation during staging and calculate the virtual size. That\u0027s why I kept it as it is.","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9227c5a6816e8135ef3e15e9b6bee1041b3b1ba4","unresolved":false,"context_lines":[{"line_number":55,"context_line":"Alternatives"},{"line_number":56,"context_line":"------------"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"None"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Data model impact"},{"line_number":61,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f560f44_6c34da4a","line":58,"in_reply_to":"9f560f44_f8d8a853","updated":"2020-08-06 17:41:53.000000000","message":"Yup, and glance could do the same thing for situations where the image is created and just a location is added (I think that\u0027s supported right?).\n\nOne thing I could add to the code is a flag for \"have you gotten enough of the image to have determined what you need yet?\" That way we could stream until that flag goes true, and then set the value if we\u0027ve found it. On most of the image formats, streaming 512 bytes will be enough, but on the more complex ones you need to stream a dynamic length (but still small) before you\u0027ve gotten what you need.","commit_id":"9c9f717575a96f8e23d50d7e3576dff08ad4715d"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c0bdcb14218da436f43f4060d14b94f74b12b3dc","unresolved":false,"context_lines":[{"line_number":32,"context_line":"the relevant metadata to determine the virtual disk size."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"In glance, users can create images using two ways."},{"line_number":35,"context_line":"1) Create image API"},{"line_number":36,"context_line":"2) Import image API"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"With this change virtual size will be set to image even user tries to use any"},{"line_number":39,"context_line":"of above two methods to create the image. Also images created by nova"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9f560f44_e21bd36f","line":36,"range":{"start_line":35,"start_character":0,"end_line":36,"end_character":2},"updated":"2020-08-06 18:20:53.000000000","message":"This could be reformatted to actually create a numbered list in the generated HTML. As this is, it just gets combined into one sentence.\n\nIt\u0027s still readable, so not a big issue. We could follow up later to fix it, but I don\u0027t think it is that important if that happens or not.","commit_id":"f4be24c13bf9527a08504f1aa92d77f10cf68f15"}],"specs/victoria/approved/glance/image-introspect-plugin.rst":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6bd5b4614e9e119de8305116039bc8b3867e3d9d","unresolved":false,"context_lines":[{"line_number":15,"context_line":"like nova or cinder never consume image before calculating virtual"},{"line_number":16,"context_line":"size, which means every time they call for image, they need to"},{"line_number":17,"context_line":"perform `qemu_img info` call to calculate the virtual size of the image."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Use Case:"},{"line_number":20,"context_line":"---------"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf51134e_38f5eccb","line":18,"updated":"2020-07-15 09:36:08.000000000","message":"Also we can mention we should pass this to stores to create the actual size storage for qcow2 images as incase of qcow2, the cinder store fails as image_size is passed to the store instead of virtual_size creating a smaller volume than what is required to store the actual image.\nI\u0027m not really sure about other stores and it\u0027s impact but for cinder store, it is required.","commit_id":"b55b66c0d3bddf21caaab4f0e98078fcad7c3f1d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"04d904bba4f35eef004a2d31e754f7730401293b","unresolved":false,"context_lines":[{"line_number":15,"context_line":"like nova or cinder never consume image before calculating virtual"},{"line_number":16,"context_line":"size, which means every time they call for image, they need to"},{"line_number":17,"context_line":"perform `qemu_img info` call to calculate the virtual size of the image."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Use Case:"},{"line_number":20,"context_line":"---------"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf51134e_7c599559","line":18,"in_reply_to":"bf51134e_38f5eccb","updated":"2020-07-23 05:19:46.000000000","message":"Invalidating this comment as this is a problem specific to glance -\u003e cinder -\u003e nfs and can be fixed by converting qcow2 to raw via the import conversion plugin.","commit_id":"b55b66c0d3bddf21caaab4f0e98078fcad7c3f1d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6bd5b4614e9e119de8305116039bc8b3867e3d9d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"workflow will only be used by services, it won\u0027t be exposed to end users in"},{"line_number":50,"context_line":"most deployments."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images crated by nova"},{"line_number":53,"context_line":"(nova-snapshot) or cinder (volume-upload-to-image) will not be able to set the"},{"line_number":54,"context_line":"virtual size. So the consumer services needs to calculate virtual size if it is"},{"line_number":55,"context_line":"not set to image in this case."}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf51134e_78e924e1","line":52,"range":{"start_line":52,"start_character":66,"end_line":52,"end_character":72},"updated":"2020-07-15 09:36:08.000000000","message":"created","commit_id":"b55b66c0d3bddf21caaab4f0e98078fcad7c3f1d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"db6448bd35732dad0114355636c47afac5d12c44","unresolved":false,"context_lines":[{"line_number":49,"context_line":"workflow will only be used by services, it won\u0027t be exposed to end users in"},{"line_number":50,"context_line":"most deployments."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images crated by nova"},{"line_number":53,"context_line":"(nova-snapshot) or cinder (volume-upload-to-image) will not be able to set the"},{"line_number":54,"context_line":"virtual size. So the consumer services needs to calculate virtual size if it is"},{"line_number":55,"context_line":"not set to image in this case."}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf51134e_80647aba","line":52,"range":{"start_line":52,"start_character":66,"end_line":52,"end_character":72},"in_reply_to":"bf51134e_78e924e1","updated":"2020-07-23 06:52:32.000000000","message":"Done","commit_id":"b55b66c0d3bddf21caaab4f0e98078fcad7c3f1d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6bd5b4614e9e119de8305116039bc8b3867e3d9d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"workflow will only be used by services, it won\u0027t be exposed to end users in"},{"line_number":50,"context_line":"most deployments."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images crated by nova"},{"line_number":53,"context_line":"(nova-snapshot) or cinder (volume-upload-to-image) will not be able to set the"},{"line_number":54,"context_line":"virtual size. So the consumer services needs to calculate virtual size if it is"},{"line_number":55,"context_line":"not set to image in this case."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Alternatives"},{"line_number":58,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf51134e_b8a57cb7","line":55,"range":{"start_line":52,"start_character":59,"end_line":55,"end_character":30},"updated":"2020-07-15 09:36:08.000000000","message":"I think we can modify the code in consumer projects to use the new import workflow but i guess it\u0027s the project\u0027s choice to do so.","commit_id":"b55b66c0d3bddf21caaab4f0e98078fcad7c3f1d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"db6448bd35732dad0114355636c47afac5d12c44","unresolved":false,"context_lines":[{"line_number":49,"context_line":"workflow will only be used by services, it won\u0027t be exposed to end users in"},{"line_number":50,"context_line":"most deployments."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images crated by nova"},{"line_number":53,"context_line":"(nova-snapshot) or cinder (volume-upload-to-image) will not be able to set the"},{"line_number":54,"context_line":"virtual size. So the consumer services needs to calculate virtual size if it is"},{"line_number":55,"context_line":"not set to image in this case."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Alternatives"},{"line_number":58,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf51134e_929690ef","line":55,"range":{"start_line":52,"start_character":59,"end_line":55,"end_character":30},"in_reply_to":"bf51134e_b8a57cb7","updated":"2020-07-23 06:52:32.000000000","message":"Yes its should be consumers choice if they want to implement and use import workflow of glance.","commit_id":"b55b66c0d3bddf21caaab4f0e98078fcad7c3f1d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f09241c327e416df5ba5ae83bccd9145a3ecc45f","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Introduce new `image_introspect` plugin which if enabled run `qemu_img info`"},{"line_number":29,"context_line":"command to calculate virtual size of image and set it to image before"},{"line_number":30,"context_line":"importing the image in glance store. Operators who does not want to perform"},{"line_number":31,"context_line":"`qemu_img` operations on controller can disable this plugin."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"To enable this plugin, operator simply needs to add `image_introspect` plugin"},{"line_number":34,"context_line":"in `image_import_plugins` configuration option under section"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_5092bb4c","line":31,"updated":"2020-07-30 14:43:07.000000000","message":"Just to be clear, you are planning to run this for every type of image, not just qcows? Does qemu-img support every image format that glance does?\n\nAFAIK, qemu-img will report more disk-like behaviors than may be desirable. For example, on a raw image, it will round up the size to the nearest conventional-for-disks block size of 512. That means anything someone stores in glance that is very tiny will appear larger, and the size of any non-complex-disk-format will appear different than the user may expect.\n\n % stat .gitreview -c \u0027%s\u0027\n 73\n % qemu-img info .gitreview | grep virtual\n virtual size: 512 (512 bytes)\n\nWouldn\u0027t it make more sense to only take the qemu-img virtual size for complex formats and take the file size for anything considered raw?","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d1f240bb4be9c103eec1d8e4ac54cc359f3cbd7","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Introduce new `image_introspect` plugin which if enabled run `qemu_img info`"},{"line_number":29,"context_line":"command to calculate virtual size of image and set it to image before"},{"line_number":30,"context_line":"importing the image in glance store. Operators who does not want to perform"},{"line_number":31,"context_line":"`qemu_img` operations on controller can disable this plugin."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"To enable this plugin, operator simply needs to add `image_introspect` plugin"},{"line_number":34,"context_line":"in `image_import_plugins` configuration option under section"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_be3161ef","line":31,"in_reply_to":"9f560f44_09ef7eb0","updated":"2020-07-30 19:45:14.000000000","message":"Another question: it seems like you\u0027re implying only \u0027bare\u0027 container_format images here. If not, you\u0027ll have to unpack things like ova, ovf, docker, etc images before qemu-img could even run on them.\n\nIs the intent to only support this for \u0027bare\u0027 ?","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"555037f281df2ce021f704f3afef308ca90b5266","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Introduce new `image_introspect` plugin which if enabled run `qemu_img info`"},{"line_number":29,"context_line":"command to calculate virtual size of image and set it to image before"},{"line_number":30,"context_line":"importing the image in glance store. Operators who does not want to perform"},{"line_number":31,"context_line":"`qemu_img` operations on controller can disable this plugin."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"To enable this plugin, operator simply needs to add `image_introspect` plugin"},{"line_number":34,"context_line":"in `image_import_plugins` configuration option under section"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_24889f1d","line":31,"in_reply_to":"9f560f44_09ef7eb0","updated":"2020-07-31 07:00:43.000000000","message":"I am saying is when Nova or Cinder uses image to boot instance or volume they calculate virtual size each time.","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bb3f6967a6b8e6a3d08cab0685acfe883232b9a0","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Introduce new `image_introspect` plugin which if enabled run `qemu_img info`"},{"line_number":29,"context_line":"command to calculate virtual size of image and set it to image before"},{"line_number":30,"context_line":"importing the image in glance store. Operators who does not want to perform"},{"line_number":31,"context_line":"`qemu_img` operations on controller can disable this plugin."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"To enable this plugin, operator simply needs to add `image_introspect` plugin"},{"line_number":34,"context_line":"in `image_import_plugins` configuration option under section"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_f68f7020","line":31,"in_reply_to":"9f560f44_24889f1d","updated":"2020-07-31 13:27:31.000000000","message":"You mean they download the image and then calculate virtual_size before they _use_ the image right? I guess I\u0027m curious if they also provide the virtual_size when uploading and/or if that is allowed. But, anyway, it doesn\u0027t matter much I\u0027m just trying to understand who can and does set virtual_size today.","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"ec7f849ab2bb82aa4c257a19ea18a38cf8133077","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Introduce new `image_introspect` plugin which if enabled run `qemu_img info`"},{"line_number":29,"context_line":"command to calculate virtual size of image and set it to image before"},{"line_number":30,"context_line":"importing the image in glance store. Operators who does not want to perform"},{"line_number":31,"context_line":"`qemu_img` operations on controller can disable this plugin."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"To enable this plugin, operator simply needs to add `image_introspect` plugin"},{"line_number":34,"context_line":"in `image_import_plugins` configuration option under section"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_6976faa6","line":31,"in_reply_to":"9f560f44_5092bb4c","updated":"2020-07-30 16:22:40.000000000","message":"Actual use case is to avoid virtual_size check and calculation of the same in nova and cinder and IMO nova and cinder doesn\u0027t check for image type so calculating it for all the images makes sense.\n\n[1] Nova - https://github.com/openstack/nova/blob/master/nova/virt/libvirt/utils.py#L224\n\n[2] Cinder - https://github.com/openstack/cinder/blob/master/cinder/image/image_utils.py#L368","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e62f6ce9a75efdc10c3132364e1ac119a198be0d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Introduce new `image_introspect` plugin which if enabled run `qemu_img info`"},{"line_number":29,"context_line":"command to calculate virtual size of image and set it to image before"},{"line_number":30,"context_line":"importing the image in glance store. Operators who does not want to perform"},{"line_number":31,"context_line":"`qemu_img` operations on controller can disable this plugin."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"To enable this plugin, operator simply needs to add `image_introspect` plugin"},{"line_number":34,"context_line":"in `image_import_plugins` configuration option under section"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_09ef7eb0","line":31,"in_reply_to":"9f560f44_6976faa6","updated":"2020-07-30 16:41:29.000000000","message":"Are you saying that Nova and Cinder provide (or could provide) virtual_size during upload (and thus it be wrong)?\n\nI\u0027m all for glance doing this, makes sense, I\u0027m just wondering if you\u0027re planning to run qemu-img even on things that claim to be raw. And...does qemu-img support all glance image formats?","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"555037f281df2ce021f704f3afef308ca90b5266","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Introduce new `image_introspect` plugin which if enabled run `qemu_img info`"},{"line_number":29,"context_line":"command to calculate virtual size of image and set it to image before"},{"line_number":30,"context_line":"importing the image in glance store. Operators who does not want to perform"},{"line_number":31,"context_line":"`qemu_img` operations on controller can disable this plugin."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"To enable this plugin, operator simply needs to add `image_introspect` plugin"},{"line_number":34,"context_line":"in `image_import_plugins` configuration option under section"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_6479f72d","line":31,"in_reply_to":"9f560f44_be3161ef","updated":"2020-07-31 07:00:43.000000000","message":"ATM the intent is supporting only bare container_format, later we can enhance it.","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bc55aff30a2260035cba18cd723cfafdfd89f2f1","unresolved":false,"context_lines":[{"line_number":28,"context_line":"Introduce new `image_introspect` plugin which if enabled run `qemu_img info`"},{"line_number":29,"context_line":"command to calculate virtual size of image and set it to image before"},{"line_number":30,"context_line":"importing the image in glance store. Operators who does not want to perform"},{"line_number":31,"context_line":"`qemu_img` operations on controller can disable this plugin."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"To enable this plugin, operator simply needs to add `image_introspect` plugin"},{"line_number":34,"context_line":"in `image_import_plugins` configuration option under section"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_f61ad07a","line":31,"in_reply_to":"9f560f44_f68f7020","updated":"2020-07-31 13:46:51.000000000","message":"Yes, they download the image and calculate the virtual size.\n\nAt the moment neither consumer of glance or glance itself calculates virtual size. There was one Introspect task in task API but I am not sure it was used ever.","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"71ee1778a6f085eb84298faaefb7e513181fbca9","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    image_import_plugins \u003d [\u0027image_introspect\u0027]"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"In glance, users can create images using two ways."},{"line_number":41,"context_line":"1) create image API"},{"line_number":42,"context_line":"2) Import image API"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"In case of import image API, as it uses taskflow, an additional task"},{"line_number":45,"context_line":"\u0027IntrospectImage\u0027 will be created to calculate and set the virtual_size"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf51134e_9768b7ba","line":42,"range":{"start_line":41,"start_character":0,"end_line":42,"end_character":19},"updated":"2020-07-23 13:57:34.000000000","message":"This doesn\u0027t format right in the resulting HTML, but it is still perfectly readable.","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f09241c327e416df5ba5ae83bccd9145a3ecc45f","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"No changes will be made to create image API. The intent is that the old upload"},{"line_number":49,"context_line":"workflow will only be used by services, it won\u0027t be exposed to end users in"},{"line_number":50,"context_line":"most deployments."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images created by"},{"line_number":53,"context_line":"nova (nova-snapshot) or cinder (volume-upload-to-image) will not be able to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_9003b373","line":50,"updated":"2020-07-30 14:43:07.000000000","message":"Is there a timeline for this? Because I expect there will be pushback (either in the form of argument ahead of time or people reverting the service token requirement on their own cloud).","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e62f6ce9a75efdc10c3132364e1ac119a198be0d","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"No changes will be made to create image API. The intent is that the old upload"},{"line_number":49,"context_line":"workflow will only be used by services, it won\u0027t be exposed to end users in"},{"line_number":50,"context_line":"most deployments."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images created by"},{"line_number":53,"context_line":"nova (nova-snapshot) or cinder (volume-upload-to-image) will not be able to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_692b9aea","line":50,"in_reply_to":"9f560f44_4e7cdcea","updated":"2020-07-30 16:41:29.000000000","message":"Agreed.","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"ec7f849ab2bb82aa4c257a19ea18a38cf8133077","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"No changes will be made to create image API. The intent is that the old upload"},{"line_number":49,"context_line":"workflow will only be used by services, it won\u0027t be exposed to end users in"},{"line_number":50,"context_line":"most deployments."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images created by"},{"line_number":53,"context_line":"nova (nova-snapshot) or cinder (volume-upload-to-image) will not be able to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_4e7cdcea","line":50,"in_reply_to":"9f560f44_9003b373","updated":"2020-07-30 16:22:40.000000000","message":"At the moment, No, but we need to discuss this with Cross projects as well.","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f09241c327e416df5ba5ae83bccd9145a3ecc45f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images created by"},{"line_number":53,"context_line":"nova (nova-snapshot) or cinder (volume-upload-to-image) will not be able to"},{"line_number":54,"context_line":"set the virtual size. So the consumer services needs to calculate virtual"},{"line_number":55,"context_line":"size if it is not set to image in this case."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Alternatives"},{"line_number":58,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_b0351749","line":55,"updated":"2020-07-30 14:43:07.000000000","message":"Is there any reason this is too hard to do for the regular image upload? Certainly for raw we could count bytes as we stream the image to the backing store. For qcow if we copy the first 512 (or something) bytes as we\u0027re streaming, we can inspect it for the virtual size quite easily.","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"ec7f849ab2bb82aa4c257a19ea18a38cf8133077","unresolved":false,"context_lines":[{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images created by"},{"line_number":53,"context_line":"nova (nova-snapshot) or cinder (volume-upload-to-image) will not be able to"},{"line_number":54,"context_line":"set the virtual size. So the consumer services needs to calculate virtual"},{"line_number":55,"context_line":"size if it is not set to image in this case."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Alternatives"},{"line_number":58,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_ce5aac4e","line":55,"in_reply_to":"9f560f44_b0351749","updated":"2020-07-30 16:22:40.000000000","message":"AKAIK, For traditional upload we do not stage image anywhere in local disk whereas for qemu img_info we need file stored somewhere in local disk","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e62f6ce9a75efdc10c3132364e1ac119a198be0d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"Note: As traditional create image API is used by services, images created by"},{"line_number":53,"context_line":"nova (nova-snapshot) or cinder (volume-upload-to-image) will not be able to"},{"line_number":54,"context_line":"set the virtual size. So the consumer services needs to calculate virtual"},{"line_number":55,"context_line":"size if it is not set to image in this case."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Alternatives"},{"line_number":58,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_c9390640","line":55,"in_reply_to":"9f560f44_ce5aac4e","updated":"2020-07-30 16:41:29.000000000","message":"Right, but if we put something in the streaming pipeline, we can grab the header and count the bytes, right? We don\u0027t need to store the whole image somewhere and run qemu-img on it to know the full size of a raw, or the claimed size of a qcow file.\n\nhttps://people.gnome.org/~markmc/qcow-image-format.html","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f09241c327e416df5ba5ae83bccd9145a3ecc45f","unresolved":false,"context_lines":[{"line_number":138,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Functional tests will be added to verify that virtual size is calculated"},{"line_number":141,"context_line":"if `image_introspect` plugin is enabled."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"Documentation Impact"},{"line_number":144,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_f0278f11","line":141,"updated":"2020-07-30 14:43:07.000000000","message":"We can add tempest tests now, so it\u0027d be good to add that to the set of tests right?","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"ec7f849ab2bb82aa4c257a19ea18a38cf8133077","unresolved":false,"context_lines":[{"line_number":138,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Functional tests will be added to verify that virtual size is calculated"},{"line_number":141,"context_line":"if `image_introspect` plugin is enabled."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"Documentation Impact"},{"line_number":144,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9f560f44_0e55c41d","line":141,"in_reply_to":"9f560f44_f0278f11","updated":"2020-07-30 16:22:40.000000000","message":"correct","commit_id":"ec29065beb47eba1e301e6a90e5581b0d14841a5"}],"specs/victoria/approved/glance/image-introspect.rst":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"98fefa8ada83ad4b6c0bb70364fa9841c9645ec3","unresolved":false,"context_lines":[{"line_number":35,"context_line":"``qemu-img info`` on the controller nodes."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"In glance, users can create images using two ways."},{"line_number":38,"context_line":"1) create image API"},{"line_number":39,"context_line":"2) Import image API"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"With this change virtual size will be set to image even user tries to use any"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_6937c300","line":38,"range":{"start_line":38,"start_character":3,"end_line":38,"end_character":4},"updated":"2020-08-05 14:59:38.000000000","message":"nit: Capitalize for consistency with the next line","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"fc6df4291339138d839c341084a5decfa4d6386d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"``qemu-img info`` on the controller nodes."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"In glance, users can create images using two ways."},{"line_number":38,"context_line":"1) create image API"},{"line_number":39,"context_line":"2) Import image API"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"With this change virtual size will be set to image even user tries to use any"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_afad5b9c","line":38,"range":{"start_line":38,"start_character":3,"end_line":38,"end_character":4},"in_reply_to":"9f560f44_6937c300","updated":"2020-08-05 16:11:35.000000000","message":"Done","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"98fefa8ada83ad4b6c0bb70364fa9841c9645ec3","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"With this change virtual size will be set to image even user tries to use any"},{"line_number":42,"context_line":"of above two methods to create the image. Also images created by nova"},{"line_number":43,"context_line":"(nova-snapshot except copy-on-write) or cinder (volume-upload-to-image) will be"},{"line_number":44,"context_line":"able to set the virtual size to image as well."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"NOTE: To start with we are going to calculate virtual size for images which"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_e922b3b8","line":43,"range":{"start_line":43,"start_character":21,"end_line":43,"end_character":35},"updated":"2020-08-05 14:59:38.000000000","message":"Can we clarify that this is direct-to-backend snapshot? QCOW2 format is a \"copy-on-write\" format, and I wouldn\u0027t want people to think that this won\u0027t work for qcow files.","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"fc6df4291339138d839c341084a5decfa4d6386d","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"With this change virtual size will be set to image even user tries to use any"},{"line_number":42,"context_line":"of above two methods to create the image. Also images created by nova"},{"line_number":43,"context_line":"(nova-snapshot except copy-on-write) or cinder (volume-upload-to-image) will be"},{"line_number":44,"context_line":"able to set the virtual size to image as well."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"NOTE: To start with we are going to calculate virtual size for images which"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_0f96074d","line":43,"range":{"start_line":43,"start_character":21,"end_line":43,"end_character":35},"in_reply_to":"9f560f44_e922b3b8","updated":"2020-08-05 16:11:35.000000000","message":"Done","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"98fefa8ada83ad4b6c0bb70364fa9841c9645ec3","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"NOTE: To start with we are going to calculate virtual size for images which"},{"line_number":47,"context_line":"will have container-format ``bare`` only. Later as and when required or"},{"line_number":48,"context_line":"expected we will enhance it for other container-formats."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Alternatives"},{"line_number":51,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_29294b9a","line":48,"updated":"2020-08-05 14:59:38.000000000","message":"Also add \"uncompressed\" as well?","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"fc6df4291339138d839c341084a5decfa4d6386d","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"NOTE: To start with we are going to calculate virtual size for images which"},{"line_number":47,"context_line":"will have container-format ``bare`` only. Later as and when required or"},{"line_number":48,"context_line":"expected we will enhance it for other container-formats."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Alternatives"},{"line_number":51,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_af86fb11","line":48,"in_reply_to":"9f560f44_29294b9a","updated":"2020-08-05 16:11:35.000000000","message":"Done","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"98fefa8ada83ad4b6c0bb70364fa9841c9645ec3","unresolved":false,"context_lines":[{"line_number":99,"context_line":"-----------"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Primary assignee:"},{"line_number":102,"context_line":"  dansmith"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Other contributors:"},{"line_number":105,"context_line":"  None"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_891b377f","line":102,"updated":"2020-08-05 14:59:38.000000000","message":"Hah, how did this happen?! :P","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"fc6df4291339138d839c341084a5decfa4d6386d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"-----------"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Primary assignee:"},{"line_number":102,"context_line":"  dansmith"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Other contributors:"},{"line_number":105,"context_line":"  None"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_efc91359","line":102,"in_reply_to":"9f560f44_891b377f","updated":"2020-08-05 16:11:35.000000000","message":"you earned it :D\nalso changing this to danms","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"98fefa8ada83ad4b6c0bb70364fa9841c9645ec3","unresolved":false,"context_lines":[{"line_number":132,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"Tempest test to verify that virtual size is set on image using glance,"},{"line_number":135,"context_line":"nova snapshot and cinder upload-to-image operations."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"Documentation Impact"},{"line_number":138,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_a40bc221","line":135,"updated":"2020-08-05 14:59:38.000000000","message":"We can\u0027t determine from tempest that this code is present on the glance side, right? Meaning, nothing in the API will advertise that this is available? Maybe we could make tempest look for virtual_size after upload and, if set, ensure that it\u0027s right? Or, I guess, a tempest config...","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"fc6df4291339138d839c341084a5decfa4d6386d","unresolved":false,"context_lines":[{"line_number":132,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"Tempest test to verify that virtual size is set on image using glance,"},{"line_number":135,"context_line":"nova snapshot and cinder upload-to-image operations."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"Documentation Impact"},{"line_number":138,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f560f44_4fd8ff1c","line":135,"in_reply_to":"9f560f44_a40bc221","updated":"2020-08-05 16:11:35.000000000","message":"yes, later part sounds good than using tempest config","commit_id":"a8ba9c05417e02ad67da06795d87e8a86173c6a4"}]}
