Bug 1020899

Summary: libvirt should throw error when tried to add the cpus if it has been already added
Product: [Community] Virtualization Tools Reporter: chandrashekar shastri <cshastri>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, pkrempa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-18 13:38:43 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:

Description chandrashekar shastri 2013-10-18 13:28:35 UTC
If the guest is already assigned with maxmimum cpus then if the user tries to assign to assign the same cpu then the libvirt should be handle it in a better way.

[root@phx2 qemu]# virsh vcpucount RHEL_WORKING 
maximum      config        20
maximum      live          20
current      config         9
current      live          20

[root@phx2 qemu]# virsh setvcpus RHEL_WORKING 20

[root@phx2 qemu]# echo $?
0
[root@phx2 qemu]# virsh vcpucount RHEL_WORKING 
maximum      config        20
maximum      live          20
current      config         9
current      live          20

[root@phx2 qemu]# virsh setvcpus RHEL_WORKING 20 --live 

[root@phx2 qemu]# echo $?
0
[root@phx2 qemu]#

Comment 1 chandrashekar shastri 2013-10-18 13:30:04 UTC
It should throw error or message saying that the guest is allocated with maximum number of cpus.

Comment 2 Peter Krempa 2013-10-18 13:38:43 UTC
The function sets the CPU count to the amount requested by the user. If the requested value is same as the previously used value, the semantics of the "set" operation are to keep the value and return success.

As this behaves as it was originally intended, I'm closing this as NOTABUG.