)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"35a23048c52fb2662e45d4373272c7bd9b8b8e95","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The exceptions of InvalidAllocationConstrainsViolated and"},{"line_number":10,"context_line":"InvalidAllocationCapacityExceeded has not been captured and"},{"line_number":11,"context_line":"HTTP 500 will raise, this patch catch it and raise HTTP 409"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"As of master 2016-12-12, there are five LOG.warning calls in"},{"line_number":14,"context_line":"nova.objects.resource_provider, all associated in some way"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a6eadb0_de605938","line":11,"updated":"2016-12-13 17:56:20.000000000","message":"It turns out my analysis of a 500 being raised was wrong. The problem was that LOG.exception was being used in a few different places in the placement API, added by: Change-Id: I8dc77408eff79b35845f6b9b5dcea6ed211cc858\n\nNow that we are past newton, we can change these to not be quite so alarming (more in the comments within).","commit_id":"e8a4b1d930cb9993cbdc5af2db4524497e4e97db"}],"nova/api/openstack/placement/handlers/allocation.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"35a23048c52fb2662e45d4373272c7bd9b8b8e95","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        raise webob.exc.HTTPConflict("},{"line_number":271,"context_line":"            _(\u0027Inventory changed while attempting to allocate: %(error)s\u0027) %"},{"line_number":272,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":273,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    req.response.status \u003d 204"},{"line_number":276,"context_line":"    req.response.content_type \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_7ed745bf","side":"PARENT","line":273,"updated":"2016-12-13 17:56:20.000000000","message":"The changes in the following chunk may collide with some of the changes in https://review.openstack.org/#/c/407180/\n\nYou may want to look there and talk to Ed to come up with a strategy.","commit_id":"90f01d5ebb8dc28aed310ddb5564e92704a4b605"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"35a23048c52fb2662e45d4373272c7bd9b8b8e95","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":273,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":274,"context_line":"    except exception.InvalidAllocationConstraintsViolated as exc:"},{"line_number":275,"context_line":"        raise webob.exc.HTTPConflict("},{"line_number":276,"context_line":"            _(\u0027Invalid Allocation Constraints Violated: %(error)s\u0027) %"},{"line_number":277,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":278,"context_line":"            json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_9e9421e3","line":275,"updated":"2016-12-13 17:56:20.000000000","message":"This should probably be  HTTPBadRequest: the provided allocation has a form that violates Inventory constraints, so if the allocation (the request body) changes, it could work.","commit_id":"e8a4b1d930cb9993cbdc5af2db4524497e4e97db"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"7a7710b761ca6555e1c609c4905b5a20edb98ead","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":273,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":274,"context_line":"    except exception.InvalidAllocationConstraintsViolated as exc:"},{"line_number":275,"context_line":"        raise webob.exc.HTTPConflict("},{"line_number":276,"context_line":"            _(\u0027Invalid Allocation Constraints Violated: %(error)s\u0027) %"},{"line_number":277,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":278,"context_line":"            json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_840f742d","line":275,"in_reply_to":"1a6eadb0_9e9421e3","updated":"2016-12-13 18:18:30.000000000","message":"+1 for a 400","commit_id":"e8a4b1d930cb9993cbdc5af2db4524497e4e97db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"35a23048c52fb2662e45d4373272c7bd9b8b8e95","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":278,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":279,"context_line":"    except exception.InvalidAllocationCapacityExceeded as exc:"},{"line_number":280,"context_line":"        raise webob.exc.HTTPConflict("},{"line_number":281,"context_line":"            _(\u0027Invalid Allocation Capacity Excceeded: %(error)s\u0027) %"},{"line_number":282,"context_line":"            {\u0027error\u0027: exc},"},{"line_number":283,"context_line":"            json_formatter\u003dutil.json_error_formatter)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_1eb73187","line":280,"updated":"2016-12-13 17:56:20.000000000","message":"Whereas conflict is correct here because the exception says that though the allocation has correct form, the state of the server is such that it cannot be used.","commit_id":"e8a4b1d930cb9993cbdc5af2db4524497e4e97db"}],"nova/api/openstack/placement/handlers/resource_class.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"7a7710b761ca6555e1c609c4905b5a20edb98ead","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        rc \u003d objects.ResourceClass(context, name\u003ddata[\u0027name\u0027])"},{"line_number":81,"context_line":"        rc.create()"},{"line_number":82,"context_line":"    except exception.ResourceClassExists:"},{"line_number":83,"context_line":"        LOG.warning(_LW(\"Exceeded retry limit on ID generation while \""},{"line_number":84,"context_line":"                        \"creating ResourceClass %(name)s\"),"},{"line_number":85,"context_line":"                    {\u0027name\u0027: data[\u0027name\u0027]})"},{"line_number":86,"context_line":"        raise webob.exc.HTTPConflict("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_615faa41","line":83,"range":{"start_line":83,"start_character":25,"end_line":83,"end_character":62},"updated":"2016-12-13 18:18:30.000000000","message":"This is a misleading message here, since a duplicate name will also raise this exception. It should remain where it is.","commit_id":"e8a4b1d930cb9993cbdc5af2db4524497e4e97db"}],"nova/objects/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"35a23048c52fb2662e45d4373272c7bd9b8b8e95","unresolved":false,"context_lines":[{"line_number":1347,"context_line":"            # limit to be exceeded. We set it high in the hope that we never"},{"line_number":1348,"context_line":"            # hit this point, but added this log message so we know that this"},{"line_number":1349,"context_line":"            # specific situation occurred."},{"line_number":1350,"context_line":"            LOG.warning(_LW(\"Exceeded retry limit on ID generation while \""},{"line_number":1351,"context_line":"                            \"creating ResourceClass %(name)s\"),"},{"line_number":1352,"context_line":"                        {\u0027name\u0027: self.name})"},{"line_number":1353,"context_line":"            raise exception.ResourceClassExists(resource_class\u003dself.name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_5e5fe940","side":"PARENT","line":1350,"updated":"2016-12-13 17:56:20.000000000","message":"this one should stay here because it is specifically about the retry loop, not about the request being made","commit_id":"90f01d5ebb8dc28aed310ddb5564e92704a4b605"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"35a23048c52fb2662e45d4373272c7bd9b8b8e95","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"1a6eadb0_810f662d","updated":"2016-12-13 17:56:20.000000000","message":"The changes discussed in the bug are in the _check_capacity_exceeded method, which we don\u0027t see here. There are two LOG.warning\u0027s in that method that could be moved.","commit_id":"e8a4b1d930cb9993cbdc5af2db4524497e4e97db"}]}
