Bug 1352566

Summary: RHEV VM Reconfigure: Hot VM memory Hot add/remove succeed, but give Error: "divided by 0"
Product: Red Hat CloudForms Management Engine Reporter: Ilanit Stein <istein>
Component: ProvidersAssignee: Moti Asayag <masayag>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: jfrey, jhardy, obarenbo, oourfali
Target Milestone: GA   
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rhev
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-04 12:56:53 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:
Attachments:
Description Flags
evm.log: VM hot add memory request egrep.
none
evm.log: VM hot remove memory request egrep. none

Description Ilanit Stein 2016-07-04 11:17:36 UTC
Description of problem:
VM Reconfigure: VM Hot add/remove memory request, fail on Error: divided by 0.

On RHEV side,
For VM Hot add memory, the memory is indeed increased to the desired size.
For VM Hot remove, the following expected event appear: 
Failed to hot set memory to VM <vm name>. Underlying error message: Hot un-plugging memory is not supported for cluster version 3.6 and architecture x86_64. 

Version-Release number of selected component (if applicable):
CFME 5.6.0.11-rc2.2.20160614152915_f315c68
RHEVM-3.6.6.2-0.1.el6

How reproducible:
100%

Comment 2 Ilanit Stein 2016-07-04 11:36:44 UTC
Not sure why, and if this is a general case in CFME:
CFME request for VM Reconfigure memory add/remove,
Under Services->Requests, "last update" tab, display a certain time, 
while in evm.log, records on the same request, continue for 2-3 min afterwards.

Comment 3 Ilanit Stein 2016-07-04 11:38:18 UTC
Created attachment 1175969 [details]
evm.log: VM hot add memory request egrep.

Comment 4 Ilanit Stein 2016-07-04 11:39:19 UTC
Created attachment 1175972 [details]
evm.log: VM hot remove memory request egrep.

Comment 5 Ilanit Stein 2016-07-05 12:58:40 UTC
Please propagate the RHEV Error messages 
(like "Failed to hot set memory to VM <vm name>. Underlying error message: Hot un-plugging memory is not supported for cluster version 3.6 and architecture x86_64.") to CFME.

Comment 6 Ilanit Stein 2016-07-13 15:10:39 UTC
Another example, when configuring memory hot add to a size larger than hosts's free memory. 
The request on CFME side fail on "Error: divided by 0", while on rhev side,
the event error is:
"Failed to hot set memory to VM <vmname>. Underlying error message: internal error: unable to execute QEMU command 'object-add': cannot set up guest memory 'memdimm1': Cannot allocate memory"

Comment 7 Ilanit Stein 2016-07-14 06:30:41 UTC
Another example, when configuring memory hot add to a size that is not a multiply of 256: "Failed to hot set memory to VM <vmname>. Underlying error message: Cannot hot set memory VM. Plugged memory must be multiplication of 256."

All the errors (and other errors if any), should be propagated to CFME.

Comment 8 Moti Asayag 2016-08-04 12:55:32 UTC
PR [1] should fix this bug as well.

https://github.com/ManageIQ/ovirt/pull/59/

Please verify.

Comment 9 Ilanit Stein 2016-09-21 10:15:24 UTC
Tested on 5.7.0.1.20160913164703_66caf07:

1. For  RHV-4.0.4.2-0.1.el7ev, 
where VM memory hot remove is supported,
Both memory hot add & remove succeed on RHV side & CFME side.
(There seem to be a RHV bug, yet opened, that guaranteed memory is updated to the same value as the physical memory)

2. For RHEVM-3.6.8-0.1,
where VM memory hot remove is not supported,

* VM memory hot remove fail on RHEVM side:
"Failed to hot set memory to VM test_prov_order_1. Underlying error message: Hot un-plugging memory is not supported for cluster version 3.6 and architecture x86_64."
But on CFME this request end up with message:
"VM Reconfigure complete"
In this case VM had memory of 1024M, and guaranteed memory 512M, and I tried to chenge memory from 1024M to 512M.

* VM memory hot add, from 1024M to 2048M,
failed on RHEVM side on:
" Failed to hot set memory to VM test_prov_order_1. Underlying error message: Cannot hot set memory VM. Plugged memory must be multiplication of 256."
and on CFME side on:
"Error: [Cannot edit VM. Physical Memory Guaranteed cannot exceed Memory Size.]"

Comment 10 Ilanit Stein 2016-09-22 09:30:24 UTC
It seems the issues mentioned in comment #9, cannot be addressed on CFME side.  The bug in the description is resolved, therefore, moving bug to verified.

Comment 12 errata-xmlrpc 2017-01-04 12:56:53 UTC
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.

https://rhn.redhat.com/errata/RHBA-2017-0012.html