Bug 1448650 - UX: uncaught exception when trying to access the tab "Virtual Machine > Guest Info" of a offline instance.
Summary: UX: uncaught exception when trying to access the tab "Virtual Machine > Guest...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 4.1.1.8
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ovirt-4.1.5
: 4.1.5
Assignee: Sharon Gratch
QA Contact: samuel macko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-06 17:59 UTC by Davi Garcia
Modified: 2017-08-23 08:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-23 08:05:00 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.1+
mtessun: planning_ack+
rule-engine: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)
Screenshot, from Firefox 53.0 (64bits) running on Fedora Workstation 25. (151.32 KB, image/png)
2017-05-06 17:59 UTC, Davi Garcia
no flags Details
/var/log/ovirt-engine/ui.log collected from affected RHVM server. (41.87 KB, text/plain)
2017-05-06 18:01 UTC, Davi Garcia
no flags Details
/var/log/ovirt-engine/ui.log after install ovirt-engine-webadmin-portal-debuginfo (55.20 KB, text/plain)
2017-05-11 20:35 UTC, Davi Garcia
no flags Details
Install log for ovirt-engine-webadmin-portal-debuginfo (3.03 KB, text/plain)
2017-05-11 20:36 UTC, Davi Garcia
no flags Details
/var/log/ovirt-engine/engine.log after install ovirt-engine-webadmin-portal-debuginfo (Guest Info exception) (5.56 MB, text/plain)
2017-05-12 15:44 UTC, Davi Garcia
no flags Details
/var/log/ovirt-engine/ui.log after install ovirt-engine-webadmin-portal-debuginfo (Guest Info exception) (60.53 KB, text/plain)
2017-05-12 15:45 UTC, Davi Garcia
no flags Details
/var/log/ovirt-engine/server.log after install ovirt-engine-webadmin-portal-debuginfo (Guest Info exception) (657.43 KB, text/plain)
2017-05-12 15:45 UTC, Davi Garcia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 79258 0 master MERGED engine: handle NPE for guest info data of a powered-off vm 2017-07-12 12:37:49 UTC
oVirt gerrit 79643 0 ovirt-engine-4.1 MERGED engine: handle NPE for guest info data of a powered-off vm 2017-07-24 07:33:17 UTC

Description Davi Garcia 2017-05-06 17:59:30 UTC
Created attachment 1276779 [details]
Screenshot, from Firefox 53.0 (64bits) running on Fedora Workstation 25.

Description of problem:

On RHV-M version 4.1.1.8, running as a standalone server based on RHEL 7.3, the UI throws an JavaScript exception when trying to access the tab "Virtual Machine > Guest Info" of a offline instance.

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

RHV-M version 4.1.1.8 (WebAdmin)

How reproducible:

Easily.

Steps to Reproduce:
1. Create two virtual machine with guest-tools installed.
2. Power one off, and leave the other powered on.
3. With the machine powered on selected, access its Guest Info tab, from Virtual Machine section. This will not throw the exception.
3. Do the same with the machine powered off, the exception is thrown.

Actual results:

The webadmin portal shows a red box informing the exception and questing the user to reload the page.

Expected results:

Not sure, but we could inform the latest information acquired for the virtual-machine, or just leave the fields as 'unknown'

Comment 1 Davi Garcia 2017-05-06 18:01:00 UTC
Created attachment 1276780 [details]
/var/log/ovirt-engine/ui.log collected from affected RHVM server.

Comment 2 Yaniv Kaul 2017-05-07 04:19:43 UTC
Can you please install weadmin-debuginfo, restart engine service and reproduce? This will provide a deciphered stack.

Comment 3 Davi Garcia 2017-05-07 04:55:12 UTC
Sure! How am I suppose to install it?


[root@rhvm ~]# yum install weadmin-debuginfo
Loaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock
jb-eap-7-for-rhel-7-server-rpms                                                             | 4.0 kB  00:00:00     
rhel-7-server-rhv-4-tools-rpms                                                              | 4.0 kB  00:00:00     
rhel-7-server-rhv-4.1-rpms                                                                  | 4.0 kB  00:00:00     
rhel-7-server-rpms                                                                          | 3.5 kB  00:00:00     
rhel-7-server-supplementary-rpms                                                            | 3.4 kB  00:00:00     
No package weadmin-debuginfo available.
Error: Nothing to do
[root@rhvm ~]# yum install webadmin-debuginfo
Loaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock
No package webadmin-debuginfo available.
Error: Nothing to do
[root@rhvm ~]# yum search debuginfo
Loaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock
=============================================== Matched: debuginfo ================================================
yum-utils.noarch : Utilities based around the yum package manager
[root@rhvm ~]#

Comment 4 Michal Skrivanek 2017-05-07 07:11:38 UTC
The exact package name is ovirt-engine-webadmin-portal-debuginfo

