get_console_output for 'lxc' libvirt type would throw an error

Bug #853602 reported by Rohit Karajgi on 2011-09-19
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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/", line 98, in wrapped
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/home/rohit/nova/diablo/libvirt_unittests/nova/virt/libvirt/", 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 Edit Tag help
bastichelaar (bas-t) wrote :

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

bastichelaar (bas-t) on 2011-09-21
Changed in nova:
status: New → Confirmed
Thierry Carrez (ttx) on 2011-09-26
Changed in nova:
importance: Undecided → Medium
Thierry Carrez (ttx) on 2012-02-02
tags: added: lxc

Fix proposed to branch: master

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)

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) on 2012-03-20
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers