Bug 1434941 - Previewing 3.5 snapshot with memory on 4.1 setup should not be allowed
Summary: Previewing 3.5 snapshot with memory on 4.1 setup should not be allowed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.1.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.1-1
: 4.1.1.7
Assignee: Arik
QA Contact: Jiri Belka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-22 16:36 UTC by Jiri Belka
Modified: 2017-04-21 09:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:37:11 UTC
oVirt Team: Virt
Embargoed:
tjelinek: ovirt-4.1?
mgoldboi: blocker+
tjelinek: planning_ack?
michal.skrivanek: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 74638 0 master MERGED core: prevent restoring memory from unsupported version 2017-03-27 07:26:17 UTC
oVirt gerrit 74651 0 ovirt-engine-4.1 MERGED core: prevent restoring memory from unsupported version 2017-03-27 09:05:16 UTC
oVirt gerrit 74685 0 ovirt-engine-4.1.1.z MERGED core: prevent restoring memory from unsupported version 2017-03-27 12:34:31 UTC

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.


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