Bug 1451246 - changing storage type with Discard After Delete causes UI error
Summary: changing storage type with Discard After Delete causes UI error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.3
: 4.1.3
Assignee: Idan Shaby
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-16 08:29 UTC by Lucie Leistnerova
Modified: 2017-07-06 13:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-06 13:36:13 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+
lsvaty: testing_ack+


Attachments (Terms of Use)
ui_log (4.75 KB, text/plain)
2017-05-16 08:30 UTC, Lucie Leistnerova
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 76931 0 master MERGED frontend: fix ClassCastException in StorageModel 2017-05-17 13:12:32 UTC
oVirt gerrit 76958 0 ovirt-engine-4.1 MERGED frontend: fix ClassCastException in StorageModel 2017-05-18 08:40:02 UTC

Description Lucie Leistnerova 2017-05-16 08:29:02 UTC
Description of problem:
When adding new storage, changing type of the storage causes UI error when there is checked option Discard After Delete.

Version-Release number of selected component (if applicable):
ovirt-engine-webadmin-portal-4.2.0-0.0.master.20170515211647.git76fab34.el7.centos.noarch

How reproducible: always


Steps to Reproduce:
1. add new storage domain
2. change Storage type to iSCSI
3. click on Advances Parameters and check the option Discard After Delete
4. change Storage type to NFS or GlusterFS (type that doesn't have the option)

Actual results: UI error occurs


Expected results: no error, checkbox Discard After Delete is unchecked in next use

Comment 1 Lucie Leistnerova 2017-05-16 08:30:42 UTC
Created attachment 1279231 [details]
ui_log

Comment 2 Yaniv Kaul 2017-05-17 06:11:10 UTC
Stack:
2017-05-16 10:16:48,242+02 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-13) [] Uncaught exception: com.google.gwt.event.shared.UmbrellaException: Exception caught: undefined
        at java.lang.Throwable.Throwable(Throwable.java:70) [rt.jar:1.8.0_131]
        at java.lang.RuntimeException.RuntimeException(RuntimeException.java:32) [rt.jar:1.8.0_131]
        at com.google.web.bindery.event.shared.UmbrellaException.UmbrellaException(UmbrellaException.java:64) [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.logical.shared.ValueChangeEvent.fire(ValueChangeEvent.java:40) [gwt-servlet.jar:]
        at org.ovirt.engine.ui.common.widget.editor.ListModelListBox.$lambda$2(ListModelListBox.java:251)
        at org.ovirt.engine.ui.common.widget.editor.ListModelListBox$lambda$2$Type.execute(ListModelListBox.java:251)
        at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:167) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.SchedulerImpl.$flushPostEventPumpCommands(SchedulerImpl.java:338) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:76) [gwt-servlet.jar:]
        at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:140) [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.Du/<(https://host1.obfuscateddomain0.com/ovirt-engine/webadmin/?locale=en_US#storage-images)
        at Unknown.d(https://host1.obfuscateddomain0.com/ovirt-engine/webadmin/?locale=en_US#storage-images)
        at Unknown.anonymous(Unknown)
Caused by: java.lang.ClassCastException
        at java.lang.Throwable.Throwable(Throwable.java:59) [rt.jar:1.8.0_131]
        at java.lang.Exception.Exception(Exception.java:25) [rt.jar:1.8.0_131]
        at java.lang.RuntimeException.RuntimeException(RuntimeException.java:25) [rt.jar:1.8.0_131]
        at java.lang.ClassCastException.ClassCastException(ClassCastException.java:23) [rt.jar:1.8.0_131]
        at javaemul.internal.InternalPreconditions.checkCriticalType(InternalPreconditions.java:139) [gwt-servlet.jar:]
        at com.google.gwt.lang.Cast.castTo(Cast.java:74)
        at org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel.eventRaised(StorageModel.java:293)
        at org.ovirt.engine.ui.uicompat.Event.$raise(Event.java:99)
        at org.ovirt.engine.ui.uicommonweb.models.EntityModel.$setEntity(EntityModel.java:35)
        at org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel.$updateDiscardAfterDelete(StorageModel.java:623)
        at org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel.$storageType_SelectedItemChanged(StorageModel.java:335)
        at org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel.eventRaised(StorageModel.java:293)
        at org.ovirt.engine.ui.uicompat.Event.$raise(Event.java:99)
        at org.ovirt.engine.ui.uicommonweb.models.ListModel.$setSelectedItem(ListModel.java:81)
        at org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.StoragePopupView_availableStorageTypeItems_selectedItem_Context.$setInModel(StoragePopupView_availableStorageTypeItems_selectedItem_Context.java:19)
        at org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.StoragePopupView_availableStorageTypeItems_selectedItem_Context.setInModel(StoragePopupView_availableStorageTypeItems_selectedItem_Context.java:19)
        at org.ovirt.engine.ui.common.editor.UiCommonEditorVisitor.$setInModel(UiCommonEditorVisitor.java:147)
        at org.ovirt.engine.ui.common.editor.UiCommonEditorVisitor.$lambda$0(UiCommonEditorVisitor.java:58)
        at org.ovirt.engine.ui.common.editor.UiCommonEditorVisitor$lambda$0$Type.onValueChange(UiCommonEditorVisitor.java:58)
        at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:127) [gwt-servlet.jar:]
        at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:76) [gwt-servlet.jar:]
        at com.google.web.bindery.event.shared.SimpleEventBus.$doFire(SimpleEventBus.java:173) [gwt-servlet.jar:]
        ... 15 more

Comment 3 Allon Mureinik 2017-05-17 09:53:44 UTC
Lilach/Idan - can you confirm this happens on 4.1.z too?

Comment 4 Idan Shaby 2017-05-17 14:07:50 UTC
I checked ovirt-engine-4.1 and it happens there.

Comment 5 Lucie Leistnerova 2017-05-31 11:29:00 UTC
no UI error and checkbox works as expected

verified in ovirt-engine-webadmin-portal-4.1.3-0.1.el7.noarch


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