)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c6e05b6352bc9afde7752d43cc744037028b1a1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add Forbidden to caught cinder exceptions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In the generic Cinder wrapper that decorates all Cinder API calls, this"},{"line_number":10,"context_line":"add Forbidden to the list of exceptions to translate. So now instead of"},{"line_number":11,"context_line":"Nova returning a 500 when a call to Cinder was Forbidden, it will now"},{"line_number":12,"context_line":"appropriately return a 403."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I5b893f5dae181d8e0a5539e064255225fd2a39a8"},{"line_number":15,"context_line":"Partial-Bug: #1554631"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_f33ebd26","line":12,"range":{"start_line":10,"start_character":54,"end_line":12,"end_character":27},"updated":"2016-03-09 16:08:47.000000000","message":"You\u0027re assuming that the REST API is handling the Forbidden exception and returning a 403, which it\u0027s not in some obvious cases like volume.create:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/volumes.py#L186-L189","commit_id":"1a9101895f73c6d66fd5e664d57db303fea62ded"}],"nova/volume/cinder.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c6e05b6352bc9afde7752d43cc744037028b1a1","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        except (keystone_exception.Forbidden,"},{"line_number":246,"context_line":"                cinder_exception.Forbidden):"},{"line_number":247,"context_line":"            exc_type, exc_value, exc_trace \u003d sys.exc_info()"},{"line_number":248,"context_line":"            exc_value \u003d exception.Forbidden(reason\u003dsix.text_type(exc_value))"},{"line_number":249,"context_line":"            six.reraise(exc_value, None, exc_trace)"},{"line_number":250,"context_line":"        return res"},{"line_number":251,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_3372e549","line":248,"range":{"start_line":248,"start_character":44,"end_line":248,"end_character":50},"updated":"2016-03-09 16:08:47.000000000","message":"There is no \u0027reason\u0027 kwarg on this exception:\n\nhttps://github.com/openstack/nova/blob/master/nova/exception.py#L199\n\nSo I think you need to just pass in six.text_type(exc_value) as the message arg, i.e.:\n\nhttps://github.com/openstack/nova/blob/master/nova/exception.py#L129","commit_id":"1a9101895f73c6d66fd5e664d57db303fea62ded"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42c56a4c432956cc587ad3ca0a4798e75b22f177","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        except (keystone_exception.Forbidden,"},{"line_number":246,"context_line":"                cinder_exception.Forbidden):"},{"line_number":247,"context_line":"            exc_type, exc_value, exc_trace \u003d sys.exc_info()"},{"line_number":248,"context_line":"            exc_value \u003d exception.Forbidden(reason\u003dsix.text_type(exc_value))"},{"line_number":249,"context_line":"            six.reraise(exc_value, None, exc_trace)"},{"line_number":250,"context_line":"        return res"},{"line_number":251,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_ee71b077","line":248,"range":{"start_line":248,"start_character":44,"end_line":248,"end_character":50},"in_reply_to":"5aef4532_3372e549","updated":"2016-03-09 16:16:08.000000000","message":"What\u0027s troubling to me is this didn\u0027t fail, CONF.fatal_exception_format_errors is set to True in the tests, so that should have reraised a formatting error. Does the wrapper swallow it?","commit_id":"1a9101895f73c6d66fd5e664d57db303fea62ded"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cfe04286a0433c12fc9bbfd69b47170a72fb3c41","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        except (keystone_exception.Forbidden,"},{"line_number":246,"context_line":"                cinder_exception.Forbidden):"},{"line_number":247,"context_line":"            exc_type, exc_value, exc_trace \u003d sys.exc_info()"},{"line_number":248,"context_line":"            exc_value \u003d exception.Forbidden(reason\u003dsix.text_type(exc_value))"},{"line_number":249,"context_line":"            six.reraise(exc_value, None, exc_trace)"},{"line_number":250,"context_line":"        return res"},{"line_number":251,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_71b46434","line":248,"range":{"start_line":248,"start_character":44,"end_line":248,"end_character":50},"in_reply_to":"5aef4532_ee71b077","updated":"2016-03-09 16:38:14.000000000","message":"I guess this is normal, as long as the message doesn\u0027t have subs in it, it doesn\u0027t matter what\u0027s in kwargs:\n\nhttps://gist.github.com/mriedem/4f6ea2e61ea82d6ade6f\n\nBut if the message does have subs, and you pass the wrong kwargs, then things break.","commit_id":"1a9101895f73c6d66fd5e664d57db303fea62ded"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"23b781438704a6cb1333da52683ce273d3e3648e","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        except (keystone_exception.Forbidden,"},{"line_number":246,"context_line":"                cinder_exception.Forbidden):"},{"line_number":247,"context_line":"            exc_type, exc_value, exc_trace \u003d sys.exc_info()"},{"line_number":248,"context_line":"            exc_value \u003d exception.Forbidden(message\u003dsix.text_type(exc_value))"},{"line_number":249,"context_line":"            six.reraise(exc_value, None, exc_trace)"},{"line_number":250,"context_line":"        return res"},{"line_number":251,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_d2c0bb52","line":248,"range":{"start_line":248,"start_character":44,"end_line":248,"end_character":51},"updated":"2016-03-10 02:31:20.000000000","message":"nit: you don\u0027t even need the message kwarg here, it\u0027s probably better to omit that and just pass the message as an arg, but I won\u0027t block on it. If you respin this, I\u0027d probably drop that part.","commit_id":"4618a113660357c2619835528f48c05589238b3e"}]}
