OpenStack Compute (Nova)

test_libvirt missing uuid field in instance

Reported by Ken Thomas on 2012-02-13
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Michael Still

Bug Description

I ran into this in RHEL 6.2 with nova/run_tests.sh in the non-virtual environment. Test "test_destroy_saved" in test_libvirt.py fails because its instance is missing a 'uuid' field. The instance eventually gets logged, but since it doesn't have a 'uuid' field, the test dies in the logger.

Adding a 'uuid' field with a value of zero (around line 1157) gets the test to complete.

Here's the trace.

./run_tests.sh -N

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

Ken Thomas (krt) on 2012-02-13
Changed in nova:
assignee: nobody → Ken Thomas (krt)
Michael Still (mikalstill) wrote :

Ken -- I introduced this bug, and I'm happy to fix it if you're not actively working on it already. It should just be a case of adding a uuid to the fake instance in whatever unit test this is. It should have that anyways, because uuids are used all over the place now.

summary: - test_libvirt missing uuid field in instace
+ test_libvirt missing uuid field in instance
Michael Still (mikalstill) wrote :

Actually, I thought about this some more and because this is a failure of a unit test on master I've stolen the bug and sent off a review with the fix. Sorry to stomp on you... The review is https://review.openstack.org/#change,4130 .

Changed in nova:
assignee: Ken Thomas (krt) → Michael Still (mikalstill)
status: New → In Progress
Ken Thomas (krt) wrote :

No problem, I had a fix ready to go (with a fake uuid as you described) but I'm having issues getting signed up to submit it for review. I'm glad that a fix got in without me holding things up. Thanks!

Brian Waldon (bcwaldon) on 2012-02-14
Changed in nova:
milestone: none → essex-4
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers