Neutron-LBaaS v2: Specifying a large connection limit throws 500 on update listener
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Expired
|
Low
|
Unassigned |
Bug Description
1. Create a lb.
2. Create a listener.
3. Update the listener with a large connection limit, e.g. 9999999999
Result: 500 from the server is returned
Expected: Should return with 400 HTTPBadRequest similar to when specifying a connection limit less than -1
(ex: "NeutronError": {"message": "Invalid input for connection_limit. Reason: '-100' is not a valid value, because it cannot be less than -1.", "type": "HTTPBadRequest", "detail": ""}})
Logs:
neutron_
-------
Captured pythonlogging:
~~~~~~~
2016-04-14 20:20:24,757 32411 INFO [tempest.
2016-04-14 20:20:24,758 32411 DEBUG [tempest.
Body: {"listener": {"connection_
Response - Headers: {'date': 'Thu, 14 Apr 2016 20:20:24 GMT', 'content-type': 'application/json', 'x-openstack-
Body: {"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "type": "HTTPInternalSe
2016-04-14 20:20:24,760 32411 INFO [neutron_
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "neutron_
File "neutron_
File "neutron_
File "/opt/stack/
return self.request('PUT', url, extra_headers, headers, body)
File "/opt/stack/
resp, resp_body)
File "/opt/stack/
tempest.
Details: Request Failed: internal server error while processing your request.
Changed in neutron: | |
importance: | Undecided → Low |
Changed in neutron: | |
assignee: | nobody → Chetna (ck-khullar) |
this is because the validation for this only checks a min value and not a max value. Any max value is allowed and it passes to the database for insertion. The database has a 32-bit int type for the column, so large numbers will fail.
The correct solution to this is to just modify the validation to the API to check a max value. The database should column type should not be changed.