)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1773,"name":"oliver-leahy-l","email":"oliver.leahy@hpe.com","username":"oliver-leahy-l"},"change_message_id":"24f8725ada57e3f7c138c19c856705a9e2a517a4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Refactor reschedule in exception handling of volume manager"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some cases, exception is caught in volume manager but the"},{"line_number":10,"context_line":"recode cannot be retrieved by sys.exc_info(). This patch attempts"},{"line_number":11,"context_line":"to refactor some part of exception handling in create_volume(), as"},{"line_number":12,"context_line":"well as the reschedule_and_reraise() funtion, so that above corner"},{"line_number":13,"context_line":"case is handled."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAPn%2F%2FRQA%3D","line":10,"updated":"2013-07-05 16:20:14.000000000","message":"did you intend \u0027return code\u0027 or recode?","commit_id":"6e0a012e56cbb26196ccbae8b78245f1d8e60509"}],"cinder/volume/manager.py":[{"author":{"_account_id":2481,"name":"Rongze Zhu","email":"zrzhit@gmail.com","username":"zrzhit"},"change_message_id":"df28ff2cc5986c62da06eef758007c76c383a2dd","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                      {\u0027status\u0027: \u0027error\u0027})"},{"line_number":272,"context_line":"                return"},{"line_number":273,"context_line":"            except Exception:"},{"line_number":274,"context_line":"                # restore source volume status before reschedule"},{"line_number":275,"context_line":"                # FIXME(zhiteng) do all the clean-up before reschedule"},{"line_number":276,"context_line":"                if sourcevol_ref is not None:"},{"line_number":277,"context_line":"                    self.db.volume_update(context, sourcevol_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FRoQ%3D","line":274,"updated":"2013-07-05 12:41:13.000000000","message":"self.db.volume_update() will clear exc_info, so sys.exc_info() return  a tuple containing three None. \n\nwe can catch the Exception and reraise the Excetion at the end.\n\n...\nexcept Exception as ex:\n    ...\n    if rescheduler:\n        ...\n    else:\n        raise ex","commit_id":"6e0a012e56cbb26196ccbae8b78245f1d8e60509"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"a44811a48b7bbd7bf6999b53683d1d1d88d516d0","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                      {\u0027status\u0027: \u0027error\u0027})"},{"line_number":272,"context_line":"                return"},{"line_number":273,"context_line":"            except Exception:"},{"line_number":274,"context_line":"                # restore source volume status before reschedule"},{"line_number":275,"context_line":"                # FIXME(zhiteng) do all the clean-up before reschedule"},{"line_number":276,"context_line":"                if sourcevol_ref is not None:"},{"line_number":277,"context_line":"                    self.db.volume_update(context, sourcevol_ref[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FQ%2Bw%3D","line":274,"in_reply_to":"AAAAPn%2F%2FRoQ%3D","updated":"2013-07-05 17:44:42.000000000","message":"Done","commit_id":"6e0a012e56cbb26196ccbae8b78245f1d8e60509"},{"author":{"_account_id":1773,"name":"oliver-leahy-l","email":"oliver.leahy@hpe.com","username":"oliver-leahy-l"},"change_message_id":"24f8725ada57e3f7c138c19c856705a9e2a517a4","unresolved":false,"context_lines":[{"line_number":276,"context_line":"                if sourcevol_ref is not None:"},{"line_number":277,"context_line":"                    self.db.volume_update(context, sourcevol_ref[\u0027id\u0027],"},{"line_number":278,"context_line":"                                          {\u0027status\u0027: sourcevol_ref[\u0027status\u0027]})"},{"line_number":279,"context_line":"                exc_info \u003d sys.exc_info()"},{"line_number":280,"context_line":"                rescheduled \u003d False"},{"line_number":281,"context_line":"                # try to re-schedule volume:"},{"line_number":282,"context_line":"                if allow_reschedule:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FRI8%3D","line":279,"updated":"2013-07-05 16:20:14.000000000","message":"I also bumped into the problem Rongze Zhu\tdescribed, you could solve it by saving the exception info before calling self.db.volum_update(). That is by moving the line\n\nexc_info \u003d sys.exc_info()\n\nto line 275","commit_id":"6e0a012e56cbb26196ccbae8b78245f1d8e60509"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"a44811a48b7bbd7bf6999b53683d1d1d88d516d0","unresolved":false,"context_lines":[{"line_number":276,"context_line":"                if sourcevol_ref is not None:"},{"line_number":277,"context_line":"                    self.db.volume_update(context, sourcevol_ref[\u0027id\u0027],"},{"line_number":278,"context_line":"                                          {\u0027status\u0027: sourcevol_ref[\u0027status\u0027]})"},{"line_number":279,"context_line":"                exc_info \u003d sys.exc_info()"},{"line_number":280,"context_line":"                rescheduled \u003d False"},{"line_number":281,"context_line":"                # try to re-schedule volume:"},{"line_number":282,"context_line":"                if allow_reschedule:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FQ%2B0%3D","line":279,"in_reply_to":"AAAAPn%2F%2FRI8%3D","updated":"2013-07-05 17:44:42.000000000","message":"Done","commit_id":"6e0a012e56cbb26196ccbae8b78245f1d8e60509"}]}
