This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 919375 - [RFE] virsh schedinfo should support multiple --set parameters
[RFE] virsh schedinfo should support multiple --set parameters
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
x86_64 Linux
high Severity medium
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
: FutureFeature
Depends On: 919372
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-08 04:42 EST by Wayne Sun
Modified: 2014-06-17 20:45 EDT (History)
8 users (show)

See Also:
Fixed In Version: libvirt-1.0.5-1.el7
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 919372
Environment:
Last Closed: 2014-06-13 08:21:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Wayne Sun 2013-03-08 04:42:11 EST
the problem also exist on:
libvirt-1.0.3-1.el7.x86_64 

+++ This bug was initially created as a clone of Bug #919372 +++

Description of problem:
virsh schedinfo accept setting 5 scheduler parameters on qemu, but will get unexpected data error when given set params exceed 3

# virsh schedinfo libvirt_test_api vcpu_period=100000 emulator_period=1000000 emulator_quota=-1
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : 0
emulator_period: 1000000
emulator_quota : 0

# virsh schedinfo libvirt_test_api vcpu_quota=-1 vcpu_period=100000 emulator_period=1000000 emulator_quota=-1
error: unexpected data 'emulator_quota=-1'

it'll get the unexpected data error when given set parameters exceed 3

Version-Release number of selected component (if applicable):
libvirt-0.10.2-18.el6.x86_64 

How reproducible:
100% 

Steps to Reproduce:
1. as description 
2.
3.
  
Actual results:
virsh schedinfo fail with unexpected data error when params exceed 3 

Expected results:
it should work when give as many as supported params at same time 

Additional info:
Comment 2 Martin Kletzander 2013-03-14 05:28:29 EDT
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-March/msg00739.html
Comment 3 Martin Kletzander 2013-04-03 02:52:16 EDT
Moving to POST:

commit e7cd2844ca2b0d716a520667eff286713963e2ec
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Fri Mar 15 14:42:42 2013 +0100

    Allow multiple parameters for schedinfo
Comment 4 Hu Jianwei 2013-05-07 02:51:00 EDT
Hi Martin Kletzander,

There is a new issue during executing schedinfo command, please see below information, I don't know whether this issue is caused by your fix or another new. Please help on it.

Version:
libvirt-1.0.5-1.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64


[root@hujianweitest ~]# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

[root@hujianweitest ~]#
[root@hujianweitest ~]# virsh schedinfo rhel7 vcpu_period=200000
Scheduler      : posix
error: Unable to find vcpu cgroup for rhel7(vcpu: 0): No such file or directory

[root@hujianweitest ~]# virsh schedinfo rhel7 vcpu_period=200
Scheduler      : posix
error: invalid argument: value of 'vcpu_period' is out of range [1000, 1000000]

[root@hujianweitest ~]# virsh schedinfo rhel7 vcpu_period=1000
Scheduler      : posix
error: Unable to find vcpu cgroup for rhel7(vcpu: 0): No such file or directory

[root@hujianweitest ~]# virsh schedinfo rhel7 emulator_period=200000
Scheduler      : posix
error: Unable to find emulator cgroup for rhel7: No such file or directory

[root@hujianweitest ~]# virsh schedinfo rhel7 emulator_quota=-1
Scheduler      : posix
error: Unable to find emulator cgroup for rhel7: No such file or directory

[root@hujianweitest ~]# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

BR,
Jianwei
Comment 5 Hu Jianwei 2013-05-07 04:14:40 EDT
Hi,

Updated some results, according to reproduced steps.

[root@hujianweitest ~]# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

[root@hujianweitest ~]# virsh schedinfo rhel7 vcpu_period=100000 emulator_period=1000000 emulator_quota=-1
Scheduler      : posix
error: Unable to find vcpu cgroup for rhel7(vcpu: 0): No such file or directory

[root@hujianweitest ~]# virsh schedinfo rhel7 vcpu_quota=-1 vcpu_period=100000 emulator_period=1000000 emulator_quota=-1
Scheduler      : posix
error: Unable to find vcpu cgroup for rhel7(vcpu: 0): No such file or directory

[root@hujianweitest ~]#

BR,
Jianwei
Comment 9 Hu Jianwei 2013-11-19 05:00:11 EST
I can not reproduce it on libvirt-1.1.1-12.el7.x86_64.

Version:
libvirt-1.1.1-12.el7.x86_64
qemu-kvm-1.5.3-19.el7.x86_64
kernel-3.10.0-51.el7.x86_64

1. Check multiple --set parameters
[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 1000
vcpu_quota     : -1
emulator_period: 200000
emulator_quota : -1

[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7 vcpu_period=100000 emulator_period=1000000 emulator_quota=-1
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 1000000
emulator_quota : -1

[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 1000000
emulator_quota : -1

[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7 vcpu_period=100000 emulator_period=1000000 emulator_quota=2000 vcpu_quota=1000 cpu_shares=2000
Scheduler      : posix
cpu_shares     : 2000
vcpu_period    : 100000
vcpu_quota     : 1000
emulator_period: 1000000
emulator_quota : 2000

[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 2000
vcpu_period    : 100000
vcpu_quota     : 1000
emulator_period: 1000000
emulator_quota : 2000

2. Also, check the single parameter:
[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7 vcpu_period=200000
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 200000
vcpu_quota     : -1
emulator_period: 1000000
emulator_quota : -1

[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7 vcpu_period=200
Scheduler      : posix
error: invalid argument: value of 'vcpu_period' is out of range [1000, 1000000]

[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7 vcpu_period=1000
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 1000
vcpu_quota     : -1
emulator_period: 1000000
emulator_quota : -1

[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7 emulator_period=200000
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 1000
vcpu_quota     : -1
emulator_period: 200000
emulator_quota : -1

[root@ibm-x3650m3-07 ~]# virsh schedinfo rhel7 emulator_quota=-1
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 1000
vcpu_quota     : -1
emulator_period: 200000
emulator_quota : -1

We can get expected results.
Comment 10 Ludek Smid 2014-06-13 08:21:56 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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