Comment 6 Davi Garcia 2017-05-07 17:39:59 UTC
After install this package, from 'rhel-7-server-rhv-4.1-debug-rpms' channel, the engine URL 'https://rhvm.cloud.dvercill.lab/ovirt-engine/' returns 404. Is it expected?

Comment 7 Tomas Jelinek 2017-05-09 06:39:25 UTC
(In reply to Davi Garcia from comment #6)
> After install this package, from 'rhel-7-server-rhv-4.1-debug-rpms' channel,
> the engine URL 'https://rhvm.cloud.dvercill.lab/ovirt-engine/' returns 404.
> Is it expected?

no, this is not expected. Can you please provide the server logs? /var/log/ovirt-engine/server.log

Comment 8 Tomas Jelinek 2017-05-11 09:22:23 UTC
BTW I was trying to simulate this according to the steps and it did not happen to me so there is no way forward without the logs or access to an env where it actually happens.

@Davi: any chance to get those?

Comment 9 Davi Garcia 2017-05-11 20:35:37 UTC
Created attachment 1278015 [details]
/var/log/ovirt-engine/ui.log after install ovirt-engine-webadmin-portal-debuginfo

Comment 10 Davi Garcia 2017-05-11 20:36:09 UTC
Created attachment 1278016 [details]
Install log for ovirt-engine-webadmin-portal-debuginfo

Comment 11 Davi Garcia 2017-05-11 21:02:00 UTC
Sorry for the delay, but I had to rollback the install so we could use the lab again. Like I said, when I install the debug package the UI returns HTTP/404.

Comment 12 Tomas Jelinek 2017-05-12 05:51:32 UTC
as I mentioned in comment 7 - could you please provide the /var/log/ovirt-engine/server.log when you are getting the 404 after installing the debuginfo?

@Greg: any idea why would the webadmin disappear after installing the debuginfo package?

Comment 13 Davi Garcia 2017-05-12 15:43:30 UTC
For some reason I cannot explain, I reinstalled the ovirt-engine-webadmin-portal-debuginfo today (I did rollback yesterday after collect the logs) and the HTTP/404 error is not happening anymore. Anyway, I'm sending all the logs (server, engine, ui) again, with ovirt-engine-webadmin-portal-debuginfo installed, for the Guest Info exception decoded.

Comment 14 Davi Garcia 2017-05-12 15:44:41 UTC
Created attachment 1278265 [details]
/var/log/ovirt-engine/engine.log after install ovirt-engine-webadmin-portal-debuginfo (Guest Info exception)

Comment 15 Davi Garcia 2017-05-12 15:45:05 UTC
Created attachment 1278266 [details]
/var/log/ovirt-engine/ui.log after install ovirt-engine-webadmin-portal-debuginfo (Guest Info exception)

Comment 16 Davi Garcia 2017-05-12 15:45:30 UTC
Created attachment 1278267 [details]
/var/log/ovirt-engine/server.log after install ovirt-engine-webadmin-portal-debuginfo (Guest Info exception)

Comment 17 Greg Sheremeta 2017-05-12 16:11:24 UTC
Thanks. Better. 

[] Uncaught exception: com.google.gwt.core.client.JavaScriptException: (TypeError) 
 __gwt$exception: <skipped>: a.d is null
	at org.ovirt.engine.ui.uicommonweb.models.vms.VmGuestInfoModel.$setGuestOsNamedVersion(VmGuestInfoModel.java:243)
	at org.ovirt.engine.ui.uicommonweb.models.vms.VmGuestInfoModel.$updateProperties(VmGuestInfoModel.java:91)
	at org.ovirt.engine.ui.uicommonweb.models.vms.VmGuestInfoModel.onEntityChanged(VmGuestInfoModel.java:54)
	at

Comment 18 Michal Skrivanek 2017-05-12 16:21:45 UTC
great. Can you please also check the version of ovirt-guest-agent inside the VM?

Comment 19 Davi Garcia 2017-05-12 17:27:58 UTC
The VM based on Microsoft Windows Server 2016 (64 bits) is using RHV Tools 4.1.5, and the VM based on RHEL 7.3 is using ovirt-guest-agent-common-1.0.13-5.el7ev.noarch, that installed qemu-guest-agent-2.5.0-3.el7.x86_64.

Comment 20 Tomas Jelinek 2017-05-16 11:33:52 UTC
It happens since the ResourceManager.resetVmAttributes() resets the "guestOs" field to null but not the guestOsType. So, in VmGuestInfoModel.setGuestOsNamedVersion() this expression:
guestOsType == OsType.Windows && guestOs.startsWith("Win ")
throws a NPE since the guestOsType == OsType.Windows is true and the guestOs is null

It is a similar issue than 1442697

Comment 21 samuel macko 2017-08-14 15:27:57 UTC
Verified in ovirt version 4.1.5.2-0.1.el7.

Verified by following the reproducer.


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