)]}'
{"cinder/image/image_utils.py":[{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"8cf3332279ddb5655a18a973900a4821eb2363a7","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":"Helper methods to deal with images"},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import os"},{"line_number":25,"context_line":"import re"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F7iY%3D","line":22,"updated":"2012-12-06 14:37:45.000000000","message":"Since this is basically copied from nova, I\u0027d at least comment with a TODO about moving to oslo","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"d6416549f61b9e1a16f5cd1740beb2d480a6dd49","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":"Helper methods to deal with images"},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import os"},{"line_number":25,"context_line":"import re"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F7XE%3D","line":22,"in_reply_to":"AAAAMX%2F%2F7iY%3D","updated":"2012-12-06 16:58:10.000000000","message":"Done","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"c66e6ddf5e09677c01e18a582f8f657123490a20","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            os.path.exists(FLAGS.image_conversion_dir)):"},{"line_number":205,"context_line":"        os.makedirs(FLAGS.image_conversion_dir)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    with tempfile.NamedTemporaryFile(dir\u003dFLAGS.image_conversion_dir) as tmp:"},{"line_number":208,"context_line":"        fetch(context, image_service, image_id, tmp.name, user_id, project_id)"},{"line_number":209,"context_line":"        tmp.flush()"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F71Q%3D","line":207,"updated":"2012-12-06 06:58:34.000000000","message":"What happens if FLAGS.image_conversion_dir is not set?","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"d6416549f61b9e1a16f5cd1740beb2d480a6dd49","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            os.path.exists(FLAGS.image_conversion_dir)):"},{"line_number":205,"context_line":"        os.makedirs(FLAGS.image_conversion_dir)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    with tempfile.NamedTemporaryFile(dir\u003dFLAGS.image_conversion_dir) as tmp:"},{"line_number":208,"context_line":"        fetch(context, image_service, image_id, tmp.name, user_id, project_id)"},{"line_number":209,"context_line":"        tmp.flush()"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F7XA%3D","line":207,"in_reply_to":"AAAAMX%2F%2F71Q%3D","updated":"2012-12-06 16:58:10.000000000","message":"We set a default above so should be fine, but even if we didn\u0027t, NamedTemporaryFile would still work just fine it would just use it\u0027s own mechanism to determine a temp directory for the temp file.","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"8cf3332279ddb5655a18a973900a4821eb2363a7","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            # NOTE(jdg): We need root to write to the volume"},{"line_number":227,"context_line":"            # shutil.copy or somethign would be nice here, but"},{"line_number":228,"context_line":"            # but as a bit of a hack, we\u0027ll just use qemu-img convert"},{"line_number":229,"context_line":"            # even if it\u0027s already raw"},{"line_number":230,"context_line":"            LOG.debug(\"%s was %s, converting to raw\" % (image_id, fmt))"},{"line_number":231,"context_line":"            convert_image(tmp.name, dest, \u0027raw\u0027)"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F7is%3D","line":229,"updated":"2012-12-06 14:37:45.000000000","message":"I\u0027d remove the mention of shutil.copy here as it would be much worse performance wise. Note I was worried that qemu-img convert would\nseek over holes, and not actually write the zeros to the device.\nBut it\u0027s smart enough to know that it\u0027s not writing to a normal file,\nand will write zeros correctly to the volume.","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"d6416549f61b9e1a16f5cd1740beb2d480a6dd49","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            # NOTE(jdg): We need root to write to the volume"},{"line_number":227,"context_line":"            # shutil.copy or somethign would be nice here, but"},{"line_number":228,"context_line":"            # but as a bit of a hack, we\u0027ll just use qemu-img convert"},{"line_number":229,"context_line":"            # even if it\u0027s already raw"},{"line_number":230,"context_line":"            LOG.debug(\"%s was %s, converting to raw\" % (image_id, fmt))"},{"line_number":231,"context_line":"            convert_image(tmp.name, dest, \u0027raw\u0027)"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F7W8%3D","line":229,"in_reply_to":"AAAAMX%2F%2F7is%3D","updated":"2012-12-06 16:58:10.000000000","message":"Done","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"c66e6ddf5e09677c01e18a582f8f657123490a20","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # but as a bit of a hack, we\u0027ll just use qemu-img convert"},{"line_number":229,"context_line":"            # even if it\u0027s already raw"},{"line_number":230,"context_line":"            LOG.debug(\"%s was %s, converting to raw\" % (image_id, fmt))"},{"line_number":231,"context_line":"            convert_image(tmp.name, dest, \u0027raw\u0027)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"            data \u003d qemu_img_info(dest)"},{"line_number":234,"context_line":"            if data.file_format !\u003d \"raw\":"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F70w%3D","line":231,"updated":"2012-12-06 06:58:34.000000000","message":"tmp.close() here to clean up the temporary file?","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"d6416549f61b9e1a16f5cd1740beb2d480a6dd49","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # but as a bit of a hack, we\u0027ll just use qemu-img convert"},{"line_number":229,"context_line":"            # even if it\u0027s already raw"},{"line_number":230,"context_line":"            LOG.debug(\"%s was %s, converting to raw\" % (image_id, fmt))"},{"line_number":231,"context_line":"            convert_image(tmp.name, dest, \u0027raw\u0027)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"            data \u003d qemu_img_info(dest)"},{"line_number":234,"context_line":"            if data.file_format !\u003d \"raw\":"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F7W0%3D","line":231,"in_reply_to":"AAAAMX%2F%2F70w%3D","updated":"2012-12-06 16:58:10.000000000","message":"Not sure it\u0027s necessary, but I don\u0027t have a problem with the explicit close call.","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"}],"cinder/volume/driver.py":[{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"c66e6ddf5e09677c01e18a582f8f657123490a20","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import os"},{"line_number":24,"context_line":"import re"},{"line_number":25,"context_line":"import tempfile"},{"line_number":26,"context_line":"import time"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from cinder import exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F72Q%3D","line":25,"updated":"2012-12-06 06:58:34.000000000","message":"It seems like this import is not used","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"d6416549f61b9e1a16f5cd1740beb2d480a6dd49","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import os"},{"line_number":24,"context_line":"import re"},{"line_number":25,"context_line":"import tempfile"},{"line_number":26,"context_line":"import time"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from cinder import exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F7Ww%3D","line":25,"in_reply_to":"AAAAMX%2F%2F72Q%3D","updated":"2012-12-06 16:58:10.000000000","message":"Done","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"c66e6ddf5e09677c01e18a582f8f657123490a20","unresolved":false,"context_lines":[{"line_number":591,"context_line":"        image_utils.fetch_to_raw(context,"},{"line_number":592,"context_line":"                                 image_service,"},{"line_number":593,"context_line":"                                 image_id,"},{"line_number":594,"context_line":"                                 self.local_path(volume))"},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"    def copy_volume_to_image(self, context, volume, image_service, image_id):"},{"line_number":597,"context_line":"        \"\"\"Copy the volume to the specified image.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F71Y%3D","line":594,"updated":"2012-12-06 06:58:34.000000000","message":"Not a comment about the code per se, but how would you recommend that controller back-ends implement copy_image_to_volume and copy_volume_to_image (when there is no local path)?","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"d6416549f61b9e1a16f5cd1740beb2d480a6dd49","unresolved":false,"context_lines":[{"line_number":591,"context_line":"        image_utils.fetch_to_raw(context,"},{"line_number":592,"context_line":"                                 image_service,"},{"line_number":593,"context_line":"                                 image_id,"},{"line_number":594,"context_line":"                                 self.local_path(volume))"},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"    def copy_volume_to_image(self, context, volume, image_service, image_id):"},{"line_number":597,"context_line":"        \"\"\"Copy the volume to the specified image.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMX%2F%2F7Wc%3D","line":594,"in_reply_to":"AAAAMX%2F%2F71Y%3D","updated":"2012-12-06 16:58:10.000000000","message":"So very good question, and that\u0027s what I\u0027ve been messing with a bit as the follow on to this patch.  So far I\u0027m learning towards making an temporary iscsi attach to the cinder-volume node, xfr image, detach.\n\nBTW, this is one of the nice things about iSCSI IMO :)","commit_id":"2a4b3a804e0f3f71fbc2176c83e87f68b08445f2"}]}
