Created attachment 1176020 [details] VM Reconfigure memory screen shot Description of problem: On the attached screen shot, CFME VM Reconfigure memory current look. It shows a "Between 4MB and 2048GB" limitation, however: 1. This limitation is not obeyed. For example, it is possible to send a request, for VM memory hot add, for 32,000 MB, and this request is passed on RHEV, and fail there on: "Failed to hot set memory to VM istein. Underlying error message: internal error: unable to execute QEMU command 'object-add': cannot set up guest memory 'memdimm1': Cannot allocate memory" * note: In RHEV future versions, in case VM memory hot add is set to a memory larger than host's available memory (like in the above 32,000 MB setting), another failure will be generated. 2. It do not comply with the limitation appearing on RHEVM UI: limitation is 1M-2147483647M 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 Expected results: VM memory set limitation should fit the RHEV limitation, and should be forced.
Apparently the memory of 32,000MB IS within the limit of 4MB-2048GB, therefore having this value accepted is OK. The request itself, fail on "Error: divided by 0", while on RHEV it fails on: "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 'memdimm0': Cannot allocate memory" This problem, of RHEV error not propagating to CFME is handled in bug 1352566. The existing Memory limits are: On RHEV 1MB-2048GB, On CFME 4MB-2048GB Not exactly the same, but quite close.
Memory value, on CFME, must be a multiple of 4, in case of cold/hot memory add/remove. Memory value, on RHEV, is not restricted to be a specific multiple for cold add/remove memory, but must be a multiple of 256 for hot add memory: If the memory hot add is not to a value that is a multiple of 256, there is event Error: "Failed to hot set memory to VM vm. Underlying error message: Cannot hot set memory VM. Plugged memory must be multiplication of 256." Therefore, it is OK that on CFME for memory hot add, the memory value set is not to a multiple of 256, as it is the same behavior in RHEV side. Only need to have the above error passed to CFME, as currently memory hot add from CFME fail on "Error: divided by 0" (this is handled by bug 1352566, comment #7)
Juan, is your patch handling this one as well?
This is the pull request that I prepared to avoid the 256 MiB multiple error: Adjust memory reconfiguration for oVirt https://github.com/ManageIQ/manageiq/pull/12550 It addresses all the situations where the requested memory increase is not a multiple of 256 MiB, and it does so by adjusting the requested memory size to a multiple of 256 Mib. For example, if you have a virtual machine with 100 MiB and you change it to 32000 MiB, then it will be adjusted as follows: delta = 32000 - 100 = 31900 remainder = delta % 256 = 31900 % 256 = 156 adjustment = 256 - remainder = 100 So the request will be adjusted by 100 MiB, so instead of requesting 32000 MiB ManageIQ will request to RHV a request to increase by 32100 MiB. This algorithm works also when decreasing the memory, but hot unplugging memory isn't currently supported by RHV, it is just ignored. So, the 256 MiB error message won't be propagated to ManageIQ, because it will be avoided. Not sure if that qualifies as an acceptable solution for this bug. Ilanit, what do you think?
In this bug several issues are mentioned: 1. Memory limits on RHV: 1M-2048G, and on CFME: 4M-2048G As these 2 ranges are close, I am not sure if this will be fixed. 2. When RHV fail to memory hot plug to a value that is not a multiply of 256M This is addressed in https://github.com/ManageIQ/manageiq/pull/12550 3. Memory hot add trial to a value, higher than the host available memory, fail on RHV: "Failed to hot set memory to VM istein. Underlying error message: internal error: unable to execute QEMU command 'object-add': cannot set up guest memory 'memdimm1': Cannot allocate memory" This request, on CFME side, fail on: Error: [Cannot edit VM. Physical Memory Guaranteed cannot exceed Memory Size.] [CFME-5.7.0.10, RHV-3.6.8-0.1] Juan, Do we have a fix for 3.?
(In reply to Ilanit Stein from comment #6) > In this bug several issues are mentioned: > > 1. Memory limits on RHV: 1M-2048G, and on CFME: 4M-2048G > As these 2 ranges are close, I am not sure if this will be fixed. > > 2. When RHV fail to memory hot plug to a value that is not a multiply of 256M > This is addressed in https://github.com/ManageIQ/manageiq/pull/12550 > > 3. Memory hot add trial to a value, higher than the host available memory, > fail on RHV: > "Failed to hot set memory to VM istein. Underlying error message: internal > error: unable to execute QEMU command 'object-add': cannot set up guest > memory 'memdimm1': Cannot allocate memory" > > This request, on CFME side, fail on: > Error: [Cannot edit VM. Physical Memory Guaranteed cannot exceed Memory > Size.] > > [CFME-5.7.0.10, RHV-3.6.8-0.1] > > Juan, > Do we have a fix for 3.? There is no support to restrict feature invocation based on the provider version on manageiq infrastructure. I'll add a DOC_TEXT with a comment on bug 1356468 saying that unplug of CPU on RHV provider 3.6 and lower isn't supported. We can revisit this issue once a comprehensive solution is provided to support features on manageiq based on the provider version.
Hi Ilanit My understanding is that of the three issues that are mentioned in this bug (see comment 6), second one is addressed by bug 1356468. The first isn't an issue. The third will be addressed by a release note on bug 1356468. Based on that I think this can be closed. What do you think?
(In reply to Oved Ourfali from comment #8) > Hi Ilanit > > My understanding is that of the three issues that are mentioned in this > bug (see comment 6), second one is addressed by bug 1356468. The > first isn't an issue. The third will be addressed > by a release note on bug 1356468. > Based on that I think this can be closed. > > What do you think? The fixed for bug 1356468 will address the third bullet from comment 3. The result of hot-plug memory of a 3.6 will end up with a successful update action, but there will be an event to the audit-log saying the hot-plug action failed and the rhevm-ui will indicate the changes will take affect only after the next vm reboot. *** This bug has been marked as a duplicate of bug 1356468 ***