← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1593402] [NEW] Neutron returns 500 when creating a segment with non-existent network id

 

Public bug reported:

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.

** Affects: neutron
     Importance: Medium
     Assignee: Miguel Lavalle (minsel)
         Status: New


** Tags: l3-ipam-dhcp

** Changed in: neutron
     Assignee: (unassigned) => Miguel Lavalle (minsel)

** Changed in: neutron
   Importance: Undecided => Medium

** Tags added: l3-ipam-dhcp

-- 
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:
  New

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


Follow ups