Bug 2180230 - Network Interfaces is broken if tx_drop or rx_drop are empty in the DB
Summary: Network Interfaces is broken if tx_drop or rx_drop are empty in the DB
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.5.3
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ovirt-4.5.3-async
: ---
Assignee: eraviv
QA Contact: msheena
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-21 00:43 UTC by Germano Veit Michel
Modified: 2023-05-24 15:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, when creating bonds on a host outside the Manager and adding the host without starting it, the Rx\Tx drop count is shown as null. As a result, a Null Pointer Exception is thrown in the Administration Portal > Compute > Hosts > Network Interfaces tab. With this release, null values are accepted, and there are no exceptions displayed in the Network Interfaces tab.
Clone Of:
Environment:
Last Closed: 2023-05-19 07:31:01 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-engine pull 832 0 None open webadmin: avoid NPE on null rx, tx drops 2023-04-18 06:30:16 UTC
Red Hat Knowledge Base (Solution) 7003471 0 None None None 2023-03-21 00:45:05 UTC

Description Germano Veit Michel 2023-03-21 00:43:49 UTC
Description of problem:

There is an uncaught exception in the Admin Portal, in a Host 'Network Interfaces'

2023-03-16 16:32:04,727-04 ERROR [org.ovirt.engine.ui.frontend.server.gwt.OvirtRemoteLoggingService] (default task-461) [] Uncaught exception: com.google.gwt.core.client.JavaScriptException: (
TypeError) : Cannot read properties of null (reading 'e')
        at java.math.Elementary.add(Elementary.java:52)
        at org.ovirt.engine.ui.webadmin.widget.host.HostNetworkInterfaceBondedListViewItem$8.$getValue(HostNetworkInterfaceBondedListViewItem.java:167)
        at org.ovirt.engine.ui.webadmin.widget.host.HostNetworkInterfaceBondedListViewItem$8.getValue(HostNetworkInterfaceBondedListViewItem.java:167)
        at com.google.gwt.user.cellview.client.Column.render(Column.java:164)
        at com.google.gwt.user.cellview.client.AbstractCellTableBuilder.$renderCell(AbstractCellTableBuilder.java:188)
        at com.google.gwt.user.cellview.client.DefaultCellTableBuilder.$buildRowImpl(DefaultCellTableBuilder.java:62)
        at com.google.gwt.user.cellview.client.AbstractCellTableBuilder.$buildRow(AbstractCellTableBuilder.java:85)
        at com.google.gwt.user.cellview.client.AbstractCellTable.$buildRowValues(AbstractCellTable.java:2350)
        at com.google.gwt.user.cellview.client.AbstractCellTable.replaceAllChildren(AbstractCellTable.java:2149)
        at com.google.gwt.user.cellview.client.AbstractHasData$View.replaceAllChildren(AbstractHasData.java:265)
        at com.google.gwt.user.cellview.client.HasDataPresenter.$resolvePendingState(HasDataPresenter.java:1062)
        at com.google.gwt.user.cellview.client.HasDataPresenter$2.execute(HasDataPresenter.java:981)
        at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:167)
        at com.google.gwt.core.client.impl.SchedulerImpl.$flushFinallyCommands(SchedulerImpl.java:272)
        at com.google.gwt.core.client.impl.Impl.exit(Impl.java:383)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:345)
        at Unknown.eval(webadmin-0.js)

The host has bond slaves, and the exception happens if rx_drop and tx_drop for the bond are still empty:

   165	        TextColumn<HostInterface> dropRate = new TextColumn<HostInterface>() {
   166	            @Override
   167	            public String getValue(HostInterface hostInterface) {
   168	                return String.valueOf(hostInterface.getRxDrop().add(hostInterface.getTxDrop()));     <---- trying to add Tx and Rx drop stats to the UI elements
   169	            }
   170	        };

As long as the host is up, they will never be empty. But there is a specific scenario it can happen:
1. Prepare new host
2. Configure all networks manually before add
3. Add host to RHV-M, uncheck Activate after install button
4. Navigate to Network Interfaces in the UI

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

How reproducible:
100%

Steps to Reproduce:
1. Get the host in maintenance
2. Set tx_drop rx_drop for a bond slave nic in vds_interface_statistics

Actual results:
* Exception

Expected results:
* Working UI

Additional info:
* Activating the host makes the problem go away, as getStats fills those rows.

Comment 7 Casper (RHV QE bot) 2023-04-18 11:00:38 UTC
This bug has low overall severity and is not going to be further verified by QE.

Comment 10 Casper (RHV QE bot) 2023-05-19 07:31:01 UTC
This bug has low overall severity and passed an automated regression suite, and is not going to be further verified by QE.


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