Skip to content

Commit

Permalink
Force reopening eventlet's hub after fork
Browse files Browse the repository at this point in the history
With this we reopen eventlet's hub after a fork (triggered from
websockify when a new client connects) to prevent sharing epoll's fd
with the parent, which may cause erratic behaviour.

This caused novncproxy to stop working when it had more than two clients
connected.

Fixes bug #1193031

Change-Id: I3ff9001543b84b1037597da243422490bb611657
(cherry picked from commit cb25bc4)
  • Loading branch information
Xavier Queralt authored and russellb committed Jul 17, 2013
1 parent 183d506 commit 9315de0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nova/console/websocketproxy.py
Expand Up @@ -42,6 +42,11 @@ def new_client(self):
"""
Called after a new WebSocket connection has been established.
"""
# Reopen the eventlet hub to make sure we don't share an epoll
# fd with parent and/or siblings, which would be bad
from eventlet import hubs
hubs.use_hub()

cookie = Cookie.SimpleCookie()
cookie.load(self.headers.getheader('cookie'))
token = cookie['token'].value
Expand Down

0 comments on commit 9315de0

Please sign in to comment.