Bug 1623379 - 'Clone' VM from snapshot via the UI is broken
Summary: 'Clone' VM from snapshot via the UI is broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.2.6.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.7
: ---
Assignee: Sharon Gratch
QA Contact: Polina
URL:
Whiteboard: verified_upstream
Depends On:
Blocks: 1635770
TreeView+ depends on / blocked
 
Reported: 2018-08-29 08:58 UTC by Eyal Shenitzky
Modified: 2018-11-02 14:30 UTC (History)
8 users (show)

Fixed In Version: ovirt-engine-4.2.7.3
Clone Of:
: 1635770 (view as bug list)
Environment:
Last Closed: 2018-11-02 14:30:56 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)
ui.log (5.74 KB, text/plain)
2018-10-14 15:01 UTC, Polina
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 94786 0 master MERGED webadmin: avoid NPE in case of cloning a non server type snapshot 2018-10-09 12:37:59 UTC
oVirt gerrit 94819 0 ovirt-engine-4.2 MERGED webadmin: avoid NPE in case of cloning a non server type snapshot 2018-10-10 07:40:53 UTC
oVirt gerrit 94840 0 master MERGED Frontend: allow cloning a snapshot of a headless vm 2018-10-11 06:38:54 UTC
oVirt gerrit 94854 0 ovirt-engine-4.2 MERGED Frontend: allow cloning a snapshot of a headless vm 2018-10-11 12:32:16 UTC

Description Eyal Shenitzky 2018-08-29 08:58:31 UTC
Description of problem:

When trying to clone a VM from a snapshot via the UI, an exception (UI) is thrown.

2018-08-29 11:44:38,786+03 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-61) [] Uncaught exception: com.google.gwt.event.shared.Um
brellaException: Exception caught: (TypeError) : Cannot read property 'K' of null
        at java.lang.Throwable.Throwable(Throwable.java:70) [rt.jar:1.8.0_172]
        at java.lang.RuntimeException.RuntimeException(RuntimeException.java:32) [rt.jar:1.8.0_172]
        at com.google.web.bindery.event.shared.UmbrellaException.UmbrellaException(UmbrellaException.java:64) [gwt-servlet.jar:]
        at Unknown.new G0(webadmin-0.js)
        at com.google.gwt.event.shared.HandlerManager.$fireEvent(HandlerManager.java:117) [gwt-servlet.jar:]
        at com.google.gwt.user.client.ui.Widget.$fireEvent(Widget.java:127) [gwt-servlet.jar:]
        at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:127) [gwt-servlet.jar:]
        at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:110) [gwt-servlet.jar:]
        at com.google.gwt.user.client.ui.Widget.$onBrowserEvent(Widget.java:163) [gwt-servlet.jar:]
        at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:163) [gwt-servlet.jar:]
        at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1415) [gwt-servlet.jar:]
        at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:312) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java:236) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:275) [gwt-servlet.jar:]
        at Unknown.eval(webadmin-0.js)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'K' of null
        at org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior.updateHaAvailability(ExistingVmModelBehavior.java:481)
at org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.eventRaised(UnitVmModel.java:1949)
        at org.ovirt.engine.ui.uicompat.Event.$raise(Event.java:99)
        at org.ovirt.engine.ui.uicommonweb.models.ListModel.$setSelectedItem(ListModel.java:82)
        at org.ovirt.engine.ui.uicommonweb.models.ListModel.setSelectedItem(ListModel.java:78)
        at org.ovirt.engine.ui.common.editor.UiCommonEditorVisitor.$updateListEditor(UiCommonEditorVisitor.java:184)
        at org.ovirt.engine.ui.common.editor.UiCommonEditorVisitor.visit(UiCommonEditorVisitor.java:47)
        at com.google.gwt.editor.client.impl.AbstractEditorContext.$traverse(AbstractEditorContext.java:127) [gwt-servlet.jar:]
        at org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractVmPopupWidget_UiCommonModelEditorDelegate.accept(AbstractVmPopupWidget_UiCommonModelEditorDelegate.java:507)
        at com.google.gwt.editor.client.impl.AbstractEditorContext.$traverse(AbstractEditorContext.java:127) [gwt-servlet.jar:]
        at org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractVmPopupWidget_DriverImpl.accept(AbstractVmPopupWidget_DriverImpl.java:4)
        at org.ovirt.engine.ui.common.editor.AbstractUiCommonModelEditorDriver.$edit(AbstractUiCommonModelEditorDriver.java:33)
        at org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractVmPopupWidget.$edit(AbstractVmPopupWidget.java:1530)
        at org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractVmPopupWidget.edit(AbstractVmPopupWidget.java:1530)
        at org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractVmPopupWidget.edit(AbstractVmPopupWidget.java:1530)
        at org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractModeSwitchingPopupWidget.edit(AbstractModeSwitchingPopupWidget.java:80)
        at org.ovirt.engine.ui.common.view.popup.AbstractModelBoundWidgetPopupView.edit(AbstractModelBoundWidgetPopupView.java:37)
        at org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget.$init(AbstractModelBoundPopupPresenterWidget.java:105)
        at org.ovirt.engine.ui.common.widget.popup.AbstractVmBasedPopupPresenterWidget.$init(AbstractVmBasedPopupPresenterWidget.java:63)
        at org.ovirt.engine.ui.common.widget.popup.AbstractVmBasedPopupPresenterWidget.init(AbstractVmBasedPopupPresenterWidget.java:63)
        at org.ovirt.engine.ui.common.widget.popup.AbstractVmBasedPopupPresenterWidget.init(AbstractVmBasedPopupPresenterWidget.java:63)

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

