Fix for broken vnc console on Openstack Essex under Debian/Ubuntu
The Openstack dashboard novnc console broke after the last two security release of essex openstack (2012.1.1-14/2012.1.1-15). Here is the solution Fix for broken vnc console on Openstack Essex under Debian/Ubuntu.
You will see an Error Message like this in your /var/log/nova/nova-consoleauth.log:
AUDIT nova.consoleauth.manager [req-6eb532ae-b024-4ada-8bb5-95ebc132dd2f None None] Checking Token: 32373fb4-c9ac-4f87-9418-7a6f13606874, True) ERROR nova.rpc.amqp [req-6eb532ae-b024-4ada-8bb5-95ebc132dd2f None None] Exception during message handling TRACE nova.rpc.amqp Traceback (most recent call last): TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 253, in _process_data TRACE nova.rpc.amqp rval = node_func(context=ctxt, **node_args) TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/consoleauth/manager.py", line 102, in check_token TRACE nova.rpc.amqp if token_valid and self._validate_console(token): TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/consoleauth/manager.py", line 91, in _validate_console TRACE nova.rpc.amqp console_valid = self.compute_api.validate_vnc_console(context, TRACE nova.rpc.amqp NameError: global name 'context' is not defined TRACE nova.rpc.amqp ERROR nova.rpc.amqp [req-6eb532ae-b024-4ada-8bb5-95ebc132dd2f None None] Returning exception global name 'context' is not defined to caller ERROR nova.rpc.amqp [req-6eb532ae-b024-4ada-8bb5-95ebc132dd2f None None] ['Traceback (most recent call last):n', ' File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 253, in _process_datan rval = node_func(context=ctxt, **node_args)n', ' File "/usr/lib/python2.7/dist-packages/nova/consoleauth/manager.py", line 102, in check_tokenn if token_valid and self._validate_console(token):n', ' File "/usr/lib/python2.7/dist-packages/nova/consoleauth/manager.py", line 91, in _validate_consolen console_valid = self.compute_api.validate_vnc_console(context,n', "NameError: global name 'context' is not definedn"]
So I’ve looked for quick solutions to get rid with the broken python scripts and built this diff patch out of two merged fixes i found in the openstack git reviews repository.
To fix your nova-consoleauth do following steps:
First of all download the patch set: openstack_novnc.tar.gz into a directory of your choice.
unpack the archive:
tar xvzf openstack_novnc.tar.gz
apply the patch diffs by running this commands on your root shell:
patch -p0 < api.py.diff patch -p0 < manager.py.diff patch -p0 < test_compute.py.diff
and one more important part is to restart the services after patching them:
service nova-api restart service nova-console restart service nova-consoleauth restart
The post Fix for broken vnc console on Openstack Essex under Debian/Ubuntu appeared first on ISPIRE.ME.