)]}'
{"cinder/volume/flows/api/create_volume.py":[{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"7a5ec5bf35ce736289e52d8ec14af97ddf404162","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        def_vol_type \u003d volume_types.get_default_volume_type()"},{"line_number":433,"context_line":"        if not volume_type and not source_volume and not snapshot:"},{"line_number":434,"context_line":"            src_image_id \u003d image_id or (metadata is not None and"},{"line_number":435,"context_line":"                                        metadata.get(\u0027glance_image_id\u0027))"},{"line_number":436,"context_line":"            image_volume_type \u003d self._get_image_volume_type(context,"},{"line_number":437,"context_line":"                                                            src_image_id)"},{"line_number":438,"context_line":"            volume_type \u003d (image_volume_type if image_volume_type else"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_d0ebe0ae","line":435,"range":{"start_line":435,"start_character":40,"end_line":435,"end_character":72},"updated":"2016-03-30 09:50:39.000000000","message":"Sorry, I can\u0027t get the motivation of this change.\nThis is my understanding,\nWith such command:\n#cinder create --metadata glance_image_id\u003daaa-bbb-ccc --name image2 1\na new volume is created(not from image but a pure volume), but this pure volume \nhas a type which defined in the property of image aaa-bbb-ccc.\nWhy would we do this?\nThis change is purposed to fix a bug in other components?","commit_id":"99550bed99ea1d2c91c8d9458a2b9637ba48d971"},{"author":{"_account_id":20105,"name":"Cao ShuFeng","email":"caosf.fnst@cn.fujitsu.com","username":"caosf.fnst"},"change_message_id":"df7a13ce0ac03071077bda03e06524bfa40a3b45","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        def_vol_type \u003d volume_types.get_default_volume_type()"},{"line_number":433,"context_line":"        if not volume_type and not source_volume and not snapshot:"},{"line_number":434,"context_line":"            src_image_id \u003d image_id or (metadata is not None and"},{"line_number":435,"context_line":"                                        metadata.get(\u0027glance_image_id\u0027))"},{"line_number":436,"context_line":"            image_volume_type \u003d self._get_image_volume_type(context,"},{"line_number":437,"context_line":"                                                            src_image_id)"},{"line_number":438,"context_line":"            volume_type \u003d (image_volume_type if image_volume_type else"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_b00c333c","line":435,"range":{"start_line":435,"start_character":40,"end_line":435,"end_character":72},"in_reply_to":"ba0121b8_1ac70097","updated":"2016-03-31 03:13:44.000000000","message":"I am very sorry, I still can\u0027t understand(not everyone here is familiar with glance).\nFrankly speaking, I think you should commit a bug report[1] to describe the root reason for this patch.\nIn the bug report you should describe the reproduce step of this bug, like:\n1. config\n/etc/glance/glance-api.conf\nxxx\u003dyyy\n2. create a image\n# glance image-create --aa xx --bb xx\n\n3.....\n\nAnd then you can describe that in step x:\nThere should be a volume cloning behavior, but now we must copy the full data, so we need enhance here.\n\nThis bug report will be really helpful for reviewers :).\n\n[1] https://bugs.launchpad.net/cinder/+filebug\n\nThanks","commit_id":"99550bed99ea1d2c91c8d9458a2b9637ba48d971"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"5db6fd7284f504b71f7fd7ea7c57522d77bcea93","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        def_vol_type \u003d volume_types.get_default_volume_type()"},{"line_number":433,"context_line":"        if not volume_type and not source_volume and not snapshot:"},{"line_number":434,"context_line":"            src_image_id \u003d image_id or (metadata is not None and"},{"line_number":435,"context_line":"                                        metadata.get(\u0027glance_image_id\u0027))"},{"line_number":436,"context_line":"            image_volume_type \u003d self._get_image_volume_type(context,"},{"line_number":437,"context_line":"                                                            src_image_id)"},{"line_number":438,"context_line":"            volume_type \u003d (image_volume_type if image_volume_type else"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_1ac70097","line":435,"range":{"start_line":435,"start_character":40,"end_line":435,"end_character":72},"in_reply_to":"ba0121b8_d0ebe0ae","updated":"2016-03-31 02:02:36.000000000","message":"\u003e This change is purposed to fix a bug in other components?\nKind of that.. This is for Glance\u0027s cinder store. It can now create the volume-backed image (glance image-create will create a new cinder volume to store the image data) and it specifies glance_image_id metadata.\nWhen cinder_img_volume_type image metadata is set, the image volume should have the same volume type, otherwise volume creation requires full data copy instead of volume cloning (cloning is much more efficient in some backends that supports thin provisioning).\nHowever, glance_store cannot handle image metadata, so this is extracting the volume type here.","commit_id":"99550bed99ea1d2c91c8d9458a2b9637ba48d971"}]}