How reproducible:
100%

Steps to Reproduce:
1. Create a VM with disk
2. Create a snapshot to the VM
3. Try to clone VM from the created snapshot

Actual results:
UI exception is thrown when pressing 'clone' button

Expected results:
Clone VM should work and a new VM should be created

Additional info:

Comment 1 Eyal Shenitzky 2018-08-29 08:59:26 UTC
Version-Release number of selected component:
4.3.0 - master b081fb69031dad91a04fd258832be66126c27e0d

Comment 2 Red Hat Bugzilla Rules Engine 2018-09-16 06:55:52 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Eyal Shenitzky 2018-09-16 08:13:17 UTC
This bug is already fixed by patch on master - 
https://gerrit.ovirt.org/#/c/94171/

Sharon, is this patch should be backported?

Comment 5 shani 2018-10-04 09:23:02 UTC
Sharon,
I think that some of the changes you add in patch [1] were later removed in patch [2].
Since patch [1] was backported and patch [2] weren't, I strongly believe that something there causes the bug on 4.2.
Can you please have a look?

[1] https://gerrit.ovirt.org/#/c/92788/ 
[2] https://gerrit.ovirt.org/#/c/94171/

Comment 6 Sharon Gratch 2018-10-07 14:00:13 UTC
Eyal / Shani,

1. Can you please attach the VM configuration for reproducing this bug? I tried to reproduce it on 4.2.7 and it didn't reproduced. Please attach the specific vm configuration and status of the VM that caused this failure. It seems that HA should be enabled for that VM but it didn't reproduced for me also with that.

2. Regarding patches [1], [2]:
patch [1] should been backported since it enables manual migration for high performance vms - which is supported only in 4.2.6.

patch [2] presents an automatic (and manual) migration support for high performance vms which should be supported only in 4.3 and therefore shouldn't be backported. It definitely overrides part of the code of [1] but both patches are aimed for different versions.


Let's understand how to reproduce and what is the bug and then merge a specific solution for 4.2 if required.


[1] https://gerrit.ovirt.org/#/c/92788/ 
[2] https://gerrit.ovirt.org/#/c/94171/

Comment 7 Sharon Gratch 2018-10-08 10:48:02 UTC
(In reply to Sharon Gratch from comment #6)
The issue is reproduced on a Desktop VM type only.

Comment 8 Polina 2018-10-14 15:01:01 UTC
Created attachment 1493730 [details]
ui.log

Bug still happens on ovirt-release42-snapshot-4.2.7-0.2.rc2.20181013014954.gitfb30674.el7.noarch

Steps for verification - 
1. Create Desktop VM with disk
2. Create snapshot from the VM
3. click VM/Snapshots. Choose the snapshot and try to clone the VM from the snapshot
Exception is brought .
ui log attached.

Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'K' of null
        at org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior.updateHaAvailability(ExistingVmModelBehavior.java:481)

Comment 9 Sharon Gratch 2018-10-15 07:43:04 UTC
(In reply to Polina from comment #8)
> Created attachment 1493730 [details]
> ui.log
> 
> Bug still happens on
> ovirt-release42-snapshot-4.2.7-0.2.rc2.20181013014954.gitfb30674.el7.noarch

Hi Polina,

I re-verified this on 4.2.7.3_master and issue is not reproduced for me.
Are you sure that you verified it on a build that contains this fix?

Comment 10 Sharon Gratch 2018-10-15 09:06:22 UTC
It seems that QE needs to wait for tommorow's build for verifying this bug.

Comment 11 Polina 2018-10-15 11:47:07 UTC
Hi Sharon,

it was tested on ovirt-engine-4.2.7.3-0.0.master.20181008113103.git4718e0f.el7.noarch

I'll re-test it in tomorrow build

Comment 12 Polina 2018-10-16 08:07:58 UTC
The verification on ovirt-engine-4.2.7.3-0.0.master.20181015151121.gitd6e9af9.el7.noarch has succeeded.

The VMs are cloned from snapshots successfully with no exception.

Comment 13 Polina 2018-10-21 07:13:42 UTC
re-tested on rhv-release-4.2.7-5-001.noarch successfully

Comment 14 Sandro Bonazzola 2018-11-02 14:30:56 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE.

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


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