Red Hat Bugzilla – Bug 1033039
Strange response from the baselineCPU while using the python binding
Last modified: 2013-12-30 20:55:58 EST
Created attachment 827177 [details]
Description of problem:
baselineCPU method returns with an integer (-1) while using the libvirt python binding.
In normal cases a string (xml) is the expected return type.
Version-Release number of selected component (if applicable):
rpm -qf /usr/lib64/python2.7/site-packages/libvirt.py
Steps to Reproduce:
Use the attached script:
$ python ./libvirt_test.py
libvirt: CPU Driver error : internal error: CPU feature `rdtscp' specified more than once
I did not caught any exception
The function returns back with an integer type (-1) and prints an error message to the console.
On error the method needs to raise an exception (or returning with None depending on what is the usual exception handling behaviour in the another parts of the library)
The method must not rerun with an unexpected type.
According to the documentation on success virConnectBaselineCPU return with a string/xml.
The issue seen on F20 TC2 cloud image in virtual machine after
sudo yum install libvirt-python libvirt qemu-system-x86.x86_64
sudo service libvirtd restart
The issue also visible while using devstack (openstack-nova).
Patch posted upstream:
libvirt-18.104.22.168-1.fc20 has been submitted as an update for Fedora 20.
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-22.214.171.124-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
libvirt-126.96.36.199-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.