Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
migrateGetMaxSpeed() not working right:
# python
Python 2.6.6 (r266:84292, Sep 12 2011, 14:03:14)
[GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.open(None)
>>> domobj = conn.lookupByName("winxp")
>>> domobj.migrateGetMaxSpeed(0)
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1531, in migrateGetMaxSpeed
ret = libvirtmod.virDomainMigrateGetMaxSpeed(self._o, flags)
TypeError: virDomainMigrateGetMaxSpeed() takes exactly 1 argument (2 given)
^^
virDomainMigrateGetMaxSpeed() actually take 3 parameters:
virDomainMigrateGetMaxSpeed(virDomainPtr domain,
unsigned long *bandwidth,
unsigned int flags)
Version-Release number of selected component (if applicable):
libvirt-0.9.9-1.el6.x86_64
How reproducible:
always
Steps to Reproduce:
1. prepare a domain
2. set domain migrate max speed
# virsh migrate-setspeed $dom_name 2
3. check domain migrate max speed
# virsh migrate-getspeed $dom_name
2
4. check with python as in description
Actual results:
Fail to work
Expected results:
should work
Additional info:
bandwidth parameter in virDomainMigrateGetMaxSpeed() is for accept the return value of current migration bandwidth limit in Mbps
ommit 4165d68aaabbf262fe4050ddcf1b68bff5a6b0c8
Author: Osier Yang <jyang>
Date: Wed Feb 8 17:33:22 2012 +0800
python: Correct arguments number for migrateSetMaxSpeed
The API definition accepts "flags" argument, however, the
implementation ignores it, though "flags" is unused currently,
we should expose it instead of hard coding, the API
implementation inside hypervisor driver is responsible to check
if the passed "flags" is valid.
pkgs:
libvirt-0.9.13-3.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.297.el6_3.x86_64
kernel-2.6.32-280.el6.x86_64
Prepare a domain
# virsh list --all
Id Name State
----------------------------------------------------
- aaa shut off
# python
Python 2.6.6 (r266:84292, May 1 2012, 13:52:17)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.open(None)
>>> domobj = conn.lookupByName("aaa")
>>> domobj.migrateGetMaxSpeed(0)
32L
Setting speed in another terminal:
# virsh migrate-setspeed aaa 2
Switch back and check:
>>> domobj.migrateGetMaxSpeed(0)
2L
Works fine now.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2013-0276.html
Description of problem: migrateGetMaxSpeed() not working right: # python Python 2.6.6 (r266:84292, Sep 12 2011, 14:03:14) [GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import libvirt >>> conn = libvirt.open(None) >>> domobj = conn.lookupByName("winxp") >>> domobj.migrateGetMaxSpeed(0) Traceback (most recent call last): File "<stdin>", line 1, in<module> File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1531, in migrateGetMaxSpeed ret = libvirtmod.virDomainMigrateGetMaxSpeed(self._o, flags) TypeError: virDomainMigrateGetMaxSpeed() takes exactly 1 argument (2 given) ^^ virDomainMigrateGetMaxSpeed() actually take 3 parameters: virDomainMigrateGetMaxSpeed(virDomainPtr domain, unsigned long *bandwidth, unsigned int flags) Version-Release number of selected component (if applicable): libvirt-0.9.9-1.el6.x86_64 How reproducible: always Steps to Reproduce: 1. prepare a domain 2. set domain migrate max speed # virsh migrate-setspeed $dom_name 2 3. check domain migrate max speed # virsh migrate-getspeed $dom_name 2 4. check with python as in description Actual results: Fail to work Expected results: should work Additional info: bandwidth parameter in virDomainMigrateGetMaxSpeed() is for accept the return value of current migration bandwidth limit in Mbps