ERROR: test_destroy_saved (nova.tests.test_libvirt.LibvirtConnTestCase) fails

Bug #932426 reported by Nachi Ueno(Instance3) on 2012-02-14
0
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Unassigned

Bug Description

======================================================================
ERROR: test_destroy_saved (nova.tests.test_libvirt.LibvirtConnTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/essex/nova/nova/test.py", line 87, in _skipper
    func(*args, **kw)
  File "/opt/essex/nova/nova/tests/test_libvirt.py", line 1158, in test_destroy_saved
    conn.destroy(instance, [])
  File "/opt/essex/nova/nova/virt/libvirt/connection.py", line 417, in destroy
    cleanup=True)
  File "/opt/essex/nova/nova/virt/libvirt/connection.py", line 399, in _destroy
    network_info=network_info)
  File "/opt/essex/nova/nova/virt/libvirt/firewall.py", line 493, in unfilter_instance
    'filtered'), instance=instance)
  File "/opt/essex/nova/nova/log.py", line 203, in info
    self._update_extra(kwargs)
  File "/opt/essex/nova/nova/log.py", line 181, in _update_extra
    % params['instance'])})
KeyError: 'uuid'

----------------------------------------------------------------------

Because of this commit

commit 605c22b1804f0a34d400eb57e1954c3fc3a20c88
Author: Michael Still <email address hidden>
Date: Wed Feb 1 11:41:22 2012 +1100

    Optionally pass a instance uuid to log methods.

    This change is intended to make log messages including instance
    uuids consistent. This eases operational support, as when a
    customer asks for the history of there instance it is a simple
    grep operation, instead of the current situation. I have included
    a sample use, but will work through adding this to relevant log
    messages over time.

    Change-Id: I1f61c04f32dbb960471950ac7231313d9d9ced12

diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
index 1f9dc3e..0df9e95 100644
--- a/nova/tests/test_libvirt.py
+++ b/nova/tests/test_libvirt.py
@@ -1154,7 +1154,8 @@ class LibvirtConnTestCase(test.TestCase):

         conn = connection.LibvirtConnection(False)
         self.stubs.Set(conn, '_lookup_by_name', fake_lookup_by_name)
- instance = {"name": "instancename", "id": "instanceid"}
+ instance = {"name": "instancename", "id": "instanceid",
+ "uuid": "uuid"}
         conn.destroy(instance, [])

Patch is looks like this.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers