Bug 804664 - [libvirt] Failed to set vm niceness with latest libvirt
Summary: [libvirt] Failed to set vm niceness with latest libvirt
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Kletzander
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 807751 816609
TreeView+ depends on / blocked
 
Reported: 2012-03-19 14:37 UTC by Haim
Modified: 2014-01-13 00:51 UTC (History)
20 users (show)

Fixed In Version:
Clone Of:
: 807751 (view as bug list)
Environment:
Last Closed: 2012-03-28 15:33:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Haim 2012-03-19 14:37:02 UTC
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 14:38:25 UTC
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 14:45:50 UTC
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 15:33:59 UTC
F17 will pick up 0.9.11, where this is fixed with:

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

    python: make python APIs use these helper functions
    
        *setPyVirTypedParameter
        *libvirt_virDomainGetCPUStats


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