Bug 1980192

Summary: Network statistics copy a U64 into DECIMAL(18,4)
Product: Red Hat Enterprise Virtualization Manager Reporter: Jamie Bainbridge <jbainbri>
Component: ovirt-engineAssignee: eraviv
Status: CLOSED ERRATA QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: 4.3.0CC: amusil, eraviv, mburman, mperina
Target Milestone: ovirt-4.5.0Keywords: ZStream
Target Release: 4.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.0 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2030663 (view as bug list) Environment:
Last Closed: 2022-05-26 16:22:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2030663    

Description Jamie Bainbridge 2021-07-08 04:15:44 UTC
Description of problem:

The stored procedure "UPDATE vds_interface_statistics" copies the kernel's network interface statistics into the database.

We have a NIC which has wrapped its rx_dropped counter, which is a U64, so the value is about (2^64 - 1) or ~18.4 quintillion with 20 digits.

The stored procedure copies this into "v_rx_drop DECIMAL(18, 4)" and gets a numeric overflow error, because you cannot copy a 20-digit number into an 18-digit field.

v_tx_drop would suffer the same problem.

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

RHV 4.3

How reproducible:

Always

Steps to Reproduce:
1. Have a NIC with rx_dropped or tx_dropped greater than 10^14.

Actual results:

 ERROR: numeric field overflow
 Detail: A field with precision 18, scale 4 must round to an absolute value less than 10^14.

Expected results:

 No error

Additional info:

The NIC's rx_dropped counter is certainly an error on the NIC, which the customer is also trying to resolve with the hardware vendor.

That doesn't change the fact that ovirt shouldn't try to copy a value into a field which is too small for that value, and expose itself to this numeric overflow bug.

Comment 6 Michael Burman 2022-03-23 09:13:04 UTC
Verified on - rhvm-4.5.0-0.237.el8ev.noarch

Comment 11 errata-xmlrpc 2022-05-26 16:22:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.0] security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:4711