Bug 1346960

Summary: Creating template from VM snapshot causes FE ClassCastException
Product: [oVirt] ovirt-engine Reporter: jniederm
Component: Frontend.WebAdminAssignee: Phillip Bailey <phbailey>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: bugs, dfediuck, lsvaty, phbailey
Target Milestone: ovirt-4.1.0-alphaFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
dfediuck: devel_ack+
lsvaty: testing_ack+
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:45:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
stacktrace.txt none

Description jniederm 2016-06-15 17:52:47 UTC
Created attachment 1168465 [details]
stacktrace.txt

Description of problem:
Creating template from VM snapshot causes frontend ClassCastException:
UnitVmModel.updateLabelList shouldn't be probably called from UnitVmModel constructor since it uses `isNew` property which may not be set when constructor is called. Calling if from UnitVmModel.initialize() may be enough. See VmSnapshotListModel#cloneTemplate.

Version-Release number of selected component (if applicable):
4.1 master, commit 42756c6

How reproducible:
100%

Steps to Reproduce:
1. Create a snapshot of some VM
2. Select the snapshot
3. Click "Make template"

Actual results:
FE exception thrown, dialog shown with progress circle

Additional notes:
See bug 1346095 which also prevents creating a template from vm snapshot.

Comment 1 jniederm 2016-06-16 13:14:55 UTC
@Doron: it is in a virt dialog but the regression has been introduced by
https://gerrit.ovirt.org/#/c/57903
which adds an SLA feature of "affinity labels" -> moving back to SLA

Comment 2 Sandro Bonazzola 2016-12-12 14:03:38 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 3 Lucie Leistnerova 2017-01-03 11:40:02 UTC
I tried to create snapshot from stopped/running VM, without/with memory. Making template from it was without error and successful. Also template from already created snapshot is OK.

verified in ovirt-engine-webadmin-portal-4.1.0-0.3.beta2.el7.noarch