Bug 804664 - [libvirt] Failed to set vm niceness with latest libvirt
[libvirt] Failed to set vm niceness with latest libvirt
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Martin Kletzander
Fedora Extras Quality Assurance
Depends On:
Blocks: 807751 816609
  Show dependency treegraph
Reported: 2012-03-19 10:37 EDT by Haim
Modified: 2014-01-12 19:51 EST (History)
20 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 807751 (view as bug list)
Last Closed: 2012-03-28 11:33:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Haim 2012-03-19 10:37:02 EDT
Description of problem:

vdsm fails to set vm niceness working with latest libvirt: libvirt-0.9.10-2.fc17.x86_64

I get the following trace:

Traceback (most recent call last):
  File "/usr/share/vdsm/libvirtvm.py", line 1232, in _domDependentInit
    self._dom.setSchedulerParameters({'cpu_shares': (20 - nice) * 51})
  File "/usr/share/vdsm/libvirtvm.py", line 490, in f
    ret = attr(*args, **kwargs)
  File "/usr/share/vdsm/libvirtconnection.py", line 82, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1788, in setSchedulerParameters
    ret = libvirtmod.virDomainSetSchedulerParameters(self._o, params)
SystemError: /builddir/build/BUILD/Python-2.7.2/Objects/longobject.c:980: bad argument to internal function

I suspect libvirt changed something.

note that problem doesn't occur with libvirt-0.9.9-1.fc16.x86_64.
Comment 1 Haim 2012-03-19 10:38:25 EDT
The function in libvirt called: VIR_DOMAIN_SCHEDULER_CPU_SHARES, tried to look for clues in their git src with no luck, i'm sure danken would know.
Comment 2 Haim 2012-03-19 10:45:50 EDT
According to eblake, libvirt team did touch the python bindings, in an effort to clean up some undefined behavior and share more code between the various clients of the C code virTypedParameter and scheduler cpu shares is a client of virTypedParameter, so maybe we introduced a regression in our typed parameter handling
Comment 3 Eric Blake 2012-03-28 11:33:59 EDT
F17 will pick up 0.9.11, where this is fixed with:

commit 1aeb3d9e7f3a967f7d5e59f852e804aef0786f6c
Author: Guannan Ren <gren@redhat.com>
Date:   Tue Mar 27 14:06:47 2012 +0800

    python: make python APIs use these helper functions

Note You need to log in before you can comment on or make changes to this bug.