Bug 1442697 - [Admin Portal] Exception caught when user cancels the deletion on network -> virtual machine sub-tab.
Summary: [Admin Portal] Exception caught when user cancels the deletion on network -> ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 4.1.1.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: ovirt-4.1.3
: 4.1.3
Assignee: Sharon Gratch
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-17 07:44 UTC by Bhushan Barve
Modified: 2017-07-06 13:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-06 13:14:39 UTC
oVirt Team: Virt
Embargoed:
tjelinek: ovirt-4.1?
bbarve: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)
exception on network vm deletion cancellation (121.53 KB, image/png)
2017-04-17 07:44 UTC, Bhushan Barve
no flags Details
UI log (48.59 KB, text/plain)
2017-04-18 07:03 UTC, Bhushan Barve
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 76133 0 master MERGED webadmin: handle VmDynamic.fqdn==null in SubTabNetworkVmView 2017-04-27 12:30:37 UTC
oVirt gerrit 76914 0 ovirt-engine-4.1 MERGED webadmin: handle VmDynamic.fqdn==null in SubTabNetworkVmView 2017-05-17 08:25:51 UTC

Description Bhushan Barve 2017-04-17 07:44:18 UTC
Created attachment 1271996 [details]
exception on network vm deletion cancellation

Description of problem: When user tries to delete a virtual machine (in suspended mode) and cancels the operation from the confirmation dialog, an exception occurs on network -> virtual machine sub-tab. 

Uncaught exception occurred. Please try reloading the page. Details: (TypeError) __gwt$exception: <skipped>: a is null
Please have your administrator check the UI logs



Version-Release number of selected component (if applicable):
 Red Hat Virtualization Manager Version: 4.1.1.8-0.1.el7 

How reproducible:
always

Steps to Reproduce:
1. login to admin portal
2. go to networks -> virtual machines
3. select a virtual machine from 'Not Running' list
4. Click on delete and press cancel on the confirmation dialog.

Actual results:
exception occurs.

Expected results:
There should not be any exception.

Additional info:

Comment 3 Bhushan Barve 2017-04-18 07:03:25 UTC
Created attachment 1272228 [details]
UI log

Comment 4 Tomas Jelinek 2017-04-18 07:30:22 UTC
The issue is that the vm_dynamic.vm_fqdn can be null or empty string. 
If the vm_fqdn is null, this subtab starts to throw exceptions. You don't even need to press remove, it is enough to wait long enough and the tab will be flood by exceptions.

Comment 5 Yaniv Kaul 2017-04-18 07:31:29 UTC
(In reply to Tomas Jelinek from comment #4)
> The issue is that the vm_dynamic.vm_fqdn can be null or empty string. 

How common can that be? What's the workaround?
Is that a regression?

> If the vm_fqdn is null, this subtab starts to throw exceptions. You don't
> even need to press remove, it is enough to wait long enough and the tab will
> be flood by exceptions.

Comment 6 Tomas Jelinek 2017-04-20 12:20:55 UTC
(In reply to Yaniv Kaul from comment #5)
> (In reply to Tomas Jelinek from comment #4)
> > The issue is that the vm_dynamic.vm_fqdn can be null or empty string. 
> 
> How common can that be? What's the workaround?
> Is that a regression?

It is not a regression, it has been this way for a long time.
You will have nulls there after you turn the VM off (e.g. the ResourceManager.resetVmAttributes() is executed clearing the VM up).

You will get empty values when you just create a VM because it is created by default with empty values.

As a followup we may consider unifying this, but most of the code already handles both null and empty values in fqdn, the exception is SubTabNetworkVmView.

> 
> > If the vm_fqdn is null, this subtab starts to throw exceptions. You don't
> > even need to press remove, it is enough to wait long enough and the tab will
> > be flood by exceptions.

Comment 7 Lucie Leistnerova 2017-06-01 07:31:10 UTC
No UI error on both, Cancel and OK.

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.