Modify nova.wsgi.start() should check backlog parameter.

Fixes bug 883292.

Forward ported from
https://github.com/ntt-pf-lab/nova/tree/openstack-qa-nova-883292

Change-Id: I8839851a72fcf0910a532d558ffe66a39a7db1e8
This commit is contained in:
Sean Dague
2012-03-21 14:46:09 -04:00
parent 1cde21b576
commit 216bcb4ae5
2 changed files with 5 additions and 0 deletions

View File

@@ -85,8 +85,12 @@ class Server(object):
:param backlog: Maximum number of queued connections.
:returns: None
:raises: nova.exception.InvalidInput
"""
if backlog < 1:
raise exception.InvalidInput(
reason='The backlog must be more than 1')
self._socket = eventlet.listen((self.host, self.port), backlog=backlog)
self._server = eventlet.spawn(self._start)
(self.host, self.port) = self._socket.getsockname()