Bug 1420265 - Attempting to remove disk from storage domain in template's storage sub-tab results in exception
Summary: Attempting to remove disk from storage domain in template's storage sub-tab r...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: future
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.1
: 4.1.1.3
Assignee: Benny Zlotnik
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-08 10:14 UTC by Benny Zlotnik
Modified: 2017-04-21 09:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:35:00 UTC
oVirt Team: Storage
rule-engine: ovirt-4.1+


Attachments (Terms of Use)
logs and screenshot (88.95 KB, application/zip)
2017-02-08 10:14 UTC, Benny Zlotnik
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 71871 0 master MERGED webadmin: Fix ClassCastException when removing template's disk 2017-02-08 13:30:21 UTC
oVirt gerrit 73263 0 ovirt-engine-4.1 MERGED webadmin: Fix ClassCastException when removing template's disk 2017-03-01 08:43:12 UTC
oVirt gerrit 73304 0 ovirt-engine-4.1.1.z MERGED webadmin: Fix ClassCastException when removing template's disk 2017-03-01 09:05:55 UTC

Description Benny Zlotnik 2017-02-08 10:14:56 UTC
Created attachment 1248576 [details]
logs and screenshot

Description of problem:
When attempting to remove a disk from a template in the Storage sub-tab, an exception occurs and the operation fails

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


How reproducible:
100%

Steps to Reproduce:
1. Create a template with disks
2. Select the template in the Templates tab
3. Try to remove a disk in the Storage sub-tab

Actual results:
Operation fails with this exception:

2017-02-07 20:26:13,615+02 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-33) [] Permutation name: HostedMode
2017-02-07 20:26:13,615+02 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-33) [] Uncaught exception: com.google.gwt.event.shared.UmbrellaException: Exception caught: org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel cannot be cast to org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel
	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129) [gwt-servlet.jar:]
	at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) [gwt-servlet.jar:]
	at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:125) [gwt-servlet.jar:]
	at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177) [gwt-servlet.jar:]
	at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1714) [gwt-servlet.jar:]
	at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1653) [gwt-servlet.jar:]
	at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:325) [gwt-servlet.jar:]
	at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source) [:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
	at com.google.gwt.core.client.impl.Impl.apply(Impl.java) [gwt-servlet.jar:]
	at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356) [gwt-servlet.jar:]
	at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source) [:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
	at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
Caused by: java.lang.ClassCastException: org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel cannot be cast to org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel
	at org.ovirt.engine.ui.uicommonweb.models.templates.TemplateStorageListModel.onRemove(TemplateStorageListModel.java:161)
	at org.ovirt.engine.ui.uicommonweb.models.templates.TemplateStorageListModel.executeCommand(TemplateStorageListModel.java:236)
	at org.ovirt.engine.ui.uicommonweb.UICommand.execute(UICommand.java:170)
	at org.ovirt.engine.ui.uicommonweb.UICommand.execute(UICommand.java:181)
	at org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget$6.onClick(AbstractModelBoundPopupPresenterWidget.java:361)
	at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:56) [gwt-servlet.jar:]
	at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1) [gwt-servlet.jar:]
	at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1) [gwt-servlet.jar:]
	at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40) [gwt-servlet.jar:]
	at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193) [gwt-servlet.jar:]
	at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88) [gwt-servlet.jar:]
	at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127) [gwt-servlet.jar:]
	... 30 more


Expected results:
Should succeed


Additional info:

Comment 1 Raz Tamir 2017-03-28 14:38:36 UTC
Verified on rhevm-4.1.1.6-0.1.el7
Followed the steps to reproduce and the operation finished successfully


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