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

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
Rating: 5.0/5. From 1 vote.
Please wait...
Jules

Jules

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

You may also like...

7 Responses

  1. Alberto Molina Coballes Alberto Molina Coballes says:

    This patch fixes this issue on Debian, thanks!
    Could you please report about this patch in #703242
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703242

    No votes yet.
    Please wait...
    • Jules Jules says:

      Hi Alberto,

      the report you linking to was my report to the package maintainer team. I’ve sent them this information already.

      No votes yet.
      Please wait...
  2. rex-han rex-han says:

    Thanks for your bug-fix, I resolved the problem.

    No votes yet.
    Please wait...
  3. Max Max says:

    Thank you!!

    No votes yet.
    Please wait...
  4. Shawna Shawna says:

    Hey There. I found your blog using msn. This is a really well written article.
    I’ll be sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll certainly
    comeback.

    No votes yet.
    Please wait...
  5. Ramon Ramon says:

    Нello, і thіnk that і ѕaw уou viѕitеd my blog so i
    came to “return the faνоr”.I’m trying to find things to improve my web site!I suppose its ok to use some of your ideas!!

    No votes yet.
    Please wait...
  6. Anonymous Anonymous says:

    Thanks to my father who shared with me on the topic
    of this webpage, this webpage is in fact awesome.

    No votes yet.
    Please wait...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.