)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"39521ecd39eda08fa003dba123327373fc3a29e4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangsong \u003czhangsong@cmss.chinamobile.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-09 23:31:02 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix the bug of OSError when copy volume to image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When I try to upload volume to image in horizon, an error occurred"},{"line_number":10,"context_line":"like this :"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da85f559_1d730482","line":7,"updated":"2015-11-09 15:56:13.000000000","message":"fix -\u003e Fix","commit_id":"d136abf423ec1e0e97d2755c1d1b754b474a5865"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"5ef9b987089cd9285f54158337d20f89614b0b89","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangsong \u003czhangsong@cmss.chinamobile.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-10 21:52:29 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix the bug of OSError when convert image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When I try to convert a image use image_utils.convert_image() method,"},{"line_number":10,"context_line":"an error occurred like this :"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da85f559_7696bcf1","line":7,"updated":"2015-11-10 14:22:36.000000000","message":"fix -\u003e Fix","commit_id":"7483c6faeca0b78c6bd204e55fcb316dc8a3a33a"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"293afb62672aa37cec7d9e12789fd4dd5c33d94d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangsong \u003czhangsong@cmss.chinamobile.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-11 11:42:40 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix the bug of OSError when convert image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When I try to convert a image use image_utils.convert_image() method,"},{"line_number":10,"context_line":"an error occurred like this :"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da85f559_e73e4b8b","line":7,"updated":"2015-11-11 09:55:17.000000000","message":"fix \u003d\u003e Fix\nconvert \u003d\u003e converting","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"293afb62672aa37cec7d9e12789fd4dd5c33d94d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"fix the bug of OSError when convert image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When I try to convert a image use image_utils.convert_image() method,"},{"line_number":10,"context_line":"an error occurred like this :"},{"line_number":11,"context_line":"\u0027\u0027\u0027"},{"line_number":12,"context_line":"2015-11-09 07:57:04.777 26189 ERROR oslo_messaging.rpc.dispatcher"},{"line_number":13,"context_line":"File \"/opt/stack/cinder/cinder/image/image_utils.py\", line 129,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da85f559_4744f748","line":10,"updated":"2015-11-11 09:55:17.000000000","message":"Extra space before \":\".","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"293afb62672aa37cec7d9e12789fd4dd5c33d94d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"OSError: [Errno 2] No such file or directory:"},{"line_number":19,"context_line":"\u0027sheepdog:10.133.17.61:7000:volume-a0a70f9b-a50e-4369-885f-c41a894c9fe5\u0027"},{"line_number":20,"context_line":"\u0027\u0027\u0027"},{"line_number":21,"context_line":"The reason is that in some cluster storage systems, like"},{"line_number":22,"context_line":"ceph/sheepdog, QEMU can access an image directly via their private"},{"line_number":23,"context_line":"protocol, and there’s no need to map an image as a block device on"},{"line_number":24,"context_line":"the host. In this case, the qemu-img convert command may like"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da85f559_87f17f03","line":21,"updated":"2015-11-11 09:55:17.000000000","message":"Would you please reformat your commit message, so that it is easier to read? Maybe a few more blank lines :-)","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"5aaa75bd4920d03c38d0228520ff21244f25fc1c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"OSError: [Errno 2] No such file or directory:"},{"line_number":19,"context_line":"\u0027sheepdog:10.133.17.61:7000:volume-a0a70f9b-a50e-4369-885f-c41a894c9fe5\u0027"},{"line_number":20,"context_line":"\u0027\u0027\u0027"},{"line_number":21,"context_line":"The reason is that in some cluster storage systems, like"},{"line_number":22,"context_line":"ceph/sheepdog, QEMU can access an image directly via their private"},{"line_number":23,"context_line":"protocol, and there’s no need to map an image as a block device on"},{"line_number":24,"context_line":"the host. In this case, the qemu-img convert command may like"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da85f559_58431faf","line":21,"in_reply_to":"da85f559_87f17f03","updated":"2015-11-12 16:39:59.000000000","message":"+1. Traceback in not needed in the commit message","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"293afb62672aa37cec7d9e12789fd4dd5c33d94d","unresolved":false,"context_lines":[{"line_number":24,"context_line":"the host. In this case, the qemu-img convert command may like"},{"line_number":25,"context_line":"\u0027qemu-img convert -O raw sheepdog:Ip:port:image_name temp_file\u0027 or"},{"line_number":26,"context_line":"\u0027qemu-img convert -O raw rbd:pool_name/image_name temp_file\u0027. So"},{"line_number":27,"context_line":"when it run the os.stat(source) in"},{"line_number":28,"context_line":"image_utils.convert_image(source,dest,out_format) method, the source"},{"line_number":29,"context_line":"path may be \u0027sheepdog:Ip:port:image_name\u0027 or \u0027rbd:pool_name/image_name\u0027."},{"line_number":30,"context_line":"Since the source path doesn\u0027t exist in OS, so os.stat(source) method"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da85f559_c7d2275c","line":27,"updated":"2015-11-11 09:55:17.000000000","message":"run \u003d\u003e runs","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"293afb62672aa37cec7d9e12789fd4dd5c33d94d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"path may be \u0027sheepdog:Ip:port:image_name\u0027 or \u0027rbd:pool_name/image_name\u0027."},{"line_number":30,"context_line":"Since the source path doesn\u0027t exist in OS, so os.stat(source) method"},{"line_number":31,"context_line":"may raise OSError."},{"line_number":32,"context_line":"In this case, the source path is not in OS, we can use the dest"},{"line_number":33,"context_line":"path instead to resolve the problem."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Change-Id: I5fd1e51840972a67053b85a76f8e001fa8148ad7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da85f559_47c71796","line":32,"updated":"2015-11-11 09:55:17.000000000","message":"\", we\" \u003d\u003e \". We\"","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"8f7a3a669a12614710adff907056aa7743012d32","unresolved":false,"context_lines":[{"line_number":28,"context_line":"We can use qemu_img_info method instead to resolve this problem, because"},{"line_number":29,"context_line":"the \u0027qemu-img info\u0027 command can always get the image size info which has"},{"line_number":30,"context_line":"support qemu-img tool. Here we capture a ValueError just in case, but it"},{"line_number":31,"context_line":"only need to give a warning message, because the image has been successfully"},{"line_number":32,"context_line":"converted."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Change-Id: I5fd1e51840972a67053b85a76f8e001fa8148ad7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"ba8a016a_12762f06","line":31,"updated":"2015-11-18 17:48:19.000000000","message":"Lines should be wrapped at 72 characters.\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"8ea9727a8eaf7d735c23ea3445b81cf4b5a16246"}],"cinder/image/image_utils.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"928aeb617226d80a02934ee3a146cbbe2dc652fa","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def check_qemu_img_version(minimum_version):"},{"line_number":82,"context_line":"    qemu_version \u003d get_qemu_img_version()"},{"line_number":83,"context_line":"    if (qemu_version is None or"},{"line_number":84,"context_line":"       qemu_version \u003c _get_version_from_string(minimum_version)):"},{"line_number":85,"context_line":"        if qemu_version:"},{"line_number":86,"context_line":"            current_version \u003d \u0027.\u0027.join((str(element)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_ccd147cf","line":83,"updated":"2015-11-09 17:12:12.000000000","message":"Why did you move the location of the \u0027or\u0027 ?","commit_id":"61051f1505485012bdaa8f742914181f4d4108c9"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"246df80940bf9e1fe5a3526a10a733699c065fcd","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def check_qemu_img_version(minimum_version):"},{"line_number":82,"context_line":"    qemu_version \u003d get_qemu_img_version()"},{"line_number":83,"context_line":"    if (qemu_version is None or"},{"line_number":84,"context_line":"       qemu_version \u003c _get_version_from_string(minimum_version)):"},{"line_number":85,"context_line":"        if qemu_version:"},{"line_number":86,"context_line":"            current_version \u003d \u0027.\u0027.join((str(element)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_7f08c891","line":83,"in_reply_to":"da85f559_ccd147cf","updated":"2015-11-10 16:39:21.000000000","message":"I tried PEP8(removed and recreated pep8 env) with latest master code, but these tests didn\u0027t hit any warnings as you mentioned.\n\n - ./run_test.sh -p\n - ./tools/with_venv.sh tox -e pep8\n\nSeems odd.\n\nAlso If this fixes are required, they should be mentioned in the commit message.","commit_id":"61051f1505485012bdaa8f742914181f4d4108c9"},{"author":{"_account_id":16917,"name":"Alex O\u0027Rourke","email":"alex.orourke@hpe.com","username":"aorourke"},"change_message_id":"0eebb6acc97bead55bb0063ec7ed16dddeac431b","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    if duration \u003c 1:"},{"line_number":128,"context_line":"        duration \u003d 1"},{"line_number":129,"context_line":"    # To some cluster storage systems, QEMU can access an image directly via"},{"line_number":130,"context_line":"    # their private protocol, and there’s no need to map an image as a block"},{"line_number":131,"context_line":"    # device on the host. In this case, the os.stat method may raise a OSError"},{"line_number":132,"context_line":"    # exception with err message \u0027No such file or directory\u0027. If the link of"},{"line_number":133,"context_line":"    # source is not exist, we can retrive the image size information from dest"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_1896a9f0","line":130,"updated":"2015-11-09 18:34:28.000000000","message":"SyntaxError: Non-ASCII character \u0027\\xe2\u0027 in file cinder/image/image_utils.py on line 130, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details","commit_id":"61051f1505485012bdaa8f742914181f4d4108c9"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"928aeb617226d80a02934ee3a146cbbe2dc652fa","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    # their private protocol, and there’s no need to map an image as a block"},{"line_number":131,"context_line":"    # device on the host. In this case, the os.stat method may raise a OSError"},{"line_number":132,"context_line":"    # exception with err message \u0027No such file or directory\u0027. If the link of"},{"line_number":133,"context_line":"    # source is not exist, we can retrive the image size information from dest"},{"line_number":134,"context_line":"    # link."},{"line_number":135,"context_line":"    try:"},{"line_number":136,"context_line":"        fsz_mb \u003d os.stat(source).st_size / units.Mi"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_8c557f51","line":133,"updated":"2015-11-09 17:12:12.000000000","message":"Given that there are other things to fix can we change this to say \u0027source does not exist\u0027 instead of \u0027source is not exist\u0027.","commit_id":"61051f1505485012bdaa8f742914181f4d4108c9"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"928aeb617226d80a02934ee3a146cbbe2dc652fa","unresolved":false,"context_lines":[{"line_number":404,"context_line":""},{"line_number":405,"context_line":"def is_xenserver_format(image_meta):"},{"line_number":406,"context_line":"    return ("},{"line_number":407,"context_line":"        image_meta[\u0027disk_format\u0027] \u003d\u003d \u0027vhd\u0027 and"},{"line_number":408,"context_line":"        image_meta[\u0027container_format\u0027] \u003d\u003d \u0027ovf\u0027"},{"line_number":409,"context_line":"    )"},{"line_number":410,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_acd723be","line":407,"updated":"2015-11-09 17:12:12.000000000","message":"Why did you move the location of the \u0027and\u0027 ?","commit_id":"61051f1505485012bdaa8f742914181f4d4108c9"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"293afb62672aa37cec7d9e12789fd4dd5c33d94d","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        duration \u003d 1"},{"line_number":129,"context_line":"    # To some cluster storage systems, QEMU can access an image directly via"},{"line_number":130,"context_line":"    # their private protocol, and there\u0027s no need to map an image as a block"},{"line_number":131,"context_line":"    # device on the host. In this case, the os.stat method may raise a OSError"},{"line_number":132,"context_line":"    # exception with err message \u0027No such file or directory\u0027. If the link of"},{"line_number":133,"context_line":"    # source doesn\u0027t exist, we can retrive the image size information from dest"},{"line_number":134,"context_line":"    # link."}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_076b4f86","line":131,"updated":"2015-11-11 09:55:17.000000000","message":"\"a OSError\" \u003d\u003e \"an OSError\"","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"d5edd4ee56cae6be2cdb00db45f2341a9b79074e","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    # device on the host. In this case, the os.stat method may raise a OSError"},{"line_number":132,"context_line":"    # exception with err message \u0027No such file or directory\u0027. If the link of"},{"line_number":133,"context_line":"    # source doesn\u0027t exist, we can retrive the image size information from dest"},{"line_number":134,"context_line":"    # link."},{"line_number":135,"context_line":"    try:"},{"line_number":136,"context_line":"        fsz_mb \u003d os.stat(source).st_size / units.Mi"},{"line_number":137,"context_line":"    except OSError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_79f5ffea","line":134,"updated":"2015-11-11 21:08:01.000000000","message":"Another option would be:\n\nfile \u003d source if os.path.isfile(source) else dest\nfsz_mb \u003d os.stat(file).st_size / units.Mi\n\nthat way we don\u0027t duplicate that one line of code..\n\nBut my bigger question is if we\u0027re changing the image format can\u0027t that change the image size? So sometimes we\u0027d be logging src_size, other times dest_size which could be different.\n\nIf the destination file is always present is there a reason we\u0027re not just always logging dest file size?","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"293afb62672aa37cec7d9e12789fd4dd5c33d94d","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    # link."},{"line_number":135,"context_line":"    try:"},{"line_number":136,"context_line":"        fsz_mb \u003d os.stat(source).st_size / units.Mi"},{"line_number":137,"context_line":"    except OSError:"},{"line_number":138,"context_line":"        fsz_mb \u003d os.stat(dest).st_size / units.Mi"},{"line_number":139,"context_line":"    mbps \u003d (fsz_mb / duration)"},{"line_number":140,"context_line":"    msg \u003d (\"Image conversion details: src %(src)s, size %(sz).2f MB, \""}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_47de37de","line":137,"updated":"2015-11-11 09:55:17.000000000","message":"I think OSError is too broad. You can first test source file exists then get size from dest file.","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"293afb62672aa37cec7d9e12789fd4dd5c33d94d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    try:"},{"line_number":136,"context_line":"        fsz_mb \u003d os.stat(source).st_size / units.Mi"},{"line_number":137,"context_line":"    except OSError:"},{"line_number":138,"context_line":"        fsz_mb \u003d os.stat(dest).st_size / units.Mi"},{"line_number":139,"context_line":"    mbps \u003d (fsz_mb / duration)"},{"line_number":140,"context_line":"    msg \u003d (\"Image conversion details: src %(src)s, size %(sz).2f MB, \""},{"line_number":141,"context_line":"           \"duration %(duration).2f sec, destination %(dest)s\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_c79787ea","line":138,"updated":"2015-11-11 09:55:17.000000000","message":"Are you sure that the dest file always exist and the size is accurate? It would be more reliable to get source size from sheepdog or rbd, but it is more complex.","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"5aaa75bd4920d03c38d0228520ff21244f25fc1c","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    try:"},{"line_number":136,"context_line":"        fsz_mb \u003d os.stat(source).st_size / units.Mi"},{"line_number":137,"context_line":"    except OSError:"},{"line_number":138,"context_line":"        fsz_mb \u003d os.stat(dest).st_size / units.Mi"},{"line_number":139,"context_line":"    mbps \u003d (fsz_mb / duration)"},{"line_number":140,"context_line":"    msg \u003d (\"Image conversion details: src %(src)s, size %(sz).2f MB, \""},{"line_number":141,"context_line":"           \"duration %(duration).2f sec, destination %(dest)s\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_18f4b758","line":138,"in_reply_to":"da85f559_c79787ea","updated":"2015-11-12 16:39:59.000000000","message":"Also, please add logging here","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"bfa504ffbeaceeedfcad1d34310a4966b7c765c6","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        image_size \u003d qemu_img_info(source, run_as_root\u003dTrue).virtual_size"},{"line_number":131,"context_line":"    except ValueError as e:"},{"line_number":132,"context_line":"        LOG.warning(_LW(\"Can\u0027t get image size. %s\") % e)"},{"line_number":133,"context_line":"        return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    fsz_mb \u003d image_size / units.Mi"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_d6221fa3","line":132,"updated":"2015-11-15 21:20:53.000000000","message":"Pleas add LOG.debug here. The src and destination information  is important to debug error case.","commit_id":"d62fad7acebd2089a22066354ae9cab358fd02e8"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"9665cceac74a14249e4130ee16dfadc23c9f6d07","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        image_size \u003d qemu_img_info(source, run_as_root\u003dTrue).virtual_size"},{"line_number":131,"context_line":"    except ValueError as e:"},{"line_number":132,"context_line":"        LOG.warning(_LW(\"Can\u0027t get image size. %s\") % e)"},{"line_number":133,"context_line":"        return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    fsz_mb \u003d image_size / units.Mi"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_84ba1a6d","line":132,"in_reply_to":"ba8a016a_0ad52f42","updated":"2015-11-17 19:18:26.000000000","message":"I agree info would be proper to output source and dest file names.","commit_id":"d62fad7acebd2089a22066354ae9cab358fd02e8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"9f7e94bc710787c280bc3e4333db1bdfdca41d15","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        image_size \u003d qemu_img_info(source, run_as_root\u003dTrue).virtual_size"},{"line_number":131,"context_line":"    except ValueError as e:"},{"line_number":132,"context_line":"        LOG.warning(_LW(\"Can\u0027t get image size. %s\") % e)"},{"line_number":133,"context_line":"        return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    fsz_mb \u003d image_size / units.Mi"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_ddbf6ca8","line":132,"in_reply_to":"ba8a016a_84ba1a6d","updated":"2015-11-18 13:20:15.000000000","message":"Ah, okay. This is a good idea.","commit_id":"d62fad7acebd2089a22066354ae9cab358fd02e8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"473b1d486a4a2d39513c47eee9f00a49f73c924b","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        image_size \u003d qemu_img_info(source, run_as_root\u003dTrue).virtual_size"},{"line_number":131,"context_line":"    except ValueError as e:"},{"line_number":132,"context_line":"        LOG.warning(_LW(\"Can\u0027t get image size. %s\") % e)"},{"line_number":133,"context_line":"        return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    fsz_mb \u003d image_size / units.Mi"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_0ad52f42","line":132,"in_reply_to":"da85f559_d6221fa3","updated":"2015-11-16 10:58:55.000000000","message":"Well, I think this should be warning or info at least, as we\u0027re returning immediately without logging further information.","commit_id":"d62fad7acebd2089a22066354ae9cab358fd02e8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"def4ebf2fe0c7fb8ec202ed35f256c965b75bce4","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    except ValueError as e:"},{"line_number":132,"context_line":"        msg \u003d _LI(\"Can\u0027t get image size info: src %(src)s,\""},{"line_number":133,"context_line":"                  \" dest %(dest)s. %(error)s\")"},{"line_number":134,"context_line":"        LOG.info(msg, {\"src\": source,"},{"line_number":135,"context_line":"                       \"dest\": dest,"},{"line_number":136,"context_line":"                       \"error\": e})"},{"line_number":137,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_b865cf1e","line":134,"updated":"2015-11-18 15:25:49.000000000","message":"I\u0027m fine with info here if everything completed successfully.","commit_id":"8ea9727a8eaf7d735c23ea3445b81cf4b5a16246"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"001975d61161ba463c5105efd1392a68eff01a98","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    except ValueError as e:"},{"line_number":132,"context_line":"        msg \u003d _LI(\"Can\u0027t get image size info: src %(src)s,\""},{"line_number":133,"context_line":"                  \" dest %(dest)s. %(error)s\")"},{"line_number":134,"context_line":"        LOG.info(msg, {\"src\": source,"},{"line_number":135,"context_line":"                       \"dest\": dest,"},{"line_number":136,"context_line":"                       \"error\": e})"},{"line_number":137,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_a37ba27a","line":134,"in_reply_to":"ba8a016a_b865cf1e","updated":"2015-11-23 13:47:34.000000000","message":"-1: This should be more concrete and report success or failure.","commit_id":"8ea9727a8eaf7d735c23ea3445b81cf4b5a16246"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"212f742a93b6e0a76d28f14f23c038c5fc7d105f","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    \"duration\": duration,"},{"line_number":146,"context_line":"                    \"dest\": dest})"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    msg \u003d _LI(\"Converted %(sz).2f MB image at %(mbps).2f MB/s\")"},{"line_number":149,"context_line":"    LOG.info(msg, {\"sz\": fsz_mb, \"mbps\": mbps})"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_47403b07","line":148,"updated":"2015-11-19 17:11:07.000000000","message":"The image has already been successfully converted, but now you are missing this error message saying that that is the case.  The same messages showing timing and that it succeeded should still appear.","commit_id":"8ea9727a8eaf7d735c23ea3445b81cf4b5a16246"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"99be4aeaa3342b8f024a4dd9da888248eeba8267","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    \"duration\": duration,"},{"line_number":146,"context_line":"                    \"dest\": dest})"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    msg \u003d _LI(\"Converted %(sz).2f MB image at %(mbps).2f MB/s\")"},{"line_number":149,"context_line":"    LOG.info(msg, {\"sz\": fsz_mb, \"mbps\": mbps})"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_51575c26","line":148,"in_reply_to":"ba8a016a_47403b07","updated":"2015-11-20 16:40:13.000000000","message":"I agree. You may broaden the try clause and add this as finally block or use different conditional construct.","commit_id":"8ea9727a8eaf7d735c23ea3445b81cf4b5a16246"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"001975d61161ba463c5105efd1392a68eff01a98","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    \"duration\": duration,"},{"line_number":146,"context_line":"                    \"dest\": dest})"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    msg \u003d _LI(\"Converted %(sz).2f MB image at %(mbps).2f MB/s\")"},{"line_number":149,"context_line":"    LOG.info(msg, {\"sz\": fsz_mb, \"mbps\": mbps})"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_63413a39","line":148,"in_reply_to":"ba8a016a_47403b07","updated":"2015-11-23 13:47:34.000000000","message":"I don\u0027t follow you guys, if call to `qemu_img_info` failed we cannot display any of these 2 messages since we don\u0027t have image_size, right?\n\nSo maybe we should just update L134 to log that it was successfully converted without giving specifics.","commit_id":"8ea9727a8eaf7d735c23ea3445b81cf4b5a16246"}],"cinder/tests/unit/test_image_utils.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"d5edd4ee56cae6be2cdb00db45f2341a9b79074e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        dest \u003d mock.sentinel.dest"},{"line_number":124,"context_line":"        out_format \u003d mock.sentinel.out_format"},{"line_number":125,"context_line":"        fileInfo \u003d mock.sentinel.stat"},{"line_number":126,"context_line":"        fileInfo.st_size \u003d 1048576"},{"line_number":127,"context_line":"        mock_stat.side_effect \u003d [fileInfo, OSError]"},{"line_number":128,"context_line":"        throttle \u003d throttling.Throttle(prefix\u003d[\u0027cgcmd\u0027])"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_d9daeb16","line":126,"updated":"2015-11-11 21:08:01.000000000","message":"Since for this test we only want to return the fileInfo immediately, we can do  \u0027mock_stat.return_value \u003d fileInfo\u0027.  If we do this we should be able to remove line 141","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"d5edd4ee56cae6be2cdb00db45f2341a9b79074e","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        dest \u003d mock.sentinel.dest"},{"line_number":199,"context_line":"        out_format \u003d mock.sentinel.out_format"},{"line_number":200,"context_line":"        fileInfo \u003d mock.sentinel.stat"},{"line_number":201,"context_line":"        fileInfo.st_size \u003d 1048576"},{"line_number":202,"context_line":"        mock_stat.side_effect \u003d [fileInfo, OSError]"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        output \u003d image_utils.convert_image(source, dest, out_format)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_393e9728","line":201,"updated":"2015-11-11 21:08:01.000000000","message":"Same comment as above","commit_id":"35fd58003c80780c774ff4c9100d88bc4d7fcfe9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"001975d61161ba463c5105efd1392a68eff01a98","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        out_format \u003d mock.sentinel.out_format"},{"line_number":125,"context_line":"        fileInfo \u003d mock.sentinel.info"},{"line_number":126,"context_line":"        fileInfo.virtual_size \u003d 1048576"},{"line_number":127,"context_line":"        mock_info.return_value \u003d fileInfo"},{"line_number":128,"context_line":"        throttle \u003d throttling.Throttle(prefix\u003d[\u0027cgcmd\u0027])"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        with mock.patch(\u0027cinder.volume.utils.check_for_odirect_support\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_c3282636","line":127,"updated":"2015-11-23 13:47:34.000000000","message":"nit: Couldn\u0027t these 3 lines be simplified to?:\n\n mock_info.return_value.virtual_size \u003d 1048576","commit_id":"8ea9727a8eaf7d735c23ea3445b81cf4b5a16246"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"001975d61161ba463c5105efd1392a68eff01a98","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        out_format \u003d mock.sentinel.out_format"},{"line_number":197,"context_line":"        fileInfo \u003d mock.sentinel.info"},{"line_number":198,"context_line":"        fileInfo.virtual_size \u003d 1048576"},{"line_number":199,"context_line":"        mock_info.return_value \u003d fileInfo"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        output \u003d image_utils.convert_image(source, dest, out_format)"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba8a016a_a3b3a209","line":199,"updated":"2015-11-23 13:47:34.000000000","message":"nit: Same as in L125-L127","commit_id":"8ea9727a8eaf7d735c23ea3445b81cf4b5a16246"}]}
