Bug 1101060

Summary: virsh vcpupin need accurate error message when --vcpu argument is negative
Product: Red Hat Enterprise Linux 6 Reporter: Jincheng Miao <jmiao>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.7CC: acathrow, dyuan, honzhang, jdenemar, mzhan, xuzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1101059 Environment:
Last Closed: 2014-05-26 07:45:50 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: 1101059    
Bug Blocks:    

Description Jincheng Miao 2014-05-26 03:32:28 UTC
+++ This bug was initially created as a clone of Bug #1101059 +++

Description of problem:
virsh vcpupin treats all --vcpu argument as signed, and it only check if
vcpu value is bigger than max vcpu.
But virDomainPinVcpu only accepts unsigned vcpu from argument.
So vcpupin to a negative value will get an inaccurate error "numerical overflow".

Version-Release number of selected component (if applicable):
libvirt-1.1.1-29.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. set an negative value to --vcpu

# virsh vcpupin r7 -1 0
error: numerical overflow: input too large: 4294967295

There is no reason to tell the user that he just inputed a large number '4294967295'.

Expect result:
# virsh vcpupin r7 -1 0
error: vcpupin: Invalid vCPU number.

Comment 3 RHEL Program Management 2014-05-26 07:45:50 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.