Bug 1459765 - [hotplug memory] on hot plug failure the configured memory is updated right away
[hotplug memory] on hot plug failure the configured memory is updated right away
Status: VERIFIED
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt (Show other bugs)
4.2.0
Unspecified Unspecified
medium Severity medium (vote)
: ovirt-4.2.0
: ---
Assigned To: jniederm
Israel Pinto
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-08 02:58 EDT by Israel Pinto
Modified: 2017-09-17 05:28 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+
rule-engine: blocker+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
logs_1 (390.50 KB, application/x-xz)
2017-06-08 03:03 EDT, Israel Pinto
no flags Details
screenshots (665.74 KB, application/x-xz)
2017-06-08 03:25 EDT, Israel Pinto
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 78019 master MERGED core: Increase memory of running VM by non-dividable value 2017-06-08 15:06 EDT

  None (edit)
Description Israel Pinto 2017-06-08 02:58:19 EDT
Description of problem:
Hotplug memory with memory not dividable by 256MB
The action failed but the memory is updated.

Version-Release number of selected component (if applicable):
oVirt Engine Version: 4.2.0-0.0.master.20170606135217.gita02bf9d.el7.centos


Steps to Reproduce:
1. Create VM and run it
2. Hot plug memory that is not divide by 256MB 


Actual results:
Action should failed and memory will not be updated

Expected results:
Action failed, memory is updated

Additional info:
Engine log: 
2017-06-08 09:33:27,401+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-4) [7026042f-a954-4bcf-b8a5-d53967869e54] EVENT_ID: FAILED_HOT_SET_MEMORY_NOT_DIVIDABLE(2,048), Failed to hot plug memory to VM memory_hotplug_check. Amount of added memory (297MB) is not dividable by 256MB.
Comment 2 Israel Pinto 2017-06-08 03:03 EDT
Created attachment 1285992 [details]
logs_1
Comment 4 Michal Skrivanek 2017-06-08 03:21:39 EDT
that's over REST, right? In GUI there should be frontend validation.
If that's the case it sounds good enough to me...
Comment 5 Israel Pinto 2017-06-08 03:23:32 EDT
I happening in GUI and REST. 
In the UI you can see that the memory is update and the error in the event log.
Comment 6 Israel Pinto 2017-06-08 03:25 EDT
Created attachment 1286008 [details]
screenshots
Comment 7 Michal Skrivanek 2017-06-08 04:29:22 EDT
ah, right, IIRC we didn't do the validation since we do not know if the value is going to be hot plugged on dialog save or not.
Well, I guess this will have to stay like this, at least for a while...

Israel, how/why is it a regression?
Comment 8 Israel Pinto 2017-06-08 04:32:55 EDT
It regression since we did not update the memory. 
I don't understand, you failed the action and still update the VM memory and it ok
I think you missing the point it should not be updated. 
I 4.1 and less versions we did not update the memory.
Comment 9 Michal Skrivanek 2017-06-08 05:23:54 EDT
I have just tested it behaves the same on 4.1
Comment 10 Israel Pinto 2017-06-08 06:47:10 EDT
I recheck it with Red Hat Virtualization Manager Version: 4.1.3-0.1.el7
and we get the error (different one see below) and the memory is not updated.
see old message:
"Failed to hot set memory to VM golden_env_mixed_virtio_5. Underlying error message: Cannot hot set memory VM. Plugged memory must be multiplication of 256."

So it broken after this version and it regression.
Can update the version to 4.1.3.3, Or leave it in 4.2 ?
Comment 11 Michal Skrivanek 2017-06-08 06:51:27 EDT
I tested that on 4.1.2.1-0.1.el7. Yes, the event is there, and it's supposed to be, so that's ok. But I do see the memory is updated. Hence it's not a regression.

When exactly you see/do not see it updated in your 4.2 test? Right after closing the dialog?
Comment 12 Israel Pinto 2017-06-08 07:30:47 EDT
I test it with Red Hat Virtualization Manager Version: 4.1.2.3-0.1.el7
and the memory is not updated.
I know this should be the behavior we testing it from 3.6 and now in 4.2 
the message is changed and the memory is update.
So it change of behavior.
It your call here I think we have regression. It don't makes sense to failed the action and update the VM.
Comment 13 Michal Skrivanek 2017-06-08 07:41:41 EDT
So again per my testing the behavior is the same on 4.1 and 4.2
- update the value in dialog
- apply immediately
- error is logged in the event log & VM gets the pending changes icon, the General subtab of VM shows the old value.
- after power cycle of that VM the pending changes are applied and new amount of memory is shown/applied

which exact thing is behaving differently for you? (except the change in the error message text)
Comment 14 Israel Pinto 2017-06-08 07:48:40 EDT
(In reply to Michal Skrivanek from comment #13)
> So again per my testing the behavior is the same on 4.1 and 4.2
> - update the value in dialog
> - apply immediately
> - error is logged in the event log & VM gets the pending changes icon, the
> General subtab of VM shows the old value.
> - after power cycle of that VM the pending changes are applied and new
> amount of memory is shown/applied
Power cycle is not relevant here, it hotplug memory not power cycle of the VM.
If we doing power cycle it not hotplug.  
> which exact thing is behaving differently for you? (except the change in the
> error message text)

when you doing the hotplug you see that the VM memory is not update (without power cycle)?
In 4.2 the memory is update right away.
Comment 15 Michal Skrivanek 2017-06-08 08:07:16 EDT
Aaah, finally I understand what you mean. Yes, in 4.2 it is updated right away. It should not be, it should be part of the next run configuration instead
Thanks!
Comment 16 Red Hat Bugzilla Rules Engine 2017-06-08 08:07:21 EDT
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 17 Israel Pinto 2017-07-16 10:14:29 EDT
Verify with:
oVirt Engine Version: 4.2.0-0.0.master.20170714185626.git9418884.el7.centos

Steps:
1. Create VM and run it
2. Hot plug memory that is not divide by 256MB 

Results:
Failed to hotplug VM
Event log:
Failed to hot plug memory to VM clud-init. Amount of added memory (1031MB) is not dividable by 256MB.

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