Bug 1498478

Summary: [Bug RHV 4.1.7] VM snapshots "clone" button doesn't work.
Product: Red Hat Enterprise Virtualization Manager Reporter: Sachin Raje <sraje>
Component: ovirt-engineAssignee: Yanir Quinn <yquinn>
Status: CLOSED ERRATA QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.6CC: kmashalk, lsurette, marco.vanraaij, michal.skrivanek, rbalakri, rhev-integ, Rhev-m-bugs, srevivo, tjelinek, tnisan, ykaul, ylavi, yquinn
Target Milestone: ovirt-4.1.7   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-07 17:27:54 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
ui.log none

Description Sachin Raje 2017-10-04 12:28:57 UTC
Created attachment 1334215 [details]
ui.log

Description of problem:
VM snapshots "clone" button doesn't work

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

How reproducible:
Always


Steps to Reproduce:
1. Create a VM with disk.
2. Create a snapshot.
3. Select the new snapshot created.
4. Select the snapshot and click on "clone"

Actual results:
The rhvm portal opens the error dialog box with below message in it,

==>>
Uncaught exception occurred. Please try reloading the page. Details: Exception caught: (TypeError) __gwt$exception: <skipped>: qib(...).e is null
Please have your administrator check the UI logs.
==>>

Expected results:
The vm clone from snapshot should work using RHVM GUI.

Additional info:
The ui.log attached.

Comment 2 Tomas Jelinek 2017-10-05 09:51:49 UTC
This regression has been introduced by https://gerrit.ovirt.org/#/c/80695/ in 4.1.6.

The reason is that the CloneVmFromSnapshotModelBehavior is an ExistingVmModelBehavior but initially has the VM set to null.
Hence, the isHostedEngine() code in UnitVmModel fails on NPE if the getVmConfigurationBySnapshot returns later than the AbstractVmPopupWidget.edit() gets called.

Comment 4 Yanir Quinn 2017-10-15 09:58:17 UTC
fixed on 4.2 : https://bugzilla.redhat.com/show_bug.cgi?id=1491230 
(currently on QA)  
mark as duplicate / downport to 4.1.6 minor if needed

Comment 5 Yaniv Kaul 2017-10-15 10:10:31 UTC
(In reply to Yanir Quinn from comment #4)
> fixed on 4.2 : https://bugzilla.redhat.com/show_bug.cgi?id=1491230 
> (currently on QA)  
> mark as duplicate / downport to 4.1.6 minor if needed
4.1.7.

Please use this one then to fix in 4.1.7 (if it's an easy backport?)

Comment 6 Yanir Quinn 2017-10-15 11:16:57 UTC
yes, should be an easy backport (partial pick from https://gerrit.ovirt.org/#/c/82123/)

Comment 7 rhev-integ 2017-10-20 13:18:32 UTC
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found clone flags: ['rhevm-4.1.z', 'rhevm-4.2-ga'], ]

For more info please contact: rhv-devops: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found clone flags: ['rhevm-4.1.z', 'rhevm-4.2-ga'], ]

For more info please contact: rhv-devops

Comment 8 Yaniv Kaul 2017-10-20 17:58:29 UTC
(In reply to rhev-integ from comment #7)
> WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following
> reason:
> 
> [Found clone flags: ['rhevm-4.1.z', 'rhevm-4.2-ga'], ]
> 
> For more info please contact: rhv-devops: Bug status wasn't
> changed from MODIFIED to ON_QA due to the following reason:
> 
> [Found clone flags: ['rhevm-4.1.z', 'rhevm-4.2-ga'], ]
> 
> For more info please contact: rhv-devops

Yanir, I've removed the 4.2 flag - please make sure this is in the erratum for 4.1.7.

Comment 10 Artyom 2017-10-24 07:48:51 UTC
Steps:
1) Create new VM
2) Start the VM
3) Create snapshot on the VM(with memory)
4) Choose snapshot and click clone button
5) VM creation from snapshot succeeded
6) Start new VM

Verified on rhevm-4.1.7.4-0.1.el7.noarch

Comment 12 errata-xmlrpc 2017-11-07 17:27:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHEA-2017:3138