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.
Bug 1147639 - Handle VIR_DOMAIN_EVENT_ID_TUNABLE in libvirt-override.c
Summary: Handle VIR_DOMAIN_EVENT_ID_TUNABLE in libvirt-override.c
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt-python
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-29 16:15 UTC by Jiri Denemark
Modified: 2015-03-05 07:57 UTC (History)
5 users (show)

Fixed In Version: libvirt-python-1.2.8-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:57:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0334 0 normal SHIPPED_LIVE new packages: libvirt-python 2015-03-05 12:23:16 UTC

Description Jiri Denemark 2014-09-29 16:15:52 UTC
Description of problem:

Compiling libvirt-python reports the following warning:

libvirt-python-1.2.8/libvirt-override.c:6539:5:warning – enumeration  value 'VIR_DOMAIN_EVENT_ID_TUNABLE' not handled in switch [-Wswitch]

Moreover, examples/event-test.py does not handle this event either.

Version-Release number of selected component (if applicable):

libvirt-python-1.2.8-4.el7

How reproducible:

100%

Steps to Reproduce:
1. try to register a callback for VIR_DOMAIN_EVENT_ID_TUNABLE event in python

Actual results:

The callback is never called.

Expected results:

The callback is called whenever a tunable event is fired.

Additional info:

Comment 1 Pavel Hrdina 2014-09-30 17:25:34 UTC
Upstream commit:

commit 714aa155e84c4b55e37b5554c9dbc5e7ddd61cd3
Author: Pavel Hrdina <phrdina>
Date:   Tue Sep 30 17:52:29 2014 +0200

    implement new tunable event
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1147639
    
    Signed-off-by: Pavel Hrdina <phrdina>

Comment 4 Luyao Huang 2014-11-12 02:58:53 UTC
I can reproduce this issue with libvirt-python-1.2.8-4:

check the code there is no function for tunable event


Verify this bug with  libvirt-python-1.2.8-5.el7
1.open first terminal :
# python /root/libvirt-python/examples/event-test.py
Using uri:qemu:///system

2.try some command:

[root@lhuang libvirt]# virsh vcpupin test3 1 1

[root@lhuang libvirt]# virsh emulatorpin test3 1

[root@lhuang libvirt]# virsh schedinfo test3
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

[root@lhuang libvirt]# virsh schedinfo test3 --set cpu_shares=0
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

[root@lhuang libvirt]# virsh schedinfo test3 --set vcpu_period=12312
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 12312
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

[root@lhuang libvirt]# virsh schedinfo test3 --set vcpu_quota=1234
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 12312
vcpu_quota     : 1234
emulator_period: 100000
emulator_quota : -1

[root@lhuang libvirt]# virsh schedinfo test3 --set emulator_period=1234
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 12312
vcpu_quota     : 1234
emulator_period: 1234
emulator_quota : -1

[root@lhuang libvirt]# virsh schedinfo test3 --set emulator_quota=1234
Scheduler      : posix
cpu_shares     : 2
vcpu_period    : 12312
vcpu_quota     : 1234
emulator_period: 1234
emulator_quota : 1234

[root@lhuang libvirt]# virsh blkdeviotune test3 hda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

[root@lhuang libvirt]# virsh blkdeviotune test3 hda 123

[root@lhuang libvirt]# virsh blkdeviotune test3 hda --read-bytes-sec 1234

[root@lhuang libvirt]# virsh blkdeviotune test3 hda --write-bytes-sec 12345

[root@lhuang libvirt]# virsh blkdeviotune test3 hda --total-iops-sec 12345

[root@lhuang libvirt]# virsh blkdeviotune test3 hda --read-iops-sec 1234

[root@lhuang libvirt]# virsh blkdeviotune test3 hda --write-iops-sec 12322


3.from first terminal:
# python /root/libvirt-python/examples/event-test.py
Using uri:qemu:///system
myDomainEventTunableCallback: Domain test3(62) {'cputune.vcpupin1': '1'}
myDomainEventTunableCallback: Domain test3(62) {'cputune.emulatorpin': '1'}
myDomainEventTunableCallback: Domain test3(62) {'cputune.cpu_shares': 2L}
myDomainEventTunableCallback: Domain test3(62) {'cputune.vcpu_period': 12312L}
myDomainEventTunableCallback: Domain test3(62) {'cputune.vcpu_quota': 1234L}
myDomainEventTunableCallback: Domain test3(62) {'cputune.emulator_period': 1234L}
myDomainEventTunableCallback: Domain test3(62) {'cputune.emulator_quota': 1234L}
myDomainEventTunableCallback: Domain test3(62) {'blkdeviotune.total_bytes_sec': 123L, 'blkdeviotune.disk': 'hda'}
myDomainEventTunableCallback: Domain test3(62) {'blkdeviotune.read_bytes_sec': 1234L, 'blkdeviotune.disk': 'hda'}
myDomainEventTunableCallback: Domain test3(62) {'blkdeviotune.write_bytes_sec': 12345L, 'blkdeviotune.disk': 'hda'}
myDomainEventTunableCallback: Domain test3(62) {'blkdeviotune.total_iops_sec': 12345L, 'blkdeviotune.disk': 'hda'}
myDomainEventTunableCallback: Domain test3(62) {'blkdeviotune.read_iops_sec': 1234L, 'blkdeviotune.disk': 'hda'}
myDomainEventTunableCallback: Domain test3(62) {'blkdeviotune.write_iops_sec': 12322L, 'blkdeviotune.disk': 'hda'}

Comment 6 errata-xmlrpc 2015-03-05 07:57:04 UTC
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.

https://rhn.redhat.com/errata/RHBA-2015-0334.html


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