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

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 919375 (view as bug list)
Environment:
Last Closed: 2014-04-04 20:58:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wayne Sun 2013-03-08 09:38:19 UTC
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 1 Martin Kletzander 2013-03-12 09:46:35 UTC
Could you try this with older versions to see where it started to happen?

Comment 2 Wayne Sun 2013-03-12 10:27:31 UTC
(In reply to comment #1)
> Could you try this with older versions to see where it started to happen?

Hi Martin,

virDomainPinEmulator and virDomainGetEmulatorPinInfo are added since libvirt-0.10.0-0rc1.el6.x86_64.rpm as I tested.

I've tried on:
libvirt-0.10.0-0rc0.el6.x86_64.rpm

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

notice 'emulator_period' not supported yet and just get ignored.

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

and here exceeds 3 will report error.

So, it's aleady there before the emulatorpin functions been add.

tried on:
libvirt-0.9.10-21.el6_3.8.x86_64

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

[root@hp-dl585g7-01 ~]# virsh schedinfo libvirt_test_api vcpu_quota=-1 vcpu_period=100000 emulator_period=1000000 cpu_shares=0 --config
error: unexpected data 'cpu_shares=0'

it's the same.

So it also exist on RHEL6u3, but as emulatorpin not added back then, set params fix to no larger than 3 is acceptable.

This is as far as I can test, hope this can help you track the source.
I'll try on rhel6u2 build later if i can get the rpms.

Comment 3 Martin Kletzander 2013-03-12 11:13:48 UTC
No need to test on 6u2.  Thanks a lot for the report on other versions.

Comment 4 Martin Kletzander 2013-03-13 09:10:44 UTC
I've found out the problem is deeper than that, for example:

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

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

As you can see, cpu_shares and vcpu_period were not updated.  Fix is on its way :)

Comment 5 Martin Kletzander 2013-03-13 13:17:29 UTC
More importantly, what I forgot to mention is that this should have never worked.  According to the 'virsh help schedinfo:

    schedinfo <domain> [--set <string>] [--weight <number>] [--cap <number>] [--current] [--config] [--live]

and 'man virsh'

    schedinfo [--set parameter=value] domain [[--config] [--live] | [--current]]
    schedinfo [--weight number] [--cap number] domain

only one --set parameter can be set at a time.  I'm thus changing it to RFE, feel free to discuss in case you disagree.

Comment 7 Martin Kletzander 2013-03-14 09:28:49 UTC
Patch proposed upstream:

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

Comment 8 Martin Kletzander 2013-04-03 06:52:19 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 13 RHEL Program Management 2014-04-04 20:58:32 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.


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