diff options
author | Justin Santa Barbara <justin@fathomdb.com> | 2011-05-22 15:41:23 +0000 |
---|---|---|
committer | Tarmac <> | 2011-05-22 15:41:23 +0000 |
commit | 4f8f5cb40f831c49af11cd801e1766fd6f0956c3 (patch) | |
tree | 7f78d3c14f09befea7c8debca75eb42d607ced98 /nova/wsgi.py | |
parent | 0cc4a1c8de961d8c4c212c28ff008082184da5dd (diff) | |
parent | 732eb413cc404ba4c1ad5a2581c5efb864874d3b (diff) | |
download | nova-4f8f5cb40f831c49af11cd801e1766fd6f0956c3.tar.gz nova-4f8f5cb40f831c49af11cd801e1766fd6f0956c3.tar.xz nova-4f8f5cb40f831c49af11cd801e1766fd6f0956c3.zip |
Fix bug #744150 by starting nova-api on an unused port.
Diffstat (limited to 'nova/wsgi.py')
-rw-r--r-- | nova/wsgi.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/wsgi.py b/nova/wsgi.py index e60a8820d..ea9bb963d 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -59,13 +59,16 @@ class Server(object): def __init__(self, threads=1000): self.pool = eventlet.GreenPool(threads) + self.socket_info = {} - def start(self, application, port, host='0.0.0.0', backlog=128): + def start(self, application, port, host='0.0.0.0', key=None, backlog=128): """Run a WSGI server with the given application.""" arg0 = sys.argv[0] logging.audit(_('Starting %(arg0)s on %(host)s:%(port)s') % locals()) socket = eventlet.listen((host, port), backlog=backlog) self.pool.spawn_n(self._run, application, socket) + if key: + self.socket_info[key] = socket.getsockname() def wait(self): """Wait until all servers have completed running.""" |