Bug 854537

Summary: libvirt isn't checking values emulator_period and emulator_quota in XML
Product: Red Hat Enterprise Linux 6 Reporter: Peter Krempa <pkrempa>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: acathrow, ajia, cwei, dallan, dyuan, honzhang, mzhan, shyu
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 854133
: 947400 (view as bug list) Environment:
Last Closed: 2014-04-04 21:00:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 854133    
Bug Blocks: 947400    

Description Peter Krempa 2012-09-05 09:49:55 UTC
+++ This bug was initially created as a clone of Bug #854133 +++

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-0.10.1-1.el6.x86_64
qemu-kvm-0.12.1.2-2.305.el6.x86_64


How reproducible:
100% 

Steps to Reproduce:
# virsh dumpxml rhel6.2
<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 rhel6.2
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1

Comment 2 Jiri Denemark 2012-09-05 14:15:28 UTC
*** Bug 854536 has been marked as a duplicate of this bug. ***

Comment 5 Peter Krempa 2013-04-02 12:51:30 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 9 RHEL Program Management 2014-04-04 21:00:41 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.