Bug 1364152 - Attaching a disk through new VM popup when no data center is active throws an exception
Summary: Attaching a disk through new VM popup when no data center is active throws an...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.UserPortal
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.0-beta
: 4.1.0.2
Assignee: Tal Nisan
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard:
Depends On: 1406042
Blocks: 1388963 1421725
TreeView+ depends on / blocked
 
Reported: 2016-08-04 14:43 UTC by Sandro Bonazzola
Modified: 2017-02-13 14:33 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
: 1388963 (view as bug list)
Environment:
Last Closed: 2017-02-01 14:37:53 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
tnisan: devel_ack+
ratamir: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 68739 0 master MERGED webadmin: check that DC and cluster are selected upon attach disk to VM 2016-12-20 09:51:45 UTC
oVirt gerrit 68794 0 ovirt-engine-4.1 MERGED webadmin: check that DC and cluster are selected upon attach disk to VM 2016-12-20 14:40:18 UTC

Description Sandro Bonazzola 2016-08-04 14:43:08 UTC
I don't have exact steps to reproduce. I just installed the engine from master, logged in and randomly clicked on stuff in the user portal just to check it was responding

# rpm -qa |grep userportal
ovirt-engine-userportal-debuginfo-4.1.0-0.0.master.20160802181918.gitd8decfe.fc24.noarch
ovirt-engine-userportal-4.1.0-0.0.master.20160802181918.gitd8decfe.fc24.noarch

client side:

Thu Aug 04 13:18:47 GMT+200 2016 org.ovirt.engine.ui.frontend.Frontend
WARNING: Failure while invoking runQuery [Query execution failed due to insufficient permissions., Query execution failed due to insufficient permissions_]
userportal-0.js:5832 Thu Aug 04 13:18:52 GMT+200 2016 
SEVERE: Uncaught exceptioncom.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'k' of null
	at Unknown.Ur(userportal-0.js@17729)
	at Unknown.as(userportal-0.js@41)
	at Unknown.wX(userportal-0.js@19)
	at Unknown.zX(userportal-0.js@19)
	at Unknown.KW(userportal-0.js@116)
	at Unknown.Q$c(userportal-0.js@27)
	at Unknown.$$c(userportal-0.js@13141)
	at Unknown._S(userportal-0.js@147)
	at Unknown.S$c(userportal-0.js@113)
	at Unknown.Yhd(userportal-0.js@21707)
	at Unknown.G6c(userportal-0.js@85)
	at Unknown.D8c(userportal-0.js@46)
	at Unknown._t(userportal-0.js@29)
	at Unknown.du(userportal-0.js@57)
	at Unknown.eval(userportal-0.js@54)
	at Unknown.Sy(userportal-0.js@20)
	at Unknown.Chd(userportal-0.js@98)
	at Unknown.dMi(userportal-28.js@147517)
	at Unknown.Yhd(userportal-0.js@21325)
	at Unknown.G6c(userportal-0.js@85)
	at Unknown.F6c(userportal-0.js@60)
	at Unknown.B8c(userportal-0.js@52)
	at Unknown._t(userportal-0.js@29)
	at Unknown.du(userportal-0.js@57)
	at Unknown.eval(userportal-0.js@54)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'k' of null
	at Unknown.BSm(userportal-28.js@58)
	at Unknown.PSm(userportal-28.js@506365)
	at Unknown.GLi(userportal-0.js@101)
	at Unknown.Cyj(userportal-28.js@218011)
	at Unknown.uT(userportal-0.js@27451)
	at Unknown.UW(userportal-0.js@209)
	at Unknown.KW(userportal-0.js@59)
	at Unknown.Q$c(userportal-0.js@27)
	at Unknown.$$c(userportal-0.js@13141)
	at Unknown._S(userportal-0.js@147)
	at Unknown.S$c(userportal-0.js@113)
	at Unknown.Yhd(userportal-0.js@21707)
	at Unknown.G6c(userportal-0.js@85)
	at Unknown.D8c(userportal-0.js@46)
	at Unknown._t(userportal-0.js@29)
	at Unknown.du(userportal-0.js@57)
	at Unknown.eval(userportal-0.js@54)
	at Unknown.Sy(userportal-0.js@20)
	at Unknown.Chd(userportal-0.js@98)
	at Unknown.dMi(userportal-28.js@147517)
	at Unknown.Yhd(userportal-0.js@21325)
	at Unknown.G6c(userportal-0.js@85)
	at Unknown.F6c(userportal-0.js@60)
	at Unknown.B8c(userportal-0.js@52)
	at Unknown._t(userportal-0.js@29)
	at Unknown.du(userportal-0.js@57)
	at Unknown.eval(userportal-0.js@54)
dRc @ userportal-0.js:5832
userportal-0.js:5832 Thu Aug 04 13:18:52 GMT+200 2016 remote
SEVERE: Uncaught exceptioncom.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'k' of null
	at Unknown.Ur(userportal-0.js@17729)
	at Unknown.as(userportal-0.js@41)
	at Unknown.wX(userportal-0.js@19)
	at Unknown.zX(userportal-0.js@19)
	at Unknown.KW(userportal-0.js@116)
	at Unknown.Q$c(userportal-0.js@27)
	at Unknown.$$c(userportal-0.js@13141)
	at Unknown._S(userportal-0.js@147)
	at Unknown.S$c(userportal-0.js@113)
	at Unknown.Yhd(userportal-0.js@21707)
	at Unknown.G6c(userportal-0.js@85)
	at Unknown.D8c(userportal-0.js@46)
	at Unknown._t(userportal-0.js@29)
	at Unknown.du(userportal-0.js@57)
	at Unknown.eval(userportal-0.js@54)
	at Unknown.Sy(userportal-0.js@20)
	at Unknown.Chd(userportal-0.js@98)
	at Unknown.dMi(userportal-28.js@147517)
	at Unknown.Yhd(userportal-0.js@21325)
	at Unknown.G6c(userportal-0.js@85)
	at Unknown.F6c(userportal-0.js@60)
	at Unknown.B8c(userportal-0.js@52)
	at Unknown._t(userportal-0.js@29)
	at Unknown.du(userportal-0.js@57)
	at Unknown.eval(userportal-0.js@54)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'k' of null
	at Unknown.BSm(userportal-28.js@58)
	at Unknown.PSm(userportal-28.js@506365)
	at Unknown.GLi(userportal-0.js@101)
	at Unknown.Cyj(userportal-28.js@218011)
	at Unknown.uT(userportal-0.js@27451)
	at Unknown.UW(userportal-0.js@209)
	at Unknown.KW(userportal-0.js@59)
	at Unknown.Q$c(userportal-0.js@27)
	at Unknown.$$c(userportal-0.js@13141)
	at Unknown._S(userportal-0.js@147)
	at Unknown.S$c(userportal-0.js@113)
	at Unknown.Yhd(userportal-0.js@21707)
	at Unknown.G6c(userportal-0.js@85)
	at Unknown.D8c(userportal-0.js@46)
	at Unknown._t(userportal-0.js@29)
	at Unknown.du(userportal-0.js@57)
	at Unknown.eval(userportal-0.js@54)
	at Unknown.Sy(userportal-0.js@20)
	at Unknown.Chd(userportal-0.js@98)
	at Unknown.dMi(userportal-28.js@147517)
	at Unknown.Yhd(userportal-0.js@21325)
	at Unknown.G6c(userportal-0.js@85)
	at Unknown.F6c(userportal-0.js@60)
	at Unknown.B8c(userportal-0.js@52)
	at Unknown._t(userportal-0.js@29)
	at Unknown.du(userportal-0.js@57)
	at Unknown.eval(userportal-0.js@54)

