Bug 1982065 - Invalid amount of memory is allowed to be hot plugged
Summary: Invalid amount of memory is allowed to be hot plugged
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.4.7.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ovirt-4.4.8
: ---
Assignee: Milan Zamazal
QA Contact: Qin Yuan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-14 06:30 UTC by Qin Yuan
Modified: 2021-08-19 06:23 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.4.8-1
Doc Type: Bug Fix
Doc Text:
It was sometimes possible to request hot plugging a memory of improperly aligned size, or to bypass memory hot plug size checks when using REST API. It could lead to confusions regarding the current amount of the VM memory and next run configuration wasn't sometimes indicated although it should be. The checks have been improved and such attempts are better validated now and next run configuration is set whenever needed. Additionally, when the previous memory changes require next run configuration, it's no longer possible to hot plug or unplug memory to avoid confusions about memory sizes.
Clone Of:
Environment:
Last Closed: 2021-08-19 06:23:00 UTC
oVirt Team: Virt
pm-rhel: ovirt-4.4+
ahadas: blocker-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 115459 0 master MERGED core: Improve memory hot plug/unplug size checks 2021-07-15 09:26:27 UTC

Description Qin Yuan 2021-07-14 06:30:37 UTC
Description of problem:
When hot plugging an invalid amount of memory, such as 400MB, which is not a multiple of 256MB, the memory size shown on Virtual Machines General page is increased by 400MB immediately, though the actual memory inside guest is not changed.

Besides, it requires to restart the VM, but there is no next run configuration icon on Virtual Machines page, and no Next run configuration snapshot on Snapshots page.


Version-Release number of selected component (if applicable):
ovirt-engine-4.4.7.6-0.11.el8ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create and run a VM with 1024MB memory.
2. Edit the running VM, update memory to 1424 MB.
3. Check memory size on engine side, and inside guest.

Actual results:
1. It requires to restart the VM, but there is no next run configuration icon on Virtual Machines page, and no Next run configuration snapshot on Snapshots page.
2. Memory size shown on engine side is changed to 1424MB.
3. Memory size inside guest is not changed. 

Expected results:
1. Engine should prevent the invalid amount of memory from being hot plugged.

Additional info:

Comment 1 RHEL Program Management 2021-07-15 06:33:23 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Qin Yuan 2021-08-13 04:11:16 UTC
Verified with:
ovirt-engine-4.4.8.3-0.10.el8ev.noarch

Steps and Results:
1. Create and run a VM with 1024MB memory.

2. Update memory to 1424MB via API:
<vm>
    <memory>1493172224</memory>
</vm>

   - Operation is prevented:
<fault>
    <detail>[Cannot edit VM. Amount of added memory (400MiB) is not dividable by 128MiB.]</detail>
    <reason>Operation Failed</reason>
</fault>

3. Edit the running VM on UI, update memory to 1424 MB:
   - VM memory size is not changed on engine side.
   - VM memory size is not changed inside guest.
   - There is next run configuration icon.

4. Edit the running VM on UI again, update memory to 2048MB:
   - Hot plug operation is prevented with error message: 
     Cannot hot change memory because memory next run configuration already exists.

Comment 3 Sandro Bonazzola 2021-08-19 06:23:00 UTC
This bugzilla is included in oVirt 4.4.8 release, published on August 19th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.8 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.