)]}'
{"specs/wallaby/store-volume-format-info.rst":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"424c8b5116e22bc94780ba7822e92f32e6162bab","unresolved":true,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"The \"format\" info will returned within \"metadata\" in volume show API::"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    /v3/{project_id}/volumes/{volume_id}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    {"},{"line_number":64,"context_line":"        \"volume\": {"},{"line_number":65,"context_line":"            \"status\": \"available\","},{"line_number":66,"context_line":"            \"metadata\": {"},{"line_number":67,"context_line":"                \"format\": \"raw\","},{"line_number":68,"context_line":"            }"},{"line_number":69,"context_line":"        }"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Security impact"},{"line_number":73,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"c07da5c1_79a939f0","line":70,"range":{"start_line":59,"start_character":0,"end_line":70,"end_character":5},"updated":"2020-12-08 08:40:09.000000000","message":"This was part of original spec but unsure if we want to do this or not.\nAlso will require MV bump if we plan to include this.","commit_id":"69a8489b1585f0f2c27614994c61c698c29cb5c0"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"d304e8a88a3b0ab8e12b132c7f62422b72451ca1","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"The \"format\" info will returned within \"metadata\" in volume show API::"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    /v3/{project_id}/volumes/{volume_id}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    {"},{"line_number":64,"context_line":"        \"volume\": {"},{"line_number":65,"context_line":"            \"status\": \"available\","},{"line_number":66,"context_line":"            \"metadata\": {"},{"line_number":67,"context_line":"                \"format\": \"raw\","},{"line_number":68,"context_line":"            }"},{"line_number":69,"context_line":"        }"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Security impact"},{"line_number":73,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"525616e3_fb1324a6","line":70,"range":{"start_line":59,"start_character":0,"end_line":70,"end_character":5},"in_reply_to":"8f1d21da_b5e4dda2","updated":"2020-12-09 16:31:12.000000000","message":"Done","commit_id":"69a8489b1585f0f2c27614994c61c698c29cb5c0"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"2a330801559d35c8996445729958671657fcb1ae","unresolved":true,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"The \"format\" info will returned within \"metadata\" in volume show API::"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    /v3/{project_id}/volumes/{volume_id}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    {"},{"line_number":64,"context_line":"        \"volume\": {"},{"line_number":65,"context_line":"            \"status\": \"available\","},{"line_number":66,"context_line":"            \"metadata\": {"},{"line_number":67,"context_line":"                \"format\": \"raw\","},{"line_number":68,"context_line":"            }"},{"line_number":69,"context_line":"        }"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Security impact"},{"line_number":73,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"8f1d21da_b5e4dda2","line":70,"range":{"start_line":59,"start_character":0,"end_line":70,"end_character":5},"in_reply_to":"c07da5c1_79a939f0","updated":"2020-12-09 15:43:36.000000000","message":"IMO we shouldn\u0027t return this in the volume detail API -- it\u0027s relevant for attachments but not top-level volume info.","commit_id":"69a8489b1585f0f2c27614994c61c698c29cb5c0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"99b4fd309abf62dfffec445a94ab9eb7ff148815","unresolved":true,"context_lines":[{"line_number":23,"context_line":"the extend operation, qemu-img uses the resize command which detects"},{"line_number":24,"context_line":"the volume format as qcow2 by reading the image\u0027s qcow2 header written into"},{"line_number":25,"context_line":"the volume. This leads to unsuccessful creation of the image."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Proposed change"},{"line_number":29,"context_line":"\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":"79bc0da6_637e6bd9","line":26,"updated":"2020-12-10 18:35:24.000000000","message":"It might make sense to explain why this is a problem for fs drivers, namely: in order to perform some operations, they may convert a volume into a qcow2 file, though this is transparent to the user.  In the current situation, with no format info stored, these drivers check to see if the volume is still raw or is a qcow2.  But if a user has stored their own qcow2 into a raw volume, this fools the driver into thinking the volume itself is a qcow2, when in fact it\u0027s a raw volume that happens to contain a qcow2, and this leads to complications.   Thus we need to actually store format info instead of guessing.","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cd4476291a58fea5e6a15363828dbf8decd1a0ef","unresolved":false,"context_lines":[{"line_number":23,"context_line":"the extend operation, qemu-img uses the resize command which detects"},{"line_number":24,"context_line":"the volume format as qcow2 by reading the image\u0027s qcow2 header written into"},{"line_number":25,"context_line":"the volume. This leads to unsuccessful creation of the image."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Proposed change"},{"line_number":29,"context_line":"\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":"ed8b71c2_1efaa95b","line":26,"in_reply_to":"79bc0da6_637e6bd9","updated":"2020-12-11 06:12:13.000000000","message":"Done","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"99b4fd309abf62dfffec445a94ab9eb7ff148815","unresolved":true,"context_lines":[{"line_number":31,"context_line":"The \"format\" info will be added to \"volume_admin_metadata\" of volumes."},{"line_number":32,"context_line":"The \"format\" will be only set / updated for filesystem-based drivers, other"},{"line_number":33,"context_line":"drivers will not contains this metadata."},{"line_number":34,"context_line":"The \"format\" field will have a default \"raw\" format for all filesystem type"},{"line_number":35,"context_line":"drivers."},{"line_number":36,"context_line":"The \"format\" info will be returned in the attachment get API."},{"line_number":37,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"08ce6db9_909d36a6","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":8},"updated":"2020-12-10 18:35:24.000000000","message":"add \"because all filesystem volumes always begin in raw format\" (assuming that\u0027s true).  Is this going to be a problem for existing volumes stored in an fs backend?  How do you propose to handle existing volumes?","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cd4476291a58fea5e6a15363828dbf8decd1a0ef","unresolved":true,"context_lines":[{"line_number":31,"context_line":"The \"format\" info will be added to \"volume_admin_metadata\" of volumes."},{"line_number":32,"context_line":"The \"format\" will be only set / updated for filesystem-based drivers, other"},{"line_number":33,"context_line":"drivers will not contains this metadata."},{"line_number":34,"context_line":"The \"format\" field will have a default \"raw\" format for all filesystem type"},{"line_number":35,"context_line":"drivers."},{"line_number":36,"context_line":"The \"format\" info will be returned in the attachment get API."},{"line_number":37,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"a4993765_bba60458","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":8},"in_reply_to":"08ce6db9_909d36a6","updated":"2020-12-11 06:12:13.000000000","message":"That\u0027s not true. creating raw or qcow2 volumes depend on the config option which is unique for every fs type driver[1], eg: nfs_qcow2_volumes, nexenta_qcow2_volumes etc\nFor existing volumes, my plan is to execute qemu-img info and store the format in admin_metadata, will update it.\n\n[1] https://github.com/openstack/cinder/blob/master/cinder/volume/drivers/remotefs.py#L314-L318","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"72f66280b8d2999bd35b7951ecef332f9a2b253c","unresolved":true,"context_lines":[{"line_number":31,"context_line":"The \"format\" info will be added to \"volume_admin_metadata\" of volumes."},{"line_number":32,"context_line":"The \"format\" will be only set / updated for filesystem-based drivers, other"},{"line_number":33,"context_line":"drivers will not contains this metadata."},{"line_number":34,"context_line":"The \"format\" field will have a default \"raw\" format for all filesystem type"},{"line_number":35,"context_line":"drivers."},{"line_number":36,"context_line":"The \"format\" info will be returned in the attachment get API."},{"line_number":37,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"e6688171_cd0bd1a1","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":8},"in_reply_to":"a4993765_bba60458","updated":"2020-12-11 16:29:48.000000000","message":"Thanks for the explanation.  I\u0027m confused where you say \"The \"format\" field will have a default \"raw\" format for all filesystem type drivers.\", but I wonder if that\u0027s a holdover from when you were thinking of this being a new column in the database.  I think what you want to say is that the format field will be created by FS drivers at the time of volume creation (so it won\u0027t have a default value, it will be whatever the driver is configured to use).  But it will definitely be there and be populated, which is the key point.","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e3a45ffb44d897abcf388a6fe567f0536a3822f3","unresolved":true,"context_lines":[{"line_number":31,"context_line":"The \"format\" info will be added to \"volume_admin_metadata\" of volumes."},{"line_number":32,"context_line":"The \"format\" will be only set / updated for filesystem-based drivers, other"},{"line_number":33,"context_line":"drivers will not contains this metadata."},{"line_number":34,"context_line":"The \"format\" field will have a default \"raw\" format for all filesystem type"},{"line_number":35,"context_line":"drivers."},{"line_number":36,"context_line":"The \"format\" info will be returned in the attachment get API."},{"line_number":37,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"2d76bd19_4c2eb49b","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":8},"in_reply_to":"e6688171_cd0bd1a1","updated":"2020-12-11 19:21:29.000000000","message":"With default i was referring to \"if the config option isn\u0027t set, the default format of volumes created is \u0027raw\u0027\" but you\u0027re right, this seems very confusing. Will update it.","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"99b4fd309abf62dfffec445a94ab9eb7ff148815","unresolved":true,"context_lines":[{"line_number":44,"context_line":"error / exploit vectors. Because if the beginning content of a \"raw\" volume"},{"line_number":45,"context_line":"happens to a \"qcow2\" disk, auto detection method will judge this volume to be"},{"line_number":46,"context_line":"a \"qcow2\" volume wrongly. This is the same issue which cases glance to fail"},{"line_number":47,"context_line":"an image create operation when using cinder as a store."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Data model impact"},{"line_number":50,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"2c5ce4e9_ab492dc4","line":47,"updated":"2020-12-10 18:35:24.000000000","message":"So basically, the alternative is to try to make better guesses, and we\u0027ve already seen that this doesn\u0027t work.  It\u0027s better to explicitly store the format.","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"99b4fd309abf62dfffec445a94ab9eb7ff148815","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        \"attachment\": {"},{"line_number":65,"context_line":"            \"id\": \"3b8b6631-1cf7-4fd7-9afb-c01e541a073c\","},{"line_number":66,"context_line":"            ..."},{"line_number":67,"context_line":"            \"format\": \"raw\""},{"line_number":68,"context_line":"        }"},{"line_number":69,"context_line":"    }"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"dc7837b3_24c722c6","line":67,"range":{"start_line":67,"start_character":11,"end_line":67,"end_character":27},"updated":"2020-12-10 18:35:24.000000000","message":"This changes the response and will require a new microversion.  Does it make sense to include this as part of the connection_info?  That\u0027s defined as an arbitrary JSON object, so it wouldn\u0027t require a mv bump.\n\nIt\u0027s not a problem to have a new microversion if that\u0027s the correct thing to do here.  But note that you\u0027ll have to have this for all attachments if you change the attachment response.  (You won\u0027t have to store it in the DB, but you\u0027ll need to include \u0027\"format\": null\u0027 in the response.)","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3b72f15a32d10a69c97e0e0a731ab650c63b0228","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        \"attachment\": {"},{"line_number":65,"context_line":"            \"id\": \"3b8b6631-1cf7-4fd7-9afb-c01e541a073c\","},{"line_number":66,"context_line":"            ..."},{"line_number":67,"context_line":"            \"format\": \"raw\""},{"line_number":68,"context_line":"        }"},{"line_number":69,"context_line":"    }"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"36364e18_29485d8f","line":67,"range":{"start_line":67,"start_character":11,"end_line":67,"end_character":27},"in_reply_to":"4e939da2_0142ac47","updated":"2020-12-21 04:58:51.000000000","message":"Done","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"72f66280b8d2999bd35b7951ecef332f9a2b253c","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        \"attachment\": {"},{"line_number":65,"context_line":"            \"id\": \"3b8b6631-1cf7-4fd7-9afb-c01e541a073c\","},{"line_number":66,"context_line":"            ..."},{"line_number":67,"context_line":"            \"format\": \"raw\""},{"line_number":68,"context_line":"        }"},{"line_number":69,"context_line":"    }"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"83f826ca_44df5241","line":67,"range":{"start_line":67,"start_character":11,"end_line":67,"end_character":27},"in_reply_to":"5560e51b_ba2ef9a8","updated":"2020-12-11 16:29:48.000000000","message":"OK, let\u0027s see what Eric thinks.","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"6c25459c49a276f09326e00234b4f05d338a5c08","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        \"attachment\": {"},{"line_number":65,"context_line":"            \"id\": \"3b8b6631-1cf7-4fd7-9afb-c01e541a073c\","},{"line_number":66,"context_line":"            ..."},{"line_number":67,"context_line":"            \"format\": \"raw\""},{"line_number":68,"context_line":"        }"},{"line_number":69,"context_line":"    }"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"4e939da2_0142ac47","line":67,"range":{"start_line":67,"start_character":11,"end_line":67,"end_character":27},"in_reply_to":"83f826ca_44df5241","updated":"2020-12-16 23:32:05.000000000","message":"Doing this as part of the connection_info sounds good -- it\u0027s only used somewhere the connection_info would be consumed anyway.","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cd4476291a58fea5e6a15363828dbf8decd1a0ef","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        \"attachment\": {"},{"line_number":65,"context_line":"            \"id\": \"3b8b6631-1cf7-4fd7-9afb-c01e541a073c\","},{"line_number":66,"context_line":"            ..."},{"line_number":67,"context_line":"            \"format\": \"raw\""},{"line_number":68,"context_line":"        }"},{"line_number":69,"context_line":"    }"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5560e51b_ba2ef9a8","line":67,"range":{"start_line":67,"start_character":11,"end_line":67,"end_character":27},"in_reply_to":"dc7837b3_24c722c6","updated":"2020-12-11 06:12:13.000000000","message":"Honestly i don\u0027t have an issue since we fetch the connection_info in the glance cinder store[1]\nand can add an additional attachment get call to get the format but i think Eric had some concerns regarding the same, If he can confirm this isn\u0027t an issue then i can update it.\n\n[1] https://github.com/openstack/glance_store/blob/master/glance_store/_drivers/cinder.py#L640","commit_id":"b830665c30d5466fdc585d59bc6c838775356d27"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"72f66280b8d2999bd35b7951ecef332f9a2b253c","unresolved":true,"context_lines":[{"line_number":42,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":43,"context_line":"For existing volumes, we check if format exists in admin_metadata and if not,"},{"line_number":44,"context_line":"we can perform ``qemu-img info`` to get the format and store it in the"},{"line_number":45,"context_line":"admin_metadata at that point."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Alternatives"},{"line_number":48,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5103a97b_1f15d436","line":45,"updated":"2020-12-11 16:29:48.000000000","message":"Thanks for adding this.  You\u0027ve explained why auto-detection is not a good idea, however, so will this lead to problems?  Do we need a script on the Glance side to set this value for images, because they\u0027re the well-known problem case where the volume is \"really\" raw but there could be a qcow in there.","commit_id":"ca7a4d03484242fab9305475431caa9a853e22a0"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e3a45ffb44d897abcf388a6fe567f0536a3822f3","unresolved":true,"context_lines":[{"line_number":42,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":43,"context_line":"For existing volumes, we check if format exists in admin_metadata and if not,"},{"line_number":44,"context_line":"we can perform ``qemu-img info`` to get the format and store it in the"},{"line_number":45,"context_line":"admin_metadata at that point."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Alternatives"},{"line_number":48,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bd9cbff6_1fd7a29d","line":45,"in_reply_to":"5103a97b_1f15d436","updated":"2020-12-11 19:21:29.000000000","message":"This might lead to problems but this is the best way in code (that i can think of) to determine if existing volume is raw vs qcow2, maybe there are ways to do it manually by operator but I\u0027m not sure about that\nI\u0027m open to suggestions if there are better ways to do it\nGlance would require a change to not allow creating/writing image into a qcow2 volume.\nI don\u0027t think glance would required to set a value for images since we assume glance should only work on \"raw\" volumes and they can write anything to it.","commit_id":"ca7a4d03484242fab9305475431caa9a853e22a0"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0c4fd43dca107bc0f114142818b86e4d14dedb83","unresolved":true,"context_lines":[{"line_number":42,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":43,"context_line":"For existing volumes, we check if format exists in admin_metadata and if not,"},{"line_number":44,"context_line":"we can perform ``qemu-img info`` to get the format and store it in the"},{"line_number":45,"context_line":"admin_metadata at that point."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Alternatives"},{"line_number":48,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"6e843d83_631624d4","line":45,"in_reply_to":"bd9cbff6_1fd7a29d","updated":"2020-12-21 12:55:56.000000000","message":"We may need to think about this some more.  You are right that we don\u0027t want glance to worry about setting a value (the way the image is stored in a volume should be transparent to glance), but primary cause of the problem you\u0027re fixing is Glance storing qcow2\u0027s.  Since the format is being stored in volume admin metadata, it would be possible to write a script to update the format field on all volumes holding images simply using the Images and Block Storage APIs (we don\u0027t need direct database access).  So just something to keep in mind.","commit_id":"ca7a4d03484242fab9305475431caa9a853e22a0"},{"author":{"_account_id":18058,"name":"Lucio Seki","email":"lseki@redhat.com","username":"lseki"},"change_message_id":"757dff5af7c8be5d68991ab29baa9fee7825e1c0","unresolved":true,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"The \"format\" info will be added to \"volume_admin_metadata\" of volumes."},{"line_number":37,"context_line":"The \"format\" will be only set / updated for filesystem-based drivers, other"},{"line_number":38,"context_line":"drivers will not contains this metadata."},{"line_number":39,"context_line":"The \"format\" field will be created by FS drivers at the time of volume creation"},{"line_number":40,"context_line":"and is set to the format which the driver is configured to use."},{"line_number":41,"context_line":"The \"format\" info will be returned in the attachment get API in the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"a8f07ad6_ede8dc6c","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":25},"updated":"2020-12-22 03:12:06.000000000","message":"nit: contain","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a420dd10f047aba160a2d135919a916b5e3bd91f","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"The \"format\" info will be added to \"volume_admin_metadata\" of volumes."},{"line_number":37,"context_line":"The \"format\" will be only set / updated for filesystem-based drivers, other"},{"line_number":38,"context_line":"drivers will not contains this metadata."},{"line_number":39,"context_line":"The \"format\" field will be created by FS drivers at the time of volume creation"},{"line_number":40,"context_line":"and is set to the format which the driver is configured to use."},{"line_number":41,"context_line":"The \"format\" info will be returned in the attachment get API in the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"29e3a0da_3626cbdd","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":25},"in_reply_to":"a8f07ad6_ede8dc6c","updated":"2020-12-22 13:46:54.000000000","message":"Done","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":18058,"name":"Lucio Seki","email":"lseki@redhat.com","username":"lseki"},"change_message_id":"757dff5af7c8be5d68991ab29baa9fee7825e1c0","unresolved":true,"context_lines":[{"line_number":41,"context_line":"The \"format\" info will be returned in the attachment get API in the"},{"line_number":42,"context_line":"connection_info dict."},{"line_number":43,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":44,"context_line":"For existing volumes, we check if format exists in admin_metadata and if not,"},{"line_number":45,"context_line":"we can perform ``qemu-img info`` to get the format and store it in the"},{"line_number":46,"context_line":"admin_metadata at that point."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Alternatives"},{"line_number":49,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"e0cb57d0_a4bda5fd","line":46,"range":{"start_line":44,"start_character":70,"end_line":46,"end_character":29},"updated":"2020-12-22 03:12:06.000000000","message":"For instance, if I already have a raw volume that contains a qcow2 header written by the user, the clone operation will add it an admin_metadata ``\"format\": \"qcow2\"``, right?\nIn this case, a subsequent extend operation would consider the raw volume as a qcow2 image, and perform ``qemu-img resize``?","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"91f28c5830ba140fe8c3d2daac3842ed29b311ee","unresolved":true,"context_lines":[{"line_number":41,"context_line":"The \"format\" info will be returned in the attachment get API in the"},{"line_number":42,"context_line":"connection_info dict."},{"line_number":43,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":44,"context_line":"For existing volumes, we check if format exists in admin_metadata and if not,"},{"line_number":45,"context_line":"we can perform ``qemu-img info`` to get the format and store it in the"},{"line_number":46,"context_line":"admin_metadata at that point."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Alternatives"},{"line_number":49,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"ffc4d726_b2cfad93","line":46,"range":{"start_line":44,"start_character":70,"end_line":46,"end_character":29},"in_reply_to":"8e734f38_125185e5","updated":"2020-12-22 14:25:14.000000000","message":"Except for the Glance case, I don\u0027t think we have a reliable way to distinguish a user-qcow2 from a backend-qcow2 for legacy volumes.  But if someone thinks of something, we can do it as a follow-up.  A nice thing is that since we\u0027re using admin metadata, an operator could add the format to volumes on an ad hoc basis.  I think a good topic for the R-9 midcycle would be to brainstorm how to document this.  I think that Rajat is correct that this feature leaves us no worse off than we currently are with legacy volumes.","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a420dd10f047aba160a2d135919a916b5e3bd91f","unresolved":true,"context_lines":[{"line_number":41,"context_line":"The \"format\" info will be returned in the attachment get API in the"},{"line_number":42,"context_line":"connection_info dict."},{"line_number":43,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":44,"context_line":"For existing volumes, we check if format exists in admin_metadata and if not,"},{"line_number":45,"context_line":"we can perform ``qemu-img info`` to get the format and store it in the"},{"line_number":46,"context_line":"admin_metadata at that point."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Alternatives"},{"line_number":49,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"8e734f38_125185e5","line":46,"range":{"start_line":44,"start_character":70,"end_line":46,"end_character":29},"in_reply_to":"e0cb57d0_a4bda5fd","updated":"2020-12-22 13:46:54.000000000","message":"It will perform ``qemu-img -f qcow2 resize`` which already happens with format auto-detection.\nThis feature mostly targets better handling for newly created volumes. That said, for current volumes, we can improvise on the handling, like Brian mentioned adding a \"raw\" field for all volumes storing images (since glance should always deal with a raw volume). To mention all the scenarios and their handling in the spec seems like overkill to me and would be better to add/test during code review time IMO.","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":18058,"name":"Lucio Seki","email":"lseki@redhat.com","username":"lseki"},"change_message_id":"bcedd783b21794180ab47476cedcda9697d553fe","unresolved":false,"context_lines":[{"line_number":41,"context_line":"The \"format\" info will be returned in the attachment get API in the"},{"line_number":42,"context_line":"connection_info dict."},{"line_number":43,"context_line":"When cloning a volume, this field will be updated in the new volume\u0027s metadata."},{"line_number":44,"context_line":"For existing volumes, we check if format exists in admin_metadata and if not,"},{"line_number":45,"context_line":"we can perform ``qemu-img info`` to get the format and store it in the"},{"line_number":46,"context_line":"admin_metadata at that point."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Alternatives"},{"line_number":49,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"d1278405_31843633","line":46,"range":{"start_line":44,"start_character":70,"end_line":46,"end_character":29},"in_reply_to":"ffc4d726_b2cfad93","updated":"2020-12-22 23:34:40.000000000","message":"Got it, sounds good!","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":18058,"name":"Lucio Seki","email":"lseki@redhat.com","username":"lseki"},"change_message_id":"757dff5af7c8be5d68991ab29baa9fee7825e1c0","unresolved":true,"context_lines":[{"line_number":51,"context_line":"Some of the fs type driver uses \"qemu-img info\" command to judge"},{"line_number":52,"context_line":"the format of volume. However, this auto-detection method has many possible"},{"line_number":53,"context_line":"error / exploit vectors. Because if the beginning content of a \"raw\" volume"},{"line_number":54,"context_line":"happens to a \"qcow2\" disk, auto detection method will judge this volume to be"},{"line_number":55,"context_line":"a \"qcow2\" volume wrongly. This is the same issue which cases glance to fail"},{"line_number":56,"context_line":"an image create operation when using cinder as a store."},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"1639ea01_78ba3a4d","line":54,"range":{"start_line":54,"start_character":0,"end_line":54,"end_character":13},"updated":"2020-12-22 03:12:06.000000000","message":"nit: happens to be a","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a420dd10f047aba160a2d135919a916b5e3bd91f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"Some of the fs type driver uses \"qemu-img info\" command to judge"},{"line_number":52,"context_line":"the format of volume. However, this auto-detection method has many possible"},{"line_number":53,"context_line":"error / exploit vectors. Because if the beginning content of a \"raw\" volume"},{"line_number":54,"context_line":"happens to a \"qcow2\" disk, auto detection method will judge this volume to be"},{"line_number":55,"context_line":"a \"qcow2\" volume wrongly. This is the same issue which cases glance to fail"},{"line_number":56,"context_line":"an image create operation when using cinder as a store."},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a176460_f4b927fd","line":54,"range":{"start_line":54,"start_character":0,"end_line":54,"end_character":13},"in_reply_to":"1639ea01_78ba3a4d","updated":"2020-12-22 13:46:54.000000000","message":"Done","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0c4fd43dca107bc0f114142818b86e4d14dedb83","unresolved":true,"context_lines":[{"line_number":146,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"Add documentation regarding the format field visible in the attachment get API"},{"line_number":149,"context_line":"for fs drivers."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"References"},{"line_number":152,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":6,"id":"140b3b89_2e8e326a","line":149,"updated":"2020-12-21 12:55:56.000000000","message":"... and a reminder to admins not to modify volume admin metadata fields that they themselves haven\u0027t created.","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a420dd10f047aba160a2d135919a916b5e3bd91f","unresolved":false,"context_lines":[{"line_number":146,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"Add documentation regarding the format field visible in the attachment get API"},{"line_number":149,"context_line":"for fs drivers."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"References"},{"line_number":152,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":6,"id":"cc8bd52e_2256e4c0","line":149,"in_reply_to":"140b3b89_2e8e326a","updated":"2020-12-22 13:46:54.000000000","message":"Ack","commit_id":"9f0a224e3b1ac173e652b1e7ec80ce9c46ccdaca"}]}