Server side:
2016-08-04 13:18:52,548 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-1) [] Permutation name: 75D1AC128862E90B608B8BD81303B1CE
2016-08-04 13:18:52,548 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-1) [] Uncaught exception: com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'k' of null
        at java.lang.Throwable.fillInStackTrace(Throwable.java:114) [rt.jar:1.8.0_101]
        at java.lang.RuntimeException.RuntimeException(RuntimeException.java:32) [rt.jar:1.8.0_101]
        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.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.CustomButton.onBrowserEvent(CustomButton.java:631) [gwt-servlet.jar:]
        at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1648) [gwt-servlet.jar:]
        at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:320) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java:296) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:335) [gwt-servlet.jar:]
        at Unknown.eval(userportal-0.js@54)
        at com.google.gwt.dom.client.DOMImplStandard.$dispatchEvent(DOMImplStandard.java:68) [gwt-servlet.jar:]
        at com.google.gwt.user.client.ui.CustomButton.$onClick(CustomButton.java:822) [gwt-servlet.jar:]
        at org.ovirt.engine.ui.common.widget.dialog.AbstractDialogButton.onClick(AbstractDialogButton.java:45)
        at com.google.gwt.user.client.ui.CustomButton.onBrowserEvent(CustomButton.java:631) [gwt-servlet.jar:]
        at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1648) [gwt-servlet.jar:]
        at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1666) [gwt-servlet.jar:]
        at com.google.gwt.user.client.impl.DOMImplStandard.dispatchCapturedMouseEvent(DOMImplStandard.java:352) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java:296) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:335) [gwt-servlet.jar:]
        at Unknown.eval(userportal-0.js@54)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'k' of null
        at org.ovirt.engine.ui.uicommonweb.models.vms.InstanceImageLineModel.$attachDisk(InstanceImageLineModel.java:169)
        at org.ovirt.engine.ui.uicommonweb.models.vms.InstanceImageLineModel.executeCommand(InstanceImageLineModel.java:359)
        at org.ovirt.engine.ui.uicommonweb.UICommand.$execute(UICommand.java:163)
        at org.ovirt.engine.ui.common.widget.uicommon.instanceimages.InstanceImageLineEditor$2.onClick(InstanceImageLineEditor.java:87)
        at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:55) [gwt-servlet.jar:]
        at com.google.web.bindery.event.shared.SimpleEventBus.$doFire(SimpleEventBus.java:173) [gwt-servlet.jar:]
        ... 21 more

Comment 1 Yaniv Kaul 2016-08-04 16:40:05 UTC
Based on:
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) 
 __gwt$exception: <skipped>: Cannot read property 'k' of null
        at org.ovirt.engine.ui.uicommonweb.models.vms.InstanceImageLineModel.$attachDisk(InstanceImageLineModel.java:169)

Assuming it is storage.

Comment 2 Tal Nisan 2016-08-08 10:09:30 UTC
Looking at the frontend code I don't see a reason why the query should fail, Sandro, can you please reproduce somehow and attach and Engine log as well?
It seems like the exception should pop around the new/edit VM dialog in the instance images part of the dialog

Comment 3 Allon Mureinik 2016-08-08 10:35:06 UTC
The error seems like a user portal widget is attempting to call an admin query. Has anything changed there in the recent future?

Comment 4 Tal Nisan 2016-08-08 13:09:19 UTC
Not that I recall, tried to do some actions around that area to trigger something but didn't manage to reproduce and as I mentioned looking around the frontend code I didn't see any query that should fail.
Best course of action is to get the Engine log since the frontend failure doesn't list which exact query failed.

Comment 5 Sandro Bonazzola 2016-08-09 07:21:47 UTC
Steps to reproduce:
Access User Portal with admin@internal user
Go to extended tab
Go to new VM
You'll see Instance images enabled with both Attach and Create buttons enabled even if no datacenter is active.
Hit Attach -> exception raised.

Comment 6 Tal Nisan 2016-12-19 15:05:56 UTC
Upon further investigating this issue also occurs in webadim, changing the description to reflect that.

Clearer steps to reproduce:

1. Make sure no data center is active in the system
2. In the VM main tab click on "New"
3. In the new VM popup click on the "Attach" button

A UI exception is thrown

Comment 7 Kevin Alon Goldblatt 2017-01-29 11:22:03 UTC
Verified with the following code:
-------------------------------------------
ovirt-engine-4.1.1-0.0.master.20170126161333.git83fd7e0.el7.centos.noarch
vdsm-4.19.3-1.gitdfa4d67.el7.centos.x86_64

Verified with the following scenario:
------------------------------------------
1. On a system with the DC inactive select to create a new VM
2. Press the New VM and press the Attach Disk button - No exception is thrown


Moving to VERIFIED!


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