)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1b969fb4207b78f6fa307c0a085a9d6d00d7ca43","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If I create a flavor but failed to operate on db layer,"},{"line_number":10,"context_line":"a FlavorCreateFailed exception will be raised but"},{"line_number":11,"context_line":"nova-api didn\u0027t handle it well."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1292309"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_fd4a3a54","line":11,"updated":"2014-05-30 03:50:09.000000000","message":"If an error happens on DB layer, a client cannot do anything for avoiding it. That would be a matter of OpenStack service provider.\n\nso I\u0027m not sure the value of changing current behavior and v3 expected_errors() should include http500.\n\nBasically, current expected_errors()\u0027s contain \"expected errors\" as the name but DB error is not expected now. This addition is different from the exiting ones.","commit_id":"cb8be95fd273087c01b1b9a7a9d06eb0c7de23b7"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"ac68cf32a02e1ffbedbcaa7f08c3e042dcb8f521","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If I create a flavor but failed to operate on db layer,"},{"line_number":10,"context_line":"a FlavorCreateFailed exception will be raised but"},{"line_number":11,"context_line":"nova-api didn\u0027t handle it well."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1292309"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_ab082c92","line":11,"in_reply_to":"1ae5cdf2_fd4a3a54","updated":"2014-06-02 07:41:02.000000000","message":"So I think we need to catch FlavorCreateFailed exception because otherwise the expected_errors decorator will ask the API user to lodge a nova bug report. And its most likely not an Nova bug, but a cloud provider issue. In this case I think we do want to just return a descriptive 500 error and we do have other cases where we explicitly say we expects 501s etc. Although we know from the internals code it currently only occurs from a db error, its named generically enough it could be in the future from other causes.\n\nMaybe could rework the commit message bit though:\n\nCatch FlavorCreateFailed exceptions which when flavor creation fails. This type of flavor creation failure is caused by an internal nova problem. Return an internal server error (500) to the user so they know to contact their cloud provider.","commit_id":"cb8be95fd273087c01b1b9a7a9d06eb0c7de23b7"},{"author":{"_account_id":10614,"name":"Alex Frolov","email":"afrolov@mirantis.com","username":"afrolov"},"change_message_id":"3dc30bc37d56ef6e700ee6a86ac773598dad66cb","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Catch FlavorCreateFailed exceptions which when flavor creation fails."},{"line_number":10,"context_line":"This type of flavor creation failure is caused by an internal nova problem."},{"line_number":11,"context_line":"Return an internal server error (500) to the user so they know"},{"line_number":12,"context_line":"to contact their cloud provider."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1292309"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"baada198_e046fd22","line":11,"updated":"2014-07-01 07:52:30.000000000","message":"Minor mistakes in the sentence, it\u0027s better to write \"... so they understand that they should contact their cloud provider\".","commit_id":"789efa80205d1040adfb95e81f6a17ed3afd4d03"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"12102c3f8481094159d095f19f991ab2d0d49262","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Catch FlavorCreateFailed exceptions which when flavor creation fails."},{"line_number":10,"context_line":"This type of flavor creation failure is caused by an internal nova problem."},{"line_number":11,"context_line":"Return an internal server error (500) to the user so they know"},{"line_number":12,"context_line":"to contact their cloud provider."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1292309"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"baada198_d82a747d","line":11,"in_reply_to":"baada198_e046fd22","updated":"2014-07-03 07:03:28.000000000","message":"Done","commit_id":"789efa80205d1040adfb95e81f6a17ed3afd4d03"}],"nova/api/openstack/compute/contrib/flavormanage.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"b944b2114d271cac6367352259479687097eaf08","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":80,"context_line":"        except exception.FlavorCreateFailed:"},{"line_number":81,"context_line":"            msg \u003d _(\"Flavor creation failed\")"},{"line_number":82,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        return self._view_builder.show(req, flavor)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_4c261fbb","line":82,"updated":"2014-08-05 10:39:31.000000000","message":"Probably better just do do:\n\nexcept exception.FlavorCreateFailed as exc:\n  raise webob.exc.HTTPInternalServerError(explanation\u003dexc,format_message())","commit_id":"208ae19043b8002d6ad8d5bcb59298951580ba87"}],"nova/api/openstack/compute/plugins/v3/flavor_manage.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f3a2e7c08c813406adc72f97226dd4586f81131a","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                exception.FlavorIdExists) as err:"},{"line_number":84,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003derr.format_message())"},{"line_number":85,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":86,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":87,"context_line":"        except exception.FlavorCreateFailed:"},{"line_number":88,"context_line":"            msg \u003d _(\"Flavor creation failed\")"},{"line_number":89,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_ee369251","line":86,"updated":"2014-07-03 08:26:30.000000000","message":"looks like catching InvalidInput is not the scope of this patch","commit_id":"b89bc9ba7b64c9b3bca3a2f2642de8fe95029da2"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d058aebec5d37baf671491b8cf7fc7bf48148de6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                exception.FlavorIdExists) as err:"},{"line_number":84,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003derr.format_message())"},{"line_number":85,"context_line":"        except exception.InvalidInput as exc:"},{"line_number":86,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":87,"context_line":"        except exception.FlavorCreateFailed:"},{"line_number":88,"context_line":"            msg \u003d _(\"Flavor creation failed\")"},{"line_number":89,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7c4dfc98","line":86,"in_reply_to":"baada198_ee369251","updated":"2014-07-10 12:03:06.000000000","message":"Done","commit_id":"b89bc9ba7b64c9b3bca3a2f2642de8fe95029da2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f3a2e7c08c813406adc72f97226dd4586f81131a","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":87,"context_line":"        except exception.FlavorCreateFailed:"},{"line_number":88,"context_line":"            msg \u003d _(\"Flavor creation failed\")"},{"line_number":89,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        return self._view_builder.show(req, flavor)"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4e221e02","line":89,"updated":"2014-07-03 08:26:30.000000000","message":"A little confuse is it the db error is our expected? if it isn\u0027t expected, that means there may be a bug at here. We shouldn\u0027t catch it, just let it raise, and then decorator expected_error will catch it.","commit_id":"b89bc9ba7b64c9b3bca3a2f2642de8fe95029da2"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d058aebec5d37baf671491b8cf7fc7bf48148de6","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexc.format_message())"},{"line_number":87,"context_line":"        except exception.FlavorCreateFailed:"},{"line_number":88,"context_line":"            msg \u003d _(\"Flavor creation failed\")"},{"line_number":89,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        return self._view_builder.show(req, flavor)"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_b9a886dc","line":89,"in_reply_to":"baada198_4e221e02","updated":"2014-07-10 12:03:06.000000000","message":"it\u0027s expected, it might be raised by db layer\ncatch and report it to give more info about the error ..","commit_id":"b89bc9ba7b64c9b3bca3a2f2642de8fe95029da2"}],"nova/tests/api/openstack/compute/contrib/test_flavor_manage.py":[{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"1de75b7f78f3ed4a04a40d3ba4e8430f719ac697","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        req.method \u003d \u0027POST\u0027"},{"line_number":450,"context_line":"        req.body \u003d jsonutils.dumps(request_dict)"},{"line_number":451,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":452,"context_line":"        self.assertEqual(res.status_int, 500)"},{"line_number":453,"context_line":"        self.assertIn(\u0027Flavor creation failed\u0027, res.body)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def test_invalid_memory_mb(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_89ce582c","line":452,"updated":"2014-06-23 13:24:50.000000000","message":"self.assertEqual has signature \n\n assertEqual(expected, actual)\n\nso it\u0027s better to use \n\n self.assertEqual(500, res.status_int)","commit_id":"789efa80205d1040adfb95e81f6a17ed3afd4d03"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"12102c3f8481094159d095f19f991ab2d0d49262","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        req.method \u003d \u0027POST\u0027"},{"line_number":450,"context_line":"        req.body \u003d jsonutils.dumps(request_dict)"},{"line_number":451,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":452,"context_line":"        self.assertEqual(res.status_int, 500)"},{"line_number":453,"context_line":"        self.assertIn(\u0027Flavor creation failed\u0027, res.body)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def test_invalid_memory_mb(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_55f46d86","line":452,"in_reply_to":"1ae5cdf2_89ce582c","updated":"2014-07-03 07:03:28.000000000","message":"Done","commit_id":"789efa80205d1040adfb95e81f6a17ed3afd4d03"}],"nova/tests/api/openstack/compute/plugins/v3/test_flavor_manage.py":[{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"1de75b7f78f3ed4a04a40d3ba4e8430f719ac697","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        req.method \u003d \u0027POST\u0027"},{"line_number":237,"context_line":"        req.body \u003d jsonutils.dumps(request_dict)"},{"line_number":238,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":239,"context_line":"        self.assertEqual(res.status_int, 500)"},{"line_number":240,"context_line":"        self.assertIn(\u0027Flavor creation failed\u0027, res.body)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def test_all_whitespace_flavor_names_are_rejected(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_09e248a0","line":239,"updated":"2014-06-23 13:24:50.000000000","message":"same","commit_id":"789efa80205d1040adfb95e81f6a17ed3afd4d03"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"12102c3f8481094159d095f19f991ab2d0d49262","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        req.method \u003d \u0027POST\u0027"},{"line_number":237,"context_line":"        req.body \u003d jsonutils.dumps(request_dict)"},{"line_number":238,"context_line":"        res \u003d req.get_response(self.app)"},{"line_number":239,"context_line":"        self.assertEqual(res.status_int, 500)"},{"line_number":240,"context_line":"        self.assertIn(\u0027Flavor creation failed\u0027, res.body)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def test_all_whitespace_flavor_names_are_rejected(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_75f3319e","line":239,"in_reply_to":"1ae5cdf2_09e248a0","updated":"2014-07-03 07:03:28.000000000","message":"Done","commit_id":"789efa80205d1040adfb95e81f6a17ed3afd4d03"}]}
