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 919375 - [RFE] virsh schedinfo should support multiple --set parameters
Summary: [RFE] virsh schedinfo should support multiple --set parameters
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 919372
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-08 09:42 UTC by Wayne Sun
Modified: 2014-06-18 00:45 UTC (History)
8 users (show)

Fixed In Version: libvirt-1.0.5-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of: 919372
Environment:
Last Closed: 2014-06-13 12:21:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wayne Sun 2013-03-08 09:42:11 UTC
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 09:28:29 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-March/msg00739.html

Comment 3 Martin Kletzander 2013-04-03 06:52:16 UTC
Moving to POST:

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

    Allow multiple parameters for schedinfo

Comment 4 Hu Jianwei 2013-05-07 06:51:00 UTC
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 08:14:40 UTC
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 10:00:11 UTC
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 12:21:56 UTC
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.