OpenStack Compute (Nova)

libvirt-related unit tests are failing

Reported by Lorin Hochstein on 2011-11-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
High
Brian Waldon

Bug Description

There are several unit tests in test_libvirt.py that are failing.

My guess is that this is being missed on the jenkins server because it doesn't have libvirt installed. Each of these failing methods starts like this:

        if not self.lazy_load_library_exists():
            return

Failing stack traces (seems related to image ids changed from integers to uuids):

======================================================================
ERROR: test_snapshot_in_ami_format (nova.tests.test_libvirt.LibvirtConnTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorin/nova/nova/tests/test_libvirt.py", line 388, in test_snapshot_in_ami_format
    conn.snapshot(self.context, instance_ref, recv_meta['id'])
  File "/home/lorin/nova/nova/exception.py", line 113, in wrapped
    return f(*args, **kw)
  File "/home/lorin/nova/nova/virt/libvirt/connection.py", line 429, in snapshot
    base = image_service.show(context, image_id)
  File "/home/lorin/nova/nova/image/fake.py", line 146, in show
    raise exception.ImageNotFound(image_id=image_id)
ImageNotFound: Image 3 could not be found.

======================================================================
ERROR: test_snapshot_in_qcow2_format (nova.tests.test_libvirt.LibvirtConnTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorin/nova/nova/tests/test_libvirt.py", line 461, in test_snapshot_in_qcow2_format
    conn.snapshot(self.context, instance_ref, recv_meta['id'])
  File "/home/lorin/nova/nova/exception.py", line 113, in wrapped
    return f(*args, **kw)
  File "/home/lorin/nova/nova/virt/libvirt/connection.py", line 429, in snapshot
    base = image_service.show(context, image_id)
  File "/home/lorin/nova/nova/image/fake.py", line 146, in show
    raise exception.ImageNotFound(image_id=image_id)
ImageNotFound: Image 123456 could not be found.

======================================================================
ERROR: test_snapshot_in_raw_format (nova.tests.test_libvirt.LibvirtConnTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorin/nova/nova/tests/test_libvirt.py", line 424, in test_snapshot_in_raw_format
    conn.snapshot(self.context, instance_ref, recv_meta['id'])
  File "/home/lorin/nova/nova/exception.py", line 113, in wrapped
    return f(*args, **kw)
  File "/home/lorin/nova/nova/virt/libvirt/connection.py", line 429, in snapshot
    base = image_service.show(context, image_id)
  File "/home/lorin/nova/nova/image/fake.py", line 146, in show
    raise exception.ImageNotFound(image_id=image_id)
ImageNotFound: Image 123456 could not be found.

======================================================================
ERROR: test_snapshot_no_image_architecture (nova.tests.test_libvirt.LibvirtConnTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorin/nova/nova/tests/test_libvirt.py", line 502, in test_snapshot_no_image_architecture
    conn.snapshot(self.context, instance_ref, recv_meta['id'])
  File "/home/lorin/nova/nova/exception.py", line 113, in wrapped
    return f(*args, **kw)
  File "/home/lorin/nova/nova/virt/libvirt/connection.py", line 429, in snapshot
    base = image_service.show(context, image_id)
  File "/home/lorin/nova/nova/image/fake.py", line 146, in show
    raise exception.ImageNotFound(image_id=image_id)
ImageNotFound: Image 2 could not be found.

Lorin Hochstein (lorinh) wrote :
Changed in nova:
status: New → In Progress
assignee: nobody → Lorin Hochstein (lorinh)
Brian Waldon (bcwaldon) on 2011-11-03
Changed in nova:
importance: Undecided → High
Lorin Hochstein (lorinh) wrote :

Note that the proposed fix are for particular libvirt unit tests that are failing. Fixing the Jenkins server will have to be done by somebody who manages the Jenkins server.

Changed in nova:
assignee: Lorin Hochstein (lorinh) → nobody
Brian Waldon (bcwaldon) on 2011-11-03
Changed in nova:
assignee: nobody → Brian Waldon (bcwaldon)

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

 status fixcommitted
 done

commit c3c53ba83abe3a23050eb3a2ffd665f6e24ab5aa
Author: Brian Waldon <email address hidden>
Date: Thu Nov 3 10:55:28 2011 -0400

    Correcting libvirt tests that were failing

    Fixes bug 885037. With this merge prop we need to get libvirt tests
    running in Jenkins.

    Change-Id: I48e69f8ef3b70036f5d161c85b6c423344a695a2

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2011-11-09
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx) on 2011-11-17
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers