Bug 854133
Summary: | libvirt should check the range of emulator_period and emulator_quota when set them with --config | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | hongming <honzhang> | |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 6.4 | CC: | acathrow, ajia, dyasny, dyuan, mzhan, rwu, ydu, yupzhang | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-0.10.2-0rc1.el6 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 854536 854537 (view as bug list) | Environment: | ||
Last Closed: | 2013-02-21 07:23:06 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: | ||||
Bug Blocks: | 854536, 854537 |
Description
hongming
2012-09-04 07:10:44 UTC
Another related issue visible in step 6 is that libvirtd is silently ignoring values in emulator_{period,quota}. API range checking added upstream with: commit 972e914f59aa90bb727c4b5596e77f7bacdeb703 Author: Peter Krempa <pkrempa> Date: Tue Sep 4 15:17:07 2012 +0200 qemu: Add range checking for scheduler tunables when changed by API The quota and period tunables for cpu scheduler accept only a certain range of values. When changing the live configuration invalid values get rejected. This check is not performed when changing persistent config. This patch adds a separate range check, that improves error messages when changing live config and adds the check for persistent config. This check is done only when using the API. It is still possible to specify invalid values in the XML. The range checking commit exposed a problem in virsh that was updating all tunables not the only that were changed by the user, so if an invalid configuration was present in the XML (that is still lacking range checking) users could not set the new values. This issue is fixed upstream with: commit 51907779ee025e6edf4125cf4b4f35e279e2f6e2 Author: Peter Krempa <pkrempa> Date: Wed Sep 5 14:41:25 2012 +0200 virsh: Update only changed scheduler tunables When setting the cpu tunables in virsh you are able to update only a subset of them. Virsh while doing the update updated all of the tunables, changed ones with new values and unchanged with old ones. This is unfortunate as it: a) might overwrite some other change by a race condition (unprobable) b) fails with range checking as some of the old values saved might be out of range This patch changes the update procedure so that only the changed value is updated on the host. This patch also fixes a very unprobable memory leak if the daemon would return a string tunable parameter, as the typed parameter array was not cleared. I also opened bug https://bugzilla.redhat.com/show_bug.cgi?id=854537 to remind to add range checking also to XML parsing, but that's a more difficult issue. I'm moving this bug to POST, the fix will be picked up by rebasing. Test with libvirt-0.10.2-0rc1.el6.x86_64. If set emulator_period to an integer(eg. 500, 1000...), the result is correct # virsh schedinfo aaa --set emulator_period=500 --config Scheduler : posix error: invalid argument: value of 'emulator_period' is out of range [1000, 1000000] # virsh schedinfo aaa --set emulator_period=1234 --config Scheduler : posix cpu_shares : 0 vcpu_period : 0 vcpu_quota : 0 emulator_period: 1234 emulator_quota : 0 but when set emulator_period to invalid value(such as 'aaa'), the result is: # virsh schedinfo aaa --set emulator_period=aaa --config Scheduler : posix and i think it also need check, right? For emulator_period, the result is same with emulator_period. The error isn't propagated to virsh when the value of the updated argument is not valid. I opened https://bugzilla.redhat.com/show_bug.cgi?id=882915 to track this issue. (In reply to comment #6) > The error isn't propagated to virsh when the value of the updated argument > is not valid. I opened https://bugzilla.redhat.com/show_bug.cgi?id=882915 to > track this issue. OK, then this bug can move to VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0276.html |