)]}'
{"nova/image/glance.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"a22c44a1aff9b88350e8651c3b32119d93431931","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            image_meta, image_chunks \u003d client.get_image(image_id)"},{"line_number":236,"context_line":"        except glance_exception.NotFound:"},{"line_number":237,"context_line":"            raise exception.ImageNotFound(image_id\u003dimage_id)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        for chunk in image_chunks:"},{"line_number":240,"context_line":"            data.write(chunk)"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7Rk%3D","side":"PARENT","line":238,"updated":"2011-10-21 20:04:52.000000000","message":"This get() could be consolidated to:\n\nnum_retries \u003d FLAGS.glance_num_retries\nif num_retries \u003c 0:\n    num_retries \u003d 0\nfor count in xrange(1 + num_retries):\n    try:\n        .. \u003d self._get_image()\n    except ..NotFound:\n        raise ..ImageNotFound\n    except Exception:\n        if count \u003d\u003d num_retries:\n            raise\n\nGood question about the sleep.  Thing is.. we\u0027d want to sleep under certain conditions, I think, but not all.  But if glance client doesn\u0027t give us detailed info, we can\u0027t tell.  It might be a good idea to sleep for 1 second in here to prevent too much CPU spinning just in case..","commit_id":"75a3fbb21eebd4de8775b63c327d9d57859d090c"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"17f917d4df21fa093566ddb6fcbc66a598fb0fd0","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            image_meta, image_chunks \u003d client.get_image(image_id)"},{"line_number":236,"context_line":"        except glance_exception.NotFound:"},{"line_number":237,"context_line":"            raise exception.ImageNotFound(image_id\u003dimage_id)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        for chunk in image_chunks:"},{"line_number":240,"context_line":"            data.write(chunk)"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7J4%3D","side":"PARENT","line":238,"in_reply_to":"AAAACX%2F%2F7KA%3D","updated":"2011-10-23 18:57:20.000000000","message":"Generally I agree.  This one is kind of tough, if we think about the possibility that we are retrying on a DNS name that might round robin.  If it\u0027s a round robin.. you probably don\u0027t want to delay too much until you make it all of the way through the round robin?  But I think it\u0027d be fine for now.  We might want to make this smarter later.. by pulling DNS resolution to here.  Not sure.","commit_id":"75a3fbb21eebd4de8775b63c327d9d57859d090c"},{"author":{"_account_id":927,"name":"Gabe Westmaas","email":"gabe.westmaas@rackspace.com","username":"westmaas"},"change_message_id":"aa2425de4fa664cfde00853dde82c2f550db71db","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            image_meta, image_chunks \u003d client.get_image(image_id)"},{"line_number":236,"context_line":"        except glance_exception.NotFound:"},{"line_number":237,"context_line":"            raise exception.ImageNotFound(image_id\u003dimage_id)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        for chunk in image_chunks:"},{"line_number":240,"context_line":"            data.write(chunk)"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7KA%3D","side":"PARENT","line":238,"in_reply_to":"AAAACX%2F%2F7Rk%3D","updated":"2011-10-23 18:37:03.000000000","message":"Often a good approach when doing retries is to do an exponential back off with each try.","commit_id":"75a3fbb21eebd4de8775b63c327d9d57859d090c"}],"plugins/xenserver/xenapi/etc/xapi.d/plugins/glance":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"a22c44a1aff9b88350e8651c3b32119d93431931","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            if resp.status \u003c 500:"},{"line_number":91,"context_line":"                break"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    if resp.status !\u003d httplib.OK:"},{"line_number":94,"context_line":"        raise Exception(\"Unexpected response from Glance %i\" % resp.status)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    tar_cmd \u003d \"tar -zx --directory\u003d%(staging_path)s\" % locals()"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F7Rg%3D","line":93,"updated":"2011-10-21 20:04:52.000000000","message":"Could do something similar here too as recommendation in other file... although this one looks a little more clean somehow. :)","commit_id":"e55f46bb9e46c077d7f64cd3df43bdf4eed7ae83"}]}
