Bug 1523415

Summary: Error while executing action Edit VM properties: Internal Engine Error
Product: [oVirt] ovirt-engine Reporter: Evgheni Dereveanchin <ederevea>
Component: Frontend.WebAdminAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.2.0CC: bugs, lsvaty, mburman, michal.skrivanek
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
rule-engine: planning_ack+
michal.skrivanek: devel_ack+
lsvaty: testing_ack+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:45:02 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:
Attachments:
Description Flags
engine.log during VM edit attempt none

Description Evgheni Dereveanchin 2017-12-07 23:08:36 UTC
Description of problem:
When trying to update VM properties on 4.2, an engine error pops up and the change is not saved

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-1.el7.centos

How reproducible:
always

Steps to Reproduce:
1. upgrade Engine from 4.1 to 4.2 (still on 4.1 cluster level)
2. create new VM
3. try to update VM settings (change RAM/CPU/RNG/etc)

Actual results:
Error while executing action Edit VM properties: Internal Engine Error

Expected results:
changes applied successfully

Additional info:
will paste the stack trace in the next comment

Comment 1 Evgheni Dereveanchin 2017-12-07 23:11:55 UTC
Created attachment 1364525 [details]
engine.log during VM edit attempt

Comment 2 Evgheni Dereveanchin 2017-12-07 23:19:08 UTC
Note: this applies to VMs created before 4.2 as well, not just newly created ones.

Comment 3 Evgheni Dereveanchin 2017-12-08 00:19:50 UTC
I can also confirm that changing cluster and DC compatibility level to 4.2 makes the NPE go away so it is related to engine-4.2 updating VMs in 4.1 compatibility mode only.

Comment 4 Michal Skrivanek 2017-12-08 08:35:17 UTC
VmBaseDao::createBaseParametersMapper
.addValue("resume_behavior", entity.getResumeBehavior().toString())

plus

entity.setResumeBehavior(resumeBehavior == null ? null : VmResumeBehavior.valueOf(resumeBehavior))

=> bam

Comment 5 Tomas Jelinek 2017-12-11 09:43:04 UTC
in meanwhile a new branch have appeared, moving back to post until the patch will merged there

Comment 6 Michal Skrivanek 2017-12-11 12:30:33 UTC
I would include additional patch to fix OVF reader

Comment 7 Tomas Jelinek 2017-12-11 13:22:47 UTC
there is a small leftover issue that in some case the resume behavior is reported as a changed field requiring to restart the VM even if it did not change. Tracked here: https://bugzilla.redhat.com/show_bug.cgi?id=1524419

Comment 8 Jiri Belka 2017-12-18 14:31:17 UTC
ok, ovirt-engine-webadmin-portal-4.2.0.2-0.1.el7.noarch

Comment 9 Sandro Bonazzola 2017-12-20 11:45:02 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

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