yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #54187
[Bug 1593402] Re: Neutron returns 500 when creating a segment with non-existent network id
Reviewed: https://review.openstack.org/336734
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=056b9ca677d5bacbc1ef01eefbef7bd947cd0cae
Submitter: Jenkins
Branch: master
commit 056b9ca677d5bacbc1ef01eefbef7bd947cd0cae
Author: Miguel Lavalle <malavall@xxxxxxxxxx>
Date: Fri Jul 1 17:39:35 2016 -0500
Handle non existing network in segment creation
Add to the segments plugin the handling of a non existing
network when creating a segment.
Change-Id: I65082d3a5076e89ef53b4adb8813c34a314186b2
Closes-Bug: #1593402
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1593402
Title:
Neutron returns 500 when creating a segment with non-existent network
id
Status in neutron:
Fix Released
Bug description:
When creating a segment with the id of a network that doesn't exist,
Neutron server returns 500 instead of failing gracefully and returning
400.
To reproduce, send a POST /segments request with a body similar to
this:
{
"segment": {
"network_id": "c11b9c66-d2d7-4986-877e-042e62684bfb",
"physical_network": "physnet2",
"network_type": "vlan",
"segmentation_id": 2016
}
}
The network_id should not exist. Instead of returning a 400, the
server returns:
500 Internal Server Error
{
"NeutronError": {
"message": "Request Failed: internal server error while processing your request.",
"type": "HTTPInternalServerError",
"detail": ""
}
}
And the following traceback goes to the Neutron server log:
http://paste.openstack.org/show/516722/. Note the foreign key
violation at the end of the traceback.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1593402/+subscriptions
References