Bug 1944641 - Not selecting Apply later option after editing running VM still triggers VM next run configuration
Summary: Not selecting Apply later option after editing running VM still triggers VM n...
Keywords:
Status: CLOSED DUPLICATE of bug 1779983
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.4.5.11
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Liran Rotenberg
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-30 11:49 UTC by Ivana Saranova
Modified: 2021-04-25 15:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-22 12:55:26 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)

Description Ivana Saranova 2021-03-30 11:49:47 UTC
Description of problem:
When editing a running VM and changing for example memory size, user gets a pop-up dialog, after trying to save, informing him that the changes can be applied immediately. There is also a checkbox for Apply later which suggests that the changes can be applied later with a VM next run configuration. However, if user does NOT check the Apply later option, VM still goes into the VM next run configuration.

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

How reproducible:
Always

Steps to Reproduce:
1. Have a running VM
2. Go to Edit VM and change memory size (e.g. 1024 -> 2048)
3. Try to save the changes
4. Pop-up dialog appears with text that changes can be applied immediately, do NOT check the Apply later option and submit
5. Check that VM is not in VM next run configuration as the changes should have been applied immediately

Actual results:
VM next run configuration icon is present and specifies that memory size has been changed and VM needs to be rebooted to apply the changes. 

Expected results:
Changes are applied immediately, no VM next run configuration is shown. 

Additional info:

Comment 1 Michal Skrivanek 2021-03-31 07:53:35 UTC
logs never hurt even if it is easy to reproduce. Please attach

Comment 2 Arik 2021-04-04 07:42:18 UTC
Probably due to changes of the max memory which requires restart but need to check

Comment 3 Arik 2021-04-05 08:56:49 UTC
(In reply to Arik from comment #2)
> Probably due to changes of the max memory which requires restart but need to check

No, that's unrelated to the max memory configuration (although the UI tries to update the max-memory also when the VM is powering up which seems like a bug).

We have the following comment in the code that sets the next-run configuration in this case:
"Annotation EditableVmField defines VmBase#memSizeMb as hot settable however the snapshot is needed
* while increasing memory since hotplug is only allowed for certain values (multiples of 256MiB by default)
* while decreasing memory since hot unplug is only allowed from REST (not allowed from Edit VM dialog)
* when VM is not in state {@link VMStatus#Up} or {@link VMStatus#Down} since memory hot (un)plugs can only be done in state Up"

This bug is related to the first case of hot-plug - we create the next run snapshot also in case the difference is a multiply of 256MiB

Comment 5 Arik 2021-04-12 11:41:39 UTC
let's start with checking what's the memory-size in vm_static after the hot-plug

Comment 6 Liran Rotenberg 2021-04-18 15:13:34 UTC
The properties on the DB updates on the update command. On shutdown the new DIMM device is unmanaged and will be dropped on the next run command.
There is no need of the next-run configuration. We should check if the added value is divided by 256 and if it does don't invoke the next run snapshot creation.

Comment 7 Arik 2021-04-22 12:55:26 UTC

*** This bug has been marked as a duplicate of bug 1779983 ***


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