)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d46f1d6a767dcd19d9fa85b2380d147005b4f15d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     John Bresnahan \u003cjbresnah@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-01-10 10:50:37 -1000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Directly copy a file URL from glance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"That patch allows nova to use shutil to copy a file directly from the"},{"line_number":10,"context_line":"glance store.  For this to work glance needs to enable direct_url"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAM3%2F%2Fkj4%3D","line":7,"updated":"2013-01-15 17:07:01.000000000","message":"I think it\u0027s worth filing a blueprint for this - it\u0027s a tiny amount of code, but should be a really nice performance improvement. A blueprint will help highlight it","commit_id":"43da6991922714611a43a1fcc88b884dce82d1a3"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d46f1d6a767dcd19d9fa85b2380d147005b4f15d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Directly copy a file URL from glance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"That patch allows nova to use shutil to copy a file directly from the"},{"line_number":10,"context_line":"glance store.  For this to work glance needs to enable direct_url"},{"line_number":11,"context_line":"descriptions in the image metadata, and the path used to back glance"},{"line_number":12,"context_line":"must match the path used to back nova instance storage.  This should be"},{"line_number":13,"context_line":"a large performance increase for the cases where both glance and nova"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAM3%2F%2Fkl4%3D","line":10,"updated":"2013-01-15 17:07:01.000000000","message":"This is the show_image_direct_url in glance-api.conf - might be good to spell that out","commit_id":"43da6991922714611a43a1fcc88b884dce82d1a3"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d46f1d6a767dcd19d9fa85b2380d147005b4f15d","unresolved":false,"context_lines":[{"line_number":19,"context_line":"For this first simple patch only file:// is valid, and the"},{"line_number":20,"context_line":"implementation is simple and inline.  In the future it would be better"},{"line_number":21,"context_line":"to make this into propagation modules which are dynamically loaded"},{"line_number":22,"context_line":"according to the scheme."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I041b5524f8a0ea59e89ece0202f0503abf2f9d8e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAM3%2F%2FkkU%3D","line":22,"updated":"2013-01-15 17:07:01.000000000","message":"Hmm, this makes the configuration purely about the direct_url image metadata, but won\u0027t there be other metadata we might want to base our download decisions on?\n\nHow about:\n\n  glance_download_drivers \u003d direct_file, direct_swift, glusterfs\n\n?","commit_id":"43da6991922714611a43a1fcc88b884dce82d1a3"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d46f1d6a767dcd19d9fa85b2380d147005b4f15d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"implementation is simple and inline.  In the future it would be better"},{"line_number":21,"context_line":"to make this into propagation modules which are dynamically loaded"},{"line_number":22,"context_line":"according to the scheme."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I041b5524f8a0ea59e89ece0202f0503abf2f9d8e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAM3%2F%2Fkj0%3D","line":23,"updated":"2013-01-15 17:07:01.000000000","message":"Add DocImpact here so the docs folks will notice the new config options","commit_id":"43da6991922714611a43a1fcc88b884dce82d1a3"}],"nova/image/glance.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"3d8f9ca963201e915a0d52b70bd7668fe69eac94","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            location \u003d self.get_location(context, image_id)"},{"line_number":265,"context_line":"            o \u003d urlparse.urlparse(location)"},{"line_number":266,"context_line":"            if o.scheme \u003d\u003d \"file\":"},{"line_number":267,"context_line":"                f \u003d open(o.path, \"r\")"},{"line_number":268,"context_line":"                shutil.copyfileobj(f, data)"},{"line_number":269,"context_line":"                f.close()"},{"line_number":270,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Fp%2FA%3D","line":267,"updated":"2013-01-10 19:03:17.000000000","message":"I think it\u0027d be better to use with statement here. Should be safer if something goes wrong.","commit_id":"f3f03967acfeac9e4c7d7afac831b07a6cc87bcd"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"6da8964973418b7b17957757566e44479033f4ea","unresolved":false,"context_lines":[{"line_number":60,"context_line":"               default\u003d0,"},{"line_number":61,"context_line":"               help\u003d\u0027Number retries when downloading an image from glance\u0027),"},{"line_number":62,"context_line":"    cfg.ListOpt(\u0027allowed_direct_url_schemes\u0027,"},{"line_number":63,"context_line":"                default\u003d[],"},{"line_number":64,"context_line":"                help\u003d\u0027A list of url scheme that can be downloaded directly \u0027"},{"line_number":65,"context_line":"                     \u0027via the direct_url.  Currently supported schemes: \u0027"},{"line_number":66,"context_line":"                     \u0027[file].\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FpvY%3D","line":63,"updated":"2013-01-10 22:17:21.000000000","message":"Don\u0027t you want to add file in the default?","commit_id":"43da6991922714611a43a1fcc88b884dce82d1a3"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d46f1d6a767dcd19d9fa85b2380d147005b4f15d","unresolved":false,"context_lines":[{"line_number":60,"context_line":"               default\u003d0,"},{"line_number":61,"context_line":"               help\u003d\u0027Number retries when downloading an image from glance\u0027),"},{"line_number":62,"context_line":"    cfg.ListOpt(\u0027allowed_direct_url_schemes\u0027,"},{"line_number":63,"context_line":"                default\u003d[],"},{"line_number":64,"context_line":"                help\u003d\u0027A list of url scheme that can be downloaded directly \u0027"},{"line_number":65,"context_line":"                     \u0027via the direct_url.  Currently supported schemes: \u0027"},{"line_number":66,"context_line":"                     \u0027[file].\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FkkM%3D","line":63,"in_reply_to":"AAAAM3%2F%2FpvY%3D","updated":"2013-01-15 17:07:01.000000000","message":"What John said makes sense to me ... about not being able to make the assumption that the same file namespace is valid on compute nodes as glance storage nodes\n\nAmins need to explicitly say, \"yep, you can trust that the direct_url metadata points to something safe on compute nodes\"","commit_id":"43da6991922714611a43a1fcc88b884dce82d1a3"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d46f1d6a767dcd19d9fa85b2380d147005b4f15d","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            o \u003d urlparse.urlparse(location)"},{"line_number":266,"context_line":"            if o.scheme \u003d\u003d \"file\":"},{"line_number":267,"context_line":"                with open(o.path, \"r\") as f:"},{"line_number":268,"context_line":"                    shutil.copyfileobj(f, data)"},{"line_number":269,"context_line":"                return"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2Fkj8%3D","line":268,"updated":"2013-01-15 17:07:01.000000000","message":"I think we should have a FIXME here to remind ourselves what Pádraig said - a simple cp will be more efficient that using shutil, so we should have it on our TODO list to refactor the code to allow for this later","commit_id":"43da6991922714611a43a1fcc88b884dce82d1a3"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"c374780c9e9a468c22ca7d2eb02b087eeaa27739","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                    # FIXME(jbresnah) a system call to cp could have"},{"line_number":269,"context_line":"                    # significant performance advantages, however we"},{"line_number":270,"context_line":"                    # do not have the path to files at this point in"},{"line_number":271,"context_line":"                    # the abstraction.  "},{"line_number":272,"context_line":"                    shutil.copyfileobj(f, data)"},{"line_number":273,"context_line":"                return"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FgDM%3D","line":271,"updated":"2013-01-18 06:46:23.000000000","message":"Argh, my eyes! Trailing whitespace! Argggghhhhh!","commit_id":"b481dd1cbc64455ff382fc04c3d7455cacefa93d"}],"nova/tests/image/test_glance.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"c374780c9e9a468c22ca7d2eb02b087eeaa27739","unresolved":false,"context_lines":[{"line_number":477,"context_line":""},{"line_number":478,"context_line":"            (outfd, s_tmpfname) \u003d tempfile.mkstemp(prefix\u003d\u0027directURLsrc\u0027)"},{"line_number":479,"context_line":"            os.close(outfd)"},{"line_number":480,"context_line":"            outf \u003d open(s_tmpfname, \"w\")"},{"line_number":481,"context_line":"            inf \u003d open(\u0027/dev/urandom\u0027, \u0027r\u0027)"},{"line_number":482,"context_line":"            for i in range(10):"},{"line_number":483,"context_line":"                _data \u003d inf.read(1024)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FgB8%3D","line":480,"updated":"2013-01-18 06:46:23.000000000","message":"Just use outfd rather than closing and re-opening?","commit_id":"b481dd1cbc64455ff382fc04c3d7455cacefa93d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"c374780c9e9a468c22ca7d2eb02b087eeaa27739","unresolved":false,"context_lines":[{"line_number":487,"context_line":"            def get(self, image_id):"},{"line_number":488,"context_line":"                o \u003d type(\u0027GlanceTestDirectUrlMeta\u0027, (object,),"},{"line_number":489,"context_line":"                         {\u0027direct_url\u0027: \u0027file://%s\u0027 % (self.s_tmpfname)})"},{"line_number":490,"context_line":"                return o"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"        client \u003d MyGlanceStubClient()"},{"line_number":493,"context_line":"        (outfd, tmpfname) \u003d tempfile.mkstemp(prefix\u003d\u0027directURLdst\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FgBw%3D","line":490,"updated":"2013-01-18 06:46:23.000000000","message":"Just do\n\n  return type(...)\n\nalso\n\n  \u0027file://\u0027 + self.s_tmpfname\n\nis easier\n\nAlso, we don\u0027t use the type builtin to construct objects anywhere else in Nova so I\u0027m slightly wary of this magic vs\n\n  class GlanceTestDirectUrlMeta(object)\n      direct_url \u003d \u0027file://\u0027 + self.s_tmpfname\n\n50/50 on it though","commit_id":"b481dd1cbc64455ff382fc04c3d7455cacefa93d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"c374780c9e9a468c22ca7d2eb02b087eeaa27739","unresolved":false,"context_lines":[{"line_number":492,"context_line":"        client \u003d MyGlanceStubClient()"},{"line_number":493,"context_line":"        (outfd, tmpfname) \u003d tempfile.mkstemp(prefix\u003d\u0027directURLdst\u0027)"},{"line_number":494,"context_line":"        os.close(outfd)"},{"line_number":495,"context_line":"        writer \u003d open(tmpfname, \"w\")"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        service \u003d self._create_image_service(client)"},{"line_number":498,"context_line":"        image_id \u003d 1  # doesn\u0027t matter"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FgCM%3D","line":495,"updated":"2013-01-18 06:46:23.000000000","message":"Can\u0027t you just use outfd rather than closing and re-opening?","commit_id":"b481dd1cbc64455ff382fc04c3d7455cacefa93d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"c374780c9e9a468c22ca7d2eb02b087eeaa27739","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        service \u003d self._create_image_service(client)"},{"line_number":498,"context_line":"        image_id \u003d 1  # doesn\u0027t matter"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        CONF.allowed_direct_url_schemes \u003d [\u0027file\u0027]"},{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            service.download(self.context, image_id, writer)"},{"line_number":503,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FgDI%3D","line":500,"updated":"2013-01-18 06:46:23.000000000","message":"What you want here is:\n\n  self.config(allowed_direct_url_schemes \u003d [\u0027file\u0027])","commit_id":"b481dd1cbc64455ff382fc04c3d7455cacefa93d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"c374780c9e9a468c22ca7d2eb02b087eeaa27739","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            service.download(self.context, image_id, writer)"},{"line_number":503,"context_line":"        finally:"},{"line_number":504,"context_line":"            CONF.allowed_direct_url_schemes \u003d []"},{"line_number":505,"context_line":"        writer.close()"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        # compare the two files"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FgDE%3D","line":504,"updated":"2013-01-18 06:46:23.000000000","message":"then you don\u0027t need the exception handler since the overrides get cleared in tearDown()","commit_id":"b481dd1cbc64455ff382fc04c3d7455cacefa93d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"2c37ee26bc822aa39fa6fa44b41d502b69b4e524","unresolved":false,"context_lines":[{"line_number":503,"context_line":"        self.assertTrue(rc, \"The file %s and %s should be the same\" %"},{"line_number":504,"context_line":"                        (tmpfname, client.s_tmpfname))"},{"line_number":505,"context_line":"        os.remove(client.s_tmpfname)"},{"line_number":506,"context_line":"        os.remove(tmpfname)"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    def test_client_forbidden_converts_to_imagenotauthed(self):"},{"line_number":509,"context_line":"        class MyGlanceStubClient(glance_stubs.StubGlanceClient):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FdIQ%3D","line":506,"updated":"2013-01-21 22:07:34.000000000","message":"When this test fails, these two files will be left on the filesystem.  You should probably look at some of the available fixtures; I think there\u0027s one for temporary files that can be used, and which ensures that the files are properly cleaned up afterward.","commit_id":"20fca1a2d75c2cd813245200c138df6e854b681b"}]}
