Bug 1047234
Summary: | virsh command numatune accept integer as mode type. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Hao Liu <hliu> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | acathrow, dyuan, hliu, jeder, jmiao, mzhan, pkrempa, zsong |
Target Milestone: | rc | ||
Target Release: | 7.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.1.1-18.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-13 12:49:25 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: |
Description
Hao Liu
2013-12-30 02:19:29 UTC
Fixed upstream with: commit 6e7490c734a538983f9c5ae680cdb36edbaffe65 Author: Peter Krempa <pkrempa> Date: Mon Jan 6 14:26:14 2014 +0100 qemu: range check numa memory placement mode https://bugzilla.redhat.com/show_bug.cgi?id=1047234 Add a range check for supported numa memory placement modes provided by the user before setting them in the domain definition. Without the check the user is able to provide a (yet) unknown mode which is then stored in the domain definition. This potentially causes a NULL dereference when the defintion is formatted into the XML. To reproduce run: virsh numatune DOMNAME --mode 6 --nodeset 0 The XML will then contain: <numatune> <memory mode='(null)' nodeset='0'/> </numatune> With this fix, the command fails: error: Unable to change numa parameters error: invalid argument: unsupported numa_mode: '6' commit 8b573a6b0d1ee9d99862104f28fee8bc7f949a9d Author: Peter Krempa <pkrempa> Date: Mon Jan 6 14:11:42 2014 +0100 qemu: Clean up qemuDomainSetNumaParameters Add whitespace to separate logical code blocks, reformat error messages and clean up code flow. This patch changes error handling in some cases where the the loop would be continued to jump to cleanup instead and error out rather than modify the domain any further. This fix is VERIFIED on libvirt-1.1.1-18.el7.x86_64: Verifying steps: # virsh numatune test-vm numa_mode : strict numa_nodeset : # virsh numatune test-vm --mode 0 # virsh numatune test-vm numa_mode : strict numa_nodeset : # virsh numatune test-vm --mode 1 # virsh numatune test-vm numa_mode : preferred numa_nodeset : # virsh numatune test-vm --mode 2 # virsh numatune test-vm numa_mode : interleave numa_nodeset : # virsh numatune test-vm --mode 3 error: Unable to change numa parameters error: invalid argument: unsupported numa_mode: '3' # virsh numatune test-vm numa_mode : interleave numa_nodeset : # virsh numatune test-vm --mode -1 error: Unable to change numa parameters error: invalid argument: unsupported numa_mode: '-1' # virsh numatune test-vm numa_mode : interleave numa_nodeset : numatune on longer permit unsupported numa modes. so it's VERIFIED. Could reproduce it with above steps for libvirt-1.1.1-16.el7.x86_64. Have fixed and verified libvirt-1.1.1-23.el7.x86_64: # virsh numatune test-vm numa_mode : strict numa_nodeset : # virsh numatune test-vm --mode 0 # virsh numatune test-vm numa_mode : strict numa_nodeset : # virsh numatune test-vm --mode 1 # virsh numatune test-vm numa_mode : preferred numa_nodeset : # virsh numatune test-vm --mode 2 # virsh numatune test-vm numa_mode : interleave numa_nodeset : # virsh numatune test-vm --mode 3 error: Unable to change numa parameters error: invalid argument: unsupported numa_mode: '3' # virsh numatune test-vm numa_mode : interleave numa_nodeset : # virsh numatune test-vm --mode -1 error: Unable to change numa parameters error: invalid argument: unsupported numa_mode: '-1' # virsh numatune test-vm numa_mode : interleave numa_nodeset : 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. |