Categories: OpenstackSolutions

Fix for broken vnc console on Openstack Essex under Debian/Ubuntu

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
Jules

Jules is the owner and author of ISPIRE.ME. He's a Linux System Engineer, Tech fanatic and an Open Source fan.

View Comments

Share
Published by
Jules

Recent Posts

HTTP/2 SSL Offloading with Hitch and Varnish

HTTP/2 SSL Offloading with Hitch and Varnish Since Chrome browsers showing you insecure warning on…

7 years ago

File changed as we read it GlusterFS issue

File changed as we read it GlusterFS issue Recently i had trouble running Backups of…

7 years ago

Running multiple instances of varnish using systemd

Running multiple instances of varnish using systemd If you have not yet found a complete…

7 years ago

HTTP/2 SSL Offloading with Haproxy and Nginx

HTTP/2 SSL Offloading with Haproxy and Nginx After HTTP/2 becoming more an more prominent regarding SSL…

7 years ago

Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for

Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for Everyone knows the Problem. Get…

7 years ago

Review TDS2 How to backtest using tick data with Metatrader 4

Review TDS2 How to backtest using tick data with Metatrader 4 in this Review TDS2…

8 years ago

This website uses cookies.