Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1434941

Summary: Previewing 3.5 snapshot with memory on 4.1 setup should not be allowed
Product: [oVirt] ovirt-engine Reporter: Jiri Belka <jbelka>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.1.5CC: bugs, jbelka, mgoldboi, michal.skrivanek, tjelinek, tnisan
Target Milestone: ovirt-4.1.1-1Flags: tjelinek: ovirt-4.1?
mgoldboi: blocker+
tjelinek: planning_ack?
michal.skrivanek: devel_ack+
rule-engine: testing_ack+
Target Release: 4.1.1.7   
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-04-21 09:37:11 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:

Description Jiri Belka 2017-03-22 16:36:51 UTC
Description of problem:

After I previewed a snapshot with memory of a VM which was done in 3.5 in 4.1 engine, VM subpane does not load for any VM in Virtual Machines maintab. Thus some actions are not available as they have its buttons in subpanes (working with snapshots etc...).

2017-03-22 17:31:32,374+01 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-4) [] Permutation name: 6999AFCA608A70C0583ACAF1556D15C9
2017-03-22 17:31:32,374+01 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-4) [] Uncaught exception: com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'qh' of null
        at java.lang.Throwable.fillInStackTrace(Throwable.java:114) [rt.jar:1.8.0_121]
        at java.lang.RuntimeException.RuntimeException(RuntimeException.java:32) [rt.jar:1.8.0_121]
        at com.google.web.bindery.event.shared.UmbrellaException.UmbrellaException(UmbrellaException.java:70) [gwt-servlet.jar:]
        at com.google.gwt.event.shared.UmbrellaException.UmbrellaException(UmbrellaException.java:25) [gwt-servlet.jar:]
        at com.google.gwt.event.shared.HandlerManager.$fireEvent(HandlerManager.java:117) [gwt-servlet.jar:]
        at com.google.gwt.view.client.SelectionChangeEvent.fire(SelectionChangeEvent.java:67) [gwt-servlet.jar:]
        at org.ovirt.engine.ui.common.widget.table.OrderedMultiSelectionModel.$resolveChanges(OrderedMultiSelectionModel.java:115)
        at org.ovirt.engine.ui.common.widget.table.OrderedMultiSelectionModel.fireSelectionChangeEvent(OrderedMultiSelectionModel.java:108)
        at com.google.gwt.view.client.SelectionModel$AbstractSelectionModel$1.execute(SelectionModel.java:128) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:164) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.SchedulerImpl.$flushFinallyCommands(SchedulerImpl.java:270) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.Impl.exit(Impl.java:378) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:335) [gwt-servlet.jar:]
        at Unknown.eval(webadmin-0.js@54)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) 


Version-Release number of selected component (if applicable):
ovirt-engine-webadmin-portal-4.1.1.5-0.1.el7.noarch

How reproducible:
just happens

Steps to Reproduce:
1. have 3.5 cluster compat in 3.6 engine
2. create a VM and do its snapshot
3. upgrade till 4.1 engine with 4.1 cluster while the VM is running
4. preview snapshots
5. click on VMs in 'Virtual Machines' maintab and see if you can subpanes show

Actual results:
no VMs' subpanes are loaded, UI exception

Expected results:
should work

Additional info:
during preview there's info informing the snapshot was done in 3.5...

Comment 2 Jiri Belka 2017-03-22 17:19:58 UTC
We made UI working with "undoing" snapshot via API.

POST /ovirt-engine/api/vms/93c23ce0-de80-4abb-bd4d-2067caa7e071/undosnapshot

Comment 3 Tal Nisan 2017-03-23 09:02:55 UTC
Seems like this is the root cause:

Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'qh' of null
	at org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.$hasSpiceSupport(AsyncDataProvider.java:2694)

Comment 4 Jiri Belka 2017-03-23 10:15:41 UTC
(In reply to Jiri Belka from comment #2)
> We made UI working with "undoing" snapshot via API.
> 
> POST /ovirt-engine/api/vms/93c23ce0-de80-4abb-bd4d-2067caa7e071/undosnapshot

and this is wrkaround for ovirt-shell:

[oVirt shell (connected)]# action vm $vmname undo_snapshot

Comment 5 Jiri Belka 2017-03-23 10:22:55 UTC
FYI previewing snapshot from 3.5 time without memory doesn't break UI, at least not yet...

Comment 6 Michal Skrivanek 2017-03-23 13:04:44 UTC
this is an upgrade experience issue
it causes serious problems for backend since the code dealing with <3.6 VMs has been removed

Will push a simple hot fix to 4.1.1-1 to block <3.6
Better fix will come later - disallow restore with memory of VMs taken in no-longer-supported cluster levels.

Comment 7 Tomas Jelinek 2017-03-23 13:13:48 UTC
The problem is that it is allowed to restore memory snapshots from older versions than supported. Could you please check if you run this:

insert into vdc_options values(12345, 'IsMemorySnapshotSupported', {"undefined": "false", "x86_64": "false", "ppc64" : "false" } , '3.5');

and restart the engine, the memory snapshot will not be restorable for this VM?

Comment 8 Tomas Jelinek 2017-03-23 13:43:33 UTC
OK, it did not help.

Comment 9 Jiri Belka 2017-04-07 13:23:02 UTC
ok, rhevm-4.1.1.8-0.1.el7.noarch

Error while executing action:
el6-1:
    Cannot preview Snapshot. Memory cannot be restored because it is originated from Cluster Compatibility Version that is no longer supported: 3.5.0.0.