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 947400 - libvirt isn't checking values emulator_period and emulator_quota in XML
Summary: libvirt isn't checking values emulator_period and emulator_quota in XML
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: All
OS: All
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 854537
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-02 10:44 UTC by Luwen Su
Modified: 2014-06-18 00:46 UTC (History)
8 users (show)

Fixed In Version: libvirt-1.0.5-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 854537
Environment:
Last Closed: 2014-06-13 09:34:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Luwen Su 2013-04-02 10:44:41 UTC
+++ This bug was initially created as a clone of Bug #854537 +++

Clone to RHEL7 for tracking.

Description of problem:
libvirt ignores cpu tuning values set in XML if they are out of range and uses defaults

Refer to the http://libvirt.org/formatdomain.html#elementsCPUTuning
emulator_period - The value should be in range [1000, 1000000]. A period with value 0 means no value.
emulator_quota -The value should be in range [1000, 18446744073709551] or less than 0. A quota with value 0 means no value.

Version-Release number of selected component (if applicable):
libvirt-1.0.3-1.el7.x86_64
qemu-kvm-1.4.0-1.el7.x86_64


How reproducible:
100% 

Steps to Reproduce:
# virsh dumpxml test
<domain type='kvm' id='37'>
 .....
  <cputune>
    <emulator_period>500</emulator_period>
    <emulator_quota>500</emulator_quota>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='2'/>

  </cputune>
.....
</domain>

# virsh schedinfo test
Scheduler      : posix
cpu_shares     : 0
vcpu_period    : 0
vcpu_quota     : 0
emulator_period: 500
emulator_quota : 500

Comment 2 Peter Krempa 2013-04-02 12:50:57 UTC
Fixed upstream:

commit f8e3221f9905972cf6d9aa78fd683f99e3bb13f3
Author: Peter Krempa <pkrempa>
Date:   Mon Mar 11 14:20:58 2013 +0100

    conf: Enforce ranges on cputune variables
    
    The limits are documented at
    http://libvirt.org/formatdomain.html#elementsCPUTuning . Enforce them
    when going through XML parsing in addition to being enforced by the API.

Moving to POST.

Comment 3 Peter Krempa 2013-04-02 14:36:01 UTC
git desc: v1.0.4-6-gf8e3221

Comment 4 Luwen Su 2013-05-08 03:53:50 UTC
Test with
libvirt-1.0.5-1.el7.x86_64

1.
<cputune>
    <emulator_period>500</emulator_period>
    <emulator_quota>1000</emulator_quota>
</cputune>

error: unsupported configuration: Value of cputune emulator_period must be in range [1000, 1000000]
Failed. Try again? [y,n,f,?]:

2.
<cputune>
    <emulator_period>1000</emulator_period>
    <emulator_quota>500</emulator_quota>
</cputune>

error: unsupported configuration: Value of cputune emulator_quota must be in range [1000, 18446744073709551]
Failed. Try again? [y,n,f,?]:


So set it Verify

Comment 5 Ludek Smid 2014-06-13 09:34:37 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.