get_console_output for 'lxc' libvirt type would throw an error

Bug #853602 reported by Rohit Karajgi
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chuck Short

Bug Description

If we try to get_console_output for an instance in an lxc container, the following error is thrown:

2011-09-18 19:42:41,295 INFO nova.virt.libvirt_conn [-] Unable to read LXC console
2011-09-18 19:42:41,295 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/home/rohit/nova/diablo/libvirt_unittests/nova/exception.py", line 98, in wrapped
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/home/rohit/nova/diablo/libvirt_unittests/nova/virt/libvirt/connection.py", line 670, in get_console_output
(nova.exception): TRACE: return self._dump_file(fpath)
(nova.exception): TRACE: UnboundLocalError: local variable 'fpath' referenced before assignment

Along with the info message, the 'fpath' variable setting for this case should be handled in the code.

Tags: lxc
Revision history for this message
bastichelaar (bas-t) wrote :

I created a patch to fix the console output, see attached file.

bastichelaar (bas-t)
Changed in nova:
status: New → Confirmed
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
Thierry Carrez (ttx)
tags: added: lxc
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/4589

Changed in nova:
assignee: nobody → Chuck Short (zulcss)
status: Confirmed → In Progress
Changed in nova:
assignee: Chuck Short (zulcss) → anotherjesse (anotherjesse)
Changed in nova:
assignee: anotherjesse (anotherjesse) → Chuck Short (zulcss)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/4589
Committed: http://github.com/openstack/nova/commit/e81795995abd911e477f5478cdfe84c5785a1a90
Submitter: Jenkins
Branch: master

commit e81795995abd911e477f5478cdfe84c5785a1a90
Author: Chuck Short <email address hidden>
Date: Mon Feb 27 12:54:22 2012 -0500

    Add support for lxc consoles.

    Add lxc console support. Similar to how we get console
    on libvirt-xen domains. This fixes bug 853602.

    Change-Id: Ib39953b804dc3284132651f29f33ad5783d1959a
    Signed-off-by: Chuck Short <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.