Bug 996466
Summary: | Incorrect return value when setvcpus using invalid vcpu number. | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Hao Liu <hliu> | |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | |
Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 6.5 | CC: | acathrow, codong, dyuan, hliu, lsu, mzhan, pkrempa | |
Target Milestone: | rc | Keywords: | Upstream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 996552 (view as bug list) | Environment: | ||
Last Closed: | 2014-04-04 20:57:27 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: | 996552 |
Description
Hao Liu
2013-08-13 08:29:14 UTC
Fixed upstream with: commit 3abb6ec077f7fdc9ac9969b5c33f2c2d270903f3 Author: Peter Krempa <pkrempa> Date: Tue Aug 13 11:14:56 2013 +0200 virsh-domain: Flip logic in cmdSetvcpus To avoid having to assign a failure code to the returned variable switch this function to negative logic. This will fix issue with invalid number of cpus returning success return code. https://bugzilla.redhat.com/show_bug.cgi?id=996466 I can repruduce this with: # rpm -qa libvirt kernel qemu-kvm qemu-kvm-0.12.1.2-2.401.el6.x86_64 kernel-2.6.32-412.el6.x86_64 libvirt-0.10.2-23.el6.x86_64 Invalid value # virsh setvcpus rhel6.4 asdf error: Invalid number of virtual CPUs # echo $? 0 # virsh setvcpus rhel6.4 --count -1 --config error: Invalid number of virtual CPUs # echo $? 0 # virsh setvcpus rhel6.4 --count -1 error: Invalid number of virtual CPUs # echo $? 0 Result: Error message: error: Invalid number of virtual CPUs But the reture value is always 0. Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. |