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

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 919375 (view as bug list)
Environment:
Last Closed: 2014-04-04 16:58:32 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:38:19 EST
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 05:46:35 EDT
Could you try this with older versions to see where it started to happen?
Comment 2 Wayne Sun 2013-03-12 06:27:31 EDT
(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 07:13:48 EDT
No need to test on 6u2.  Thanks a lot for the report on other versions.
Comment 4 Martin Kletzander 2013-03-13 05:10:44 EDT
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 09:17:29 EDT
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 05:28:49 EDT
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-March/msg00739.html
Comment 8 Martin Kletzander 2013-04-03 02:52:19 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 13 RHEL Product and Program Management 2014-04-04 16:58:32 EDT
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.