Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1976333

Summary: Memory guaranteed size not live updated when changed alone
Product: [oVirt] ovirt-engine Reporter: Milan Zamazal <mzamazal>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Tamir <tamir>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4.7CC: ahadas, bugs, michal.skrivanek
Target Milestone: ovirt-4.5.0Flags: pm-rhel: ovirt-4.5?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, when changing Physical Memory Guaranteed without changing Memory Size, the Physical Memory Guaranteed didn't change after VM reboot as indicated by the administrator portal. Now, when changing Physical Memory Guaranteed without changing Memory Size, next-run configuration is created and the Physical Memory Guaranteed changes when the VM restarts
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-28 09:26:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milan Zamazal 2021-06-25 19:11:06 UTC
Description of problem:

When a VM is started with lower guaranteed memory than current memory and the guaranteed memory is later increased, the guaranteed memory is not increased immediately.

Version-Release number of selected component (if applicable):

4.4.7

How reproducible:

100%

Steps to Reproduce:
1. Start a VM with a higher Memory Size than Physical Memory Guaranteed.
2. Increase Physical Memory Guaranteed to the same value as Memory Size.

Actual results:

- The VM edit dialog announces on its closing that this change requires VM restart.
- Next run configuration is not indicated for the VM however.
- No call to Vdsm is performed.

Expected results:

- The guaranteed memory is set immediately as requested.
- Or, if it is not possible, next run configuration is indicated.

Additional info:

Note that Vdsm apparently doesn't allow adjusting guaranteed memory without hot plugging a memory device. A change in Vdsm is needed to allow live change of guaranteed memory without other memory changes.

Comment 1 Michal Skrivanek 2022-04-11 09:30:35 UTC
fix/close?

Comment 2 Arik 2022-04-12 17:15:13 UTC
(In reply to Milan Zamazal from comment #0)
> - Or, if it is not possible, next run configuration is indicated.

That's the expected result now

Comment 3 Sandro Bonazzola 2022-04-15 09:37:30 UTC
Can you please update doctext?

Comment 4 Tamir 2022-04-26 09:01:21 UTC
Verified on RHV 4.5.0-6.

Env:
    - Engine instance with RHV 4.5.0-6 (ovirt-engine-4.5.0.2-0.7.el8ev) and RHEL 8.6 installed.
    - 3 hosts with RHV 4.5.0-6 and RHEL 8.6 and with vdsm-4.50.0.12-1.el8ev.

Steps:

In Admin Portal:
1. Create a 4.7 data center and a 4.7 cluster with the CPU type "Secure Intel Broadwell Family".
2. Install the hosts and create a new NFS storage domain.
3. Create an RHEL VM with the memory configuration: Memory Size = 2048 MB, Maximum memory = 8192 MB, Physical Memory Guaranteed = 1024 MB.
4. Run the VM.
5. Edit the VM with Physical Memory Guaranteed = 2048 MB and press OK.
6. The following message will appear in a new modal:
"Pending Virtual Machine changes
Changes that require Virtual Machine restart:
Physical Memory Guaranteed"

7. In the VMs tab, Check that the VM has a warning sign next to it and when hovering over it, the following message appears: 
"Server with newer configuration for next run
Pending Virtual Machine changes:
Physical Memory Guaranteed".

8. Run the command "virsh dumpxml {VM_NAME}" in the host that the VM runs on.
9. In the command's output, check that the following lines appear:

    <ovirt-vm:memGuaranteedSize type="int">1024</ovirt-vm:memGuaranteedSize>
    <ovirt-vm:minGuaranteedMemoryMb type="int">1024</ovirt-vm:minGuaranteedMemoryMb>

10. Power off the VM.
11. Power On the VM.
12. Check that the same warning isn't shown on the VMs tab next to the VM.
13. Run the command "virsh dumpxml {VM_NAME}" in the host that the VM runs on.
14. In the command's output, check that the following lines appear:

    <ovirt-vm:memGuaranteedSize type="int">2048</ovirt-vm:memGuaranteedSize>
    <ovirt-vm:minGuaranteedMemoryMb type="int">2048</ovirt-vm:minGuaranteedMemoryMb>

Results (As Expected):
1. The 4.7 data center and the 4.7 cluster were created.
2. The hosts were installed and the NFS storage domain was created.
3. The VM was created.
4. The VM is running.
5. The VM was edited and the Physical Memory Guaranteed was set to 2048 MB.
6. The following message appears in a new modal:
"Pending Virtual Machine changes
Changes that require Virtual Machine restart:
Physical Memory Guaranteed"

7. In the VMs tab, the VM has a warning sign next to it and when hovering over it, the following message appears: 
"Server with newer configuration for next run
Pending Virtual Machine changes:
Physical Memory Guaranteed".

8. The command was run successfully.
9.  In the command's output, the following lines appear:

    <ovirt-vm:memGuaranteedSize type="int">1024</ovirt-vm:memGuaranteedSize>
    <ovirt-vm:minGuaranteedMemoryMb type="int">1024</ovirt-vm:minGuaranteedMemoryMb>

10. The VM is down.
11. The VM is up.
12. The warning next to the VM isn't shown anymore.
13. The command was run successfully.
14.  In the command's output, the following lines appear:

    <ovirt-vm:memGuaranteedSize type="int">2048</ovirt-vm:memGuaranteedSize>
    <ovirt-vm:minGuaranteedMemoryMb type="int">2048</ovirt-vm:minGuaranteedMemoryMb>

Comment 5 Sandro Bonazzola 2022-04-28 09:26:34 UTC
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022.

Since the problem described in this bug report should be resolved in oVirt 4.5.0 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.