)]}'
{"cinder/api/contrib/snapshot_actions.py":[{"author":{"_account_id":6094,"name":"Navneet Singh","email":"navsinghnitd@gmail.com","username":"singn"},"change_message_id":"54a7abe56915b1a5e19f2ff48144b9ea37b844f4","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                p_int \u003d int(progress_str[:-1])"},{"line_number":85,"context_line":"            except ValueError:"},{"line_number":86,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":87,"context_line":"            if p_int \u003c 0 or p_int \u003e 100 or progress_str[-1] !\u003d \u0027%\u0027:"},{"line_number":88,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            return p_int"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2FgfE%3D","line":87,"updated":"2014-02-26 08:25:27.000000000","message":"The check progress_str[-1] !\u003d \u0027%\u0027 makes more sense before the try block.","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"d3e43296e911ba5325c298440164620bb9f0aa31","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            current_progress \u003d current_snapshot[\u0027progress\u0027]"},{"line_number":101,"context_line":"            progress \u003d progress_int(current_progress)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            if progress \u003e\u003d 80:"},{"line_number":104,"context_line":"                # We are running out of iterations, but Nova is still"},{"line_number":105,"context_line":"                # sending updates. Reset progress to keep things running."},{"line_number":106,"context_line":"                progress \u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2FCqA%3D","line":103,"updated":"2014-02-17 13:57:58.000000000","message":"I don\u0027t understand the logic in this if statement.  Why does progress of over 80% mean that we are running out of iterations?  And why is this awkward code that is glusterfs-specific in api?  It would be nice if all this generic snapshot code was implemented in the generic filesystem driver...","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4e033903b9176ec93dd3eae0f5dfb79792d8cb24","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            current_progress \u003d current_snapshot[\u0027progress\u0027]"},{"line_number":101,"context_line":"            progress \u003d progress_int(current_progress)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            if progress \u003e\u003d 80:"},{"line_number":104,"context_line":"                # We are running out of iterations, but Nova is still"},{"line_number":105,"context_line":"                # sending updates. Reset progress to keep things running."},{"line_number":106,"context_line":"                progress \u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2FBHU%3D","line":103,"in_reply_to":"AAAAUX%2F%2FCqA%3D","updated":"2014-02-17 16:26:42.000000000","message":"This is because currently, the progress field is the only mechanism that this layer can use to tell the driver that Nova is still alive and working.  (Until I introduce more states, see other comment.)  The main point here is that due to the API design, if we let progress hit \u002790%\u0027, the driver would believe Nova was finished.  (See other comment.)  \"80\" is basically arbitrary otherwise.\n\nThis is not GlusterFS-specific.  Any driver that wants to leverage Nova to do snapshots can use this interface.  (This is why we introduced it as snapshot_actions.)  There are reasons that non-filesystem based drivers would be interested in this capability at some point, but that\u0027s a whole different design discussion.","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"}],"cinder/volume/drivers/glusterfs.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ba42b1c209c879cc0bab5f09c43cd34d5ff243ef","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                        break"},{"line_number":428,"context_line":"                    else:"},{"line_number":429,"context_line":"                        msg \u003d _(\u0027status of snapshot %s is \u0027"},{"line_number":430,"context_line":"                                \u0027still \"creating\"... waiting\u0027) % snapshot[\u0027id\u0027]"},{"line_number":431,"context_line":"                        LOG.debug(msg)"},{"line_number":432,"context_line":"                        time.sleep(increment)"},{"line_number":433,"context_line":"                        seconds_elapsed +\u003d increment"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F97OM%3D","line":430,"updated":"2014-02-01 00:53:37.000000000","message":"Recommend ending this with a \u0027.\u0027 .","commit_id":"c83dcf218f3d98e56fd1c81af6fbe5c60d5302d9"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"ba42b1c209c879cc0bab5f09c43cd34d5ff243ef","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    \u0027status\u0027: s[\u0027status\u0027]"},{"line_number":443,"context_line":"                })"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"                if increment \u003c 10:"},{"line_number":446,"context_line":"                    if 10 \u003c seconds_elapsed \u003c\u003d 20:"},{"line_number":447,"context_line":"                        increment \u003d 2"},{"line_number":448,"context_line":"                    elif 20 \u003c seconds_elapsed \u003c\u003d 60:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F97Ns%3D","line":445,"updated":"2014-02-01 00:53:37.000000000","message":"I don\u0027t understand something here:  I don\u0027t see that increment can ever be anything other than 1.  It is hard coded above.","commit_id":"c83dcf218f3d98e56fd1c81af6fbe5c60d5302d9"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"c439e5ba4f4feccf0eb1bc38b6f0becad4e34264","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    \u0027status\u0027: s[\u0027status\u0027]"},{"line_number":443,"context_line":"                })"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"                if increment \u003c 10:"},{"line_number":446,"context_line":"                    if 10 \u003c seconds_elapsed \u003c\u003d 20:"},{"line_number":447,"context_line":"                        increment \u003d 2"},{"line_number":448,"context_line":"                    elif 20 \u003c seconds_elapsed \u003c\u003d 60:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F90gI%3D","line":445,"in_reply_to":"AAAAUH%2F97Ns%3D","updated":"2014-02-03 16:39:21.000000000","message":"Only before the loop starts.","commit_id":"c83dcf218f3d98e56fd1c81af6fbe5c60d5302d9"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"f809928030bf08118da59b47d7b5082ba98ed9f3","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                s \u003d db.snapshot_get(context, snapshot[\u0027id\u0027])"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"                if s[\u0027progress\u0027] !\u003d last_progress:"},{"line_number":420,"context_line":"                    # Recieved an update from Nova, reset timeout window"},{"line_number":421,"context_line":"                    last_update \u003d s[\u0027progress\u0027]"},{"line_number":422,"context_line":"                    seconds_elapsed \u003d 0"},{"line_number":423,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2F%2BMc%3D","line":420,"updated":"2014-02-08 03:59:59.000000000","message":"sp error","commit_id":"e01c5bef7b2b3352853b1014aff9b28bfc16b0c2"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"006852c99b12737da96d4a21e5adcce006380877","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                s \u003d db.snapshot_get(context, snapshot[\u0027id\u0027])"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"                if s[\u0027progress\u0027] !\u003d last_progress:"},{"line_number":420,"context_line":"                    # Recieved an update from Nova, reset timeout window"},{"line_number":421,"context_line":"                    last_update \u003d s[\u0027progress\u0027]"},{"line_number":422,"context_line":"                    seconds_elapsed \u003d 0"},{"line_number":423,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FORg%3D","line":420,"in_reply_to":"AAAAUX%2F%2F%2BMc%3D","updated":"2014-02-14 18:40:28.000000000","message":"Oh my ... I think I reviewed this on a day where I was really fighting a cold.  ;-)","commit_id":"e01c5bef7b2b3352853b1014aff9b28bfc16b0c2"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"f809928030bf08118da59b47d7b5082ba98ed9f3","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    \u0027status\u0027: s[\u0027status\u0027]"},{"line_number":443,"context_line":"                })"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"                if increment \u003c 10:"},{"line_number":446,"context_line":"                    if 10 \u003c seconds_elapsed \u003c\u003d 20:"},{"line_number":447,"context_line":"                        increment \u003d 2"},{"line_number":448,"context_line":"                    elif 20 \u003c seconds_elapsed \u003c\u003d 60:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2F%2BLc%3D","line":445,"updated":"2014-02-08 03:59:59.000000000","message":"Could we clean this up by usig a scaling factor for the increment?\n\nMaybe a modification of the pattern we use for scaled sleep periods?  (https://github.com/openstack/cinder/blob/master/cinder/volume/manager.py#L881)","commit_id":"e01c5bef7b2b3352853b1014aff9b28bfc16b0c2"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"d641db4574b9ec2d41250e3cb937343a9142134c","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    \u0027status\u0027: s[\u0027status\u0027]"},{"line_number":443,"context_line":"                })"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"                if increment \u003c 10:"},{"line_number":446,"context_line":"                    if 10 \u003c seconds_elapsed \u003c\u003d 20:"},{"line_number":447,"context_line":"                        increment \u003d 2"},{"line_number":448,"context_line":"                    elif 20 \u003c seconds_elapsed \u003c\u003d 60:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FOS8%3D","line":445,"in_reply_to":"AAAAUX%2F%2F%2BLc%3D","updated":"2014-02-14 21:13:03.000000000","message":"I did this, and also moved things around a bit to reduce duplicated code and clean up tests.  Which kind of resulted in a huge patch... but it\u0027s cleaner.  :)","commit_id":"e01c5bef7b2b3352853b1014aff9b28bfc16b0c2"},{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"d3e43296e911ba5325c298440164620bb9f0aa31","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"                seconds_elapsed \u003d 0"},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"            if s[\u0027status\u0027] \u003d\u003d start_state:"},{"line_number":1146,"context_line":"                if s[\u0027progress\u0027] \u003d\u003d \u002790%\u0027:"},{"line_number":1147,"context_line":"                    # Nova tasks completed successfully"},{"line_number":1148,"context_line":"                    break"},{"line_number":1149,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2FCqo%3D","line":1146,"updated":"2014-02-17 13:57:58.000000000","message":"Why 90%?  Will it ever go higher?  Should this be \u003e\u003d?","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"4e033903b9176ec93dd3eae0f5dfb79792d8cb24","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"                seconds_elapsed \u003d 0"},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"            if s[\u0027status\u0027] \u003d\u003d start_state:"},{"line_number":1146,"context_line":"                if s[\u0027progress\u0027] \u003d\u003d \u002790%\u0027:"},{"line_number":1147,"context_line":"                    # Nova tasks completed successfully"},{"line_number":1148,"context_line":"                    break"},{"line_number":1149,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUX%2F%2FBLU%3D","line":1146,"in_reply_to":"AAAAUX%2F%2FCqo%3D","updated":"2014-02-17 16:26:42.000000000","message":"This is an artifact of how the assisted snapshots API works at present.  (It is, granted, kind of crazy.)\n\nIt doesn\u0027t use progress in a meaningful manner, but rather as a signal that Nova is done and handing control back to Cinder.  \u002790%\u0027 is the indicator for this.\n\nThis will be reworked at some point when I can introduce more sensible state transitions for this process like \u0027creating\u0027 -\u003e \u0027creating and Nova is currently processing this operation\u0027 -\u003e \u0027creating and Nova has handed control back to Cinder\u0027 -\u003e \u0027available\u0027.","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"},{"author":{"_account_id":6094,"name":"Navneet Singh","email":"navsinghnitd@gmail.com","username":"singn"},"change_message_id":"54a7abe56915b1a5e19f2ff48144b9ea37b844f4","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"                    LOG.debug(msg)"},{"line_number":1154,"context_line":""},{"line_number":1155,"context_line":"                    # Will hit 60s in 23 tries"},{"line_number":1156,"context_line":"                    sleep_time +\u003d min(int(tries * 0.25), 60)"},{"line_number":1157,"context_line":"                    time.sleep(sleep_time)"},{"line_number":1158,"context_line":"                    seconds_elapsed +\u003d sleep_time"},{"line_number":1159,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2Fgkc%3D","line":1156,"updated":"2014-02-26 08:25:27.000000000","message":"why not sleep for a constant interval every time? How does sleep_time calculations help things on the nova side rather than just saving some interrupts? It would seem more logical to associate sleep_time with s[\u0027progress\u0027].","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"af7d2ffa24b2c86df752b80a8cfbd6da8992c4e2","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"                    LOG.debug(msg)"},{"line_number":1154,"context_line":""},{"line_number":1155,"context_line":"                    # Will hit 60s in 23 tries"},{"line_number":1156,"context_line":"                    sleep_time +\u003d min(int(tries * 0.25), 60)"},{"line_number":1157,"context_line":"                    time.sleep(sleep_time)"},{"line_number":1158,"context_line":"                    seconds_elapsed +\u003d sleep_time"},{"line_number":1159,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2FcV0%3D","line":1156,"in_reply_to":"AAAAU3%2F%2Fgkc%3D","updated":"2014-02-26 16:03:25.000000000","message":"It doesn\u0027t help things on the Nova side -- the goal is just to keep from hammering the database more than necessary while also remaining fairly responsive.  This backoff algorithm was suggested by jgriffith in a prior patchset.","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"},{"author":{"_account_id":6094,"name":"Navneet Singh","email":"navsinghnitd@gmail.com","username":"singn"},"change_message_id":"54a7abe56915b1a5e19f2ff48144b9ea37b844f4","unresolved":false,"context_lines":[{"line_number":1156,"context_line":"                    sleep_time +\u003d min(int(tries * 0.25), 60)"},{"line_number":1157,"context_line":"                    time.sleep(sleep_time)"},{"line_number":1158,"context_line":"                    seconds_elapsed +\u003d sleep_time"},{"line_number":1159,"context_line":"            else:"},{"line_number":1160,"context_line":"                msg \u003d _(\u0027Unable to complete operation on snapshot %(id)s: \u0027"},{"line_number":1161,"context_line":"                        \u0027initial state: %(start)s; \u0027"},{"line_number":1162,"context_line":"                        \u0027ending state: %(status)s.\u0027) % {\u0027id\u0027: snapshot_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2Fgg0%3D","line":1159,"updated":"2014-02-26 08:25:27.000000000","message":"Is status other than start_state always a failure? Does this also indicate success?","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"af7d2ffa24b2c86df752b80a8cfbd6da8992c4e2","unresolved":false,"context_lines":[{"line_number":1156,"context_line":"                    sleep_time +\u003d min(int(tries * 0.25), 60)"},{"line_number":1157,"context_line":"                    time.sleep(sleep_time)"},{"line_number":1158,"context_line":"                    seconds_elapsed +\u003d sleep_time"},{"line_number":1159,"context_line":"            else:"},{"line_number":1160,"context_line":"                msg \u003d _(\u0027Unable to complete operation on snapshot %(id)s: \u0027"},{"line_number":1161,"context_line":"                        \u0027initial state: %(start)s; \u0027"},{"line_number":1162,"context_line":"                        \u0027ending state: %(status)s.\u0027) % {\u0027id\u0027: snapshot_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2FcVM%3D","line":1159,"in_reply_to":"AAAAU3%2F%2Fgg0%3D","updated":"2014-02-26 16:03:25.000000000","message":"Yes -- in the successful case the operation completes leaving the state as the start_state and Cinder updates that status after that.","commit_id":"cf8d58e136495a06ff6286a07788e6270713a09b"}]}
