I am working on this patch and have 2 solutions discussed below. Both use sessions to maintain vnc session information/instance.
I would like to have opinions if either of the solution looks feasible
A session is maintained throughout a connection between vnc user and a given instance.
e.g.
Solution 1: Uses multiprocessing.Manager().dict() for vnc session management
Advantages:
- session information is stored in-memory
Disadvantages:
- Methods start_server(), top_new_client() and new_client() from websockify.WebSocketProxy class
has to be overridden.
Traceback (most recent call last):
File "/usr/local/bin/nova-novncproxy", line 10, in <module>
sys.exit(main())
File "/opt/stack/nova/nova/cmd/novncproxy.py", line 89, in main
server.start_server()
File "/opt/stack/nova/nova/console/websocketproxy.py", line 124, in start_server
d = manager.Namespace()
File "/usr/lib/python2.7/multiprocessing/managers.py", line 667, in temp
token, exp = self._create(typeid, *args, **kwds)
File "/usr/lib/python2.7/multiprocessing/managers.py", line 565, in _create
conn = self._Client(self._address, authkey=self._authkey)
File "/usr/lib/python2.7/multiprocessing/connection.py", line 175, in Client
answer_challenge(c, authkey)
File "/usr/lib/python2.7/multiprocessing/connection.py", line 413, in answer_challenge
connection.recv_bytes()
IOError: [Errno 11] Resource temporarily unavailable
Solution 2: Use external store, sqlite or memcache for vnc session management
Disadvantages:
- new_client method from websockify.WebSocketProxy class must be overridden.
- It might be an overhead
- Managing and monitoring memcache on comput node will be an overhead for administrator.
- new_client method from websockify.WebSocketProxy class must be overridden.
I am working on this patch and have 2 solutions discussed below. Both use sessions to maintain vnc session information/ instance.
I would like to have opinions if either of the solution looks feasible
A session is maintained throughout a connection between vnc user and a given instance.
e.g.
console_sessions = { 3_UUID. ....... ], 3_UUID. ....... ],
<instance_1_UUID>: [session_1_UUID, session_2_UUID, session_
<instance_1_UUID>: [session_1_UUID, session_2_UUID, session_
...
...
}
Solution 1: Uses multiprocessing .Manager( ).dict( ) for vnc session management WebSocketProxy class
Advantages:
- session information is stored in-memory
Disadvantages:
- Methods start_server(), top_new_client() and new_client() from websockify.
has to be overridden.
Problem faced - *Please suggest a workaround or an alternative * .Manager( ).dict( ). stackoverflow. com/questions/ 14736766/ why-does- gevent- socket- break-multiproc essing- connections- auth /groups. google. com/forum/ #!msg/ruffus_ discuss/ kzXcedlRwuQ/ ag3mKlc7B- 0Js
I get an exception as shown below while using multiprocessing
Assuming that this error is caused because socket module is being monkeypatched by eventlet.
Referred:
http://
https:/
n-novnc log:
Traceback (most recent call last): bin/nova- novncproxy" , line 10, in <module> nova/nova/ cmd/novncproxy. py", line 89, in main start_server( ) nova/nova/ console/ websocketproxy. py", line 124, in start_server python2. 7/multiprocessi ng/managers. py", line 667, in temp typeid, *args, **kwds) python2. 7/multiprocessi ng/managers. py", line 565, in _create self._address, authkey= self._authkey) python2. 7/multiprocessi ng/connection. py", line 175, in Client python2. 7/multiprocessi ng/connection. py", line 413, in answer_challenge recv_bytes( )
File "/usr/local/
sys.exit(main())
File "/opt/stack/
server.
File "/opt/stack/
d = manager.Namespace()
File "/usr/lib/
token, exp = self._create(
File "/usr/lib/
conn = self._Client(
File "/usr/lib/
answer_challenge(c, authkey)
File "/usr/lib/
connection.
IOError: [Errno 11] Resource temporarily unavailable
Solution 2: Use external store, sqlite or memcache for vnc session management WebSocketProxy class must be overridden. WebSocketProxy class must be overridden.
Disadvantages:
- new_client method from websockify.
- It might be an overhead
- Managing and monitoring memcache on comput node will be an overhead for administrator.
- new_client method from websockify.