Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1442697

Summary: [Admin Portal] Exception caught when user cancels the deletion on network -> virtual machine sub-tab.
Product: [oVirt] ovirt-engine Reporter: Bhushan Barve <bbarve>
Component: Frontend.WebAdminAssignee: Sharon Gratch <sgratch>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.1.8CC: bbarve, bugs, lsvaty, stirabos, tjelinek
Target Milestone: ovirt-4.1.3Flags: tjelinek: ovirt-4.1?
bbarve: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+
Target Release: 4.1.3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-06 13:14:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
exception on network vm deletion cancellation
none
UI log none

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