[ovirt-devel] [VDSM] new virt tests failing
Francesco Romani
fromani at redhat.com
Mon May 16 06:21:43 UTC 2016
----- Original Message -----
> From: "Nir Soffer" <nsoffer at redhat.com>
> To: "devel" <devel at ovirt.org>, "Francesco Romani" <fromani at redhat.com>
> Sent: Sunday, May 15, 2016 10:49:55 PM
> Subject: [VDSM] new virt tests failing
>
> Hi all,
>
> I'm seeing these tests failing locally:
>
> ======================================================================
> ERROR: test___str__ (vmMigrationTests.TestProgress)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/nsoffer/src/vdsm/tests/vmMigrationTests.py", line 166, in setUp
> libvirt.VIR_DOMAIN_JOB_TIME_ELAPSED: 42,
> AttributeError: 'module' object has no attribute
> 'VIR_DOMAIN_JOB_TIME_ELAPSED'
>
> ======================================================================
> ERROR: test___str___without_optional_fields (vmMigrationTests.TestProgress)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/nsoffer/src/vdsm/tests/vmMigrationTests.py", line 166, in setUp
> libvirt.VIR_DOMAIN_JOB_TIME_ELAPSED: 42,
> AttributeError: 'module' object has no attribute
> 'VIR_DOMAIN_JOB_TIME_ELAPSED'
>
> ----------------------------------------------------------------------
>
> And indeed, there is no such constant:
>
> >>> import libvirt
> >>> libvirt.VIR_DOMAIN_JOB_TIME_ELAPSED
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute
> 'VIR_DOMAIN_JOB_TIME_ELAPSED'
>
> $ rpm -q libvirt-python
> libvirt-python-1.2.13-1.fc22.x86_64
>
> Is this old libvirt version, or the tests are broken?
It is an interesting issue, reported also by Oved later last week, but we I didn't
understand it previously.
Those constants were introduced in libvirt (C) around 1.2.13, but exposed
as named constants around libvirt (-python) 1.2.17, thanks to
https://bugzilla.redhat.com/show_bug.cgi?id=1222795
We can bump the libvirt-python requirements to >= 1.2.18, which is
provided by basesystem - no need for virt-preview.
Or we can add a workaround in the code.
I prefer the first option (bump): virt-preview for fedora 22 ships libvirt >= 1.2.18,
and fedora 22 itself is approaching EOL.
Comments welcome,
--
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani
More information about the Devel
mailing list