)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"fc03d9fde2b7faf847da4957a0d53fcae1f6148b","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Correct the exception msg of ImageUnacceptable"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"1. The qemu-img of cinder-volume node is not installed."},{"line_number":10,"context_line":"2. Create a boot-volume from a qcow2 image."},{"line_number":11,"context_line":"3. It will fail, and raise ImageUnacceptable exception. The output"},{"line_number":12,"context_line":"   is like this: qemu-img is not installed and image is of type"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7faddb67_44323112","line":9,"updated":"2019-07-31 15:02:20.000000000","message":"As far as I know, qemu-img is a dependency of Cinder.  What\u0027s the case here for supporting deployments without it?","commit_id":"dde40d1a650d38718f91618ef26d4d127f70801b"}],"cinder/image/image_utils.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d60d27a841d8502a8bdd8fa73101caa99b2a34d3","unresolved":false,"context_lines":[{"line_number":426,"context_line":"    LOG.info(msg, {\"sz\": fsz_mb, \"mbps\": mbps})"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"def get_qemu_data(image_id, image_meta, disk_format_raw, dest, run_as_root,"},{"line_number":430,"context_line":"                  force_share\u003dFalse):"},{"line_number":431,"context_line":"    # We may be on a system that doesn\u0027t have qemu-img installed.  That"},{"line_number":432,"context_line":"    # is ok if we are working with a RAW image.  This logic checks to see"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_3d54e9fe","line":429,"range":{"start_line":429,"start_character":40,"end_line":429,"end_character":55},"updated":"2019-04-18 16:42:51.000000000","message":"we really don\u0027t need this any more -- since you\u0027re passing in the image_meta, we can figure this out inside the function now (see my comment at L472)","commit_id":"c49d86102cd1021f5711412cdb34084a750fd1d7"},{"author":{"_account_id":25837,"name":"yenai","email":"yenai_yewu@cmss.chinamobile.com","username":"yenai2008"},"change_message_id":"029e82eb8a137536d509905245966bbbbecf9102","unresolved":false,"context_lines":[{"line_number":426,"context_line":"    LOG.info(msg, {\"sz\": fsz_mb, \"mbps\": mbps})"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"def get_qemu_data(image_id, image_meta, disk_format_raw, dest, run_as_root,"},{"line_number":430,"context_line":"                  force_share\u003dFalse):"},{"line_number":431,"context_line":"    # We may be on a system that doesn\u0027t have qemu-img installed.  That"},{"line_number":432,"context_line":"    # is ok if we are working with a RAW image.  This logic checks to see"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_ea126ab1","line":429,"range":{"start_line":429,"start_character":40,"end_line":429,"end_character":55},"in_reply_to":"3fce034c_3d54e9fe","updated":"2019-04-24 01:57:34.000000000","message":"Done","commit_id":"c49d86102cd1021f5711412cdb34084a750fd1d7"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d60d27a841d8502a8bdd8fa73101caa99b2a34d3","unresolved":false,"context_lines":[{"line_number":469,"context_line":"    image_meta \u003d image_service.show(context, image_id)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    with fileutils.remove_path_on_error(dest):"},{"line_number":472,"context_line":"        try:"},{"line_number":473,"context_line":"            format_raw \u003d True if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027 else False"},{"line_number":474,"context_line":"        except TypeError:"},{"line_number":475,"context_line":"            format_raw \u003d False"},{"line_number":476,"context_line":"        data \u003d get_qemu_data(image_id, image_meta, format_raw,"},{"line_number":477,"context_line":"                             dest, run_as_root)"},{"line_number":478,"context_line":"        # We can only really do verification of the image if we have"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_3da2a9fe","line":475,"range":{"start_line":472,"start_character":0,"end_line":475,"end_character":30},"updated":"2019-04-18 16:42:51.000000000","message":"this code is just used to set the boolean that\u0027s passed into get_qemu_data() -- since you\u0027re going to pass in the image_meta, you can do something like this check inside the function, and then you can also eliminate lines 530-533","commit_id":"c49d86102cd1021f5711412cdb34084a750fd1d7"},{"author":{"_account_id":25837,"name":"yenai","email":"yenai_yewu@cmss.chinamobile.com","username":"yenai2008"},"change_message_id":"029e82eb8a137536d509905245966bbbbecf9102","unresolved":false,"context_lines":[{"line_number":469,"context_line":"    image_meta \u003d image_service.show(context, image_id)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    with fileutils.remove_path_on_error(dest):"},{"line_number":472,"context_line":"        try:"},{"line_number":473,"context_line":"            format_raw \u003d True if image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027raw\u0027 else False"},{"line_number":474,"context_line":"        except TypeError:"},{"line_number":475,"context_line":"            format_raw \u003d False"},{"line_number":476,"context_line":"        data \u003d get_qemu_data(image_id, image_meta, format_raw,"},{"line_number":477,"context_line":"                             dest, run_as_root)"},{"line_number":478,"context_line":"        # We can only really do verification of the image if we have"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_8a272e13","line":475,"range":{"start_line":472,"start_character":0,"end_line":475,"end_character":30},"in_reply_to":"3fce034c_3da2a9fe","updated":"2019-04-24 01:57:34.000000000","message":"Done","commit_id":"c49d86102cd1021f5711412cdb34084a750fd1d7"}],"cinder/tests/unit/test_image_utils.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d60d27a841d8502a8bdd8fa73101caa99b2a34d3","unresolved":false,"context_lines":[{"line_number":1591,"context_line":"        run_as_root \u003d mock.sentinel.run_as_root"},{"line_number":1592,"context_line":"        disk_format_raw \u003d False"},{"line_number":1593,"context_line":"        image_meta \u003d {\u0027disk_format\u0027: \u0027qcow2\u0027, \u0027container_format\u0027: \u0027bare\u0027}"},{"line_number":1594,"context_line":"        self.assertRaises("},{"line_number":1595,"context_line":"            exception.ImageUnacceptable,"},{"line_number":1596,"context_line":"            image_utils.get_qemu_data, image_id, image_meta, disk_format_raw,"},{"line_number":1597,"context_line":"            dest, run_as_root\u003drun_as_root)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_bdce997f","line":1594,"updated":"2019-04-18 16:42:51.000000000","message":"You can capture this exception and then make some assertions about it to make sure that the disk_format shows up in the message -- this will verify that your fix works (and protect against regressions).  Here\u0027s an example of what I mean:\nhttps://opendev.org/openstack/cinder/src/commit/5921b36cebf1b5a21a1c33b703363929cc378126/cinder/tests/unit/image/test_glance.py#L676-L679","commit_id":"c49d86102cd1021f5711412cdb34084a750fd1d7"},{"author":{"_account_id":25837,"name":"yenai","email":"yenai_yewu@cmss.chinamobile.com","username":"yenai2008"},"change_message_id":"029e82eb8a137536d509905245966bbbbecf9102","unresolved":false,"context_lines":[{"line_number":1591,"context_line":"        run_as_root \u003d mock.sentinel.run_as_root"},{"line_number":1592,"context_line":"        disk_format_raw \u003d False"},{"line_number":1593,"context_line":"        image_meta \u003d {\u0027disk_format\u0027: \u0027qcow2\u0027, \u0027container_format\u0027: \u0027bare\u0027}"},{"line_number":1594,"context_line":"        self.assertRaises("},{"line_number":1595,"context_line":"            exception.ImageUnacceptable,"},{"line_number":1596,"context_line":"            image_utils.get_qemu_data, image_id, image_meta, disk_format_raw,"},{"line_number":1597,"context_line":"            dest, run_as_root\u003drun_as_root)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_4a2136fb","line":1594,"in_reply_to":"3fce034c_bdce997f","updated":"2019-04-24 01:57:34.000000000","message":"Done","commit_id":"c49d86102cd1021f5711412cdb34084a750fd1d7"}]}
