Bug 1199089

Summary: incorrect behaviour of integer field when a very large number (i.e. larger than MaxInt) is being entered.
Product: Red Hat Enterprise Virtualization Manager Reporter: Martin Pavlik <mpavlik>
Component: ovirt-engine-webadmin-portalAssignee: Alexander Wels <awels>
Status: CLOSED DUPLICATE QA Contact: Martin Pavlik <mpavlik>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.5.1CC: ecohen, gklein, iheim, lsurette, lvernia, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: EasyFix
Target Release: 3.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: ux
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-08 08:15:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot1 none

Description Martin Pavlik 2015-03-05 13:03:45 UTC
Created attachment 998346 [details]
screenshot1

Description of problem:
if an extremely high value is put in the MTU field (e.g. 80000000000000000), the field is put in a red rectangle and tooltip says: This field cannot be empty

Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Manager Version: 3.5.1-0.1.el6ev 

How reproducible:
100%

Actual results:
This field cannot be empty

Expected results:
Meaningful tooltip which would suggest allowed values for the field

Additional info:
there is a variation of the problem where the value put in gets deleted
1) go to edit network and input MTU 800000000
2) click OK, hit Esc
3) input MTU 8000000000, hit enter
value is deleted

Comment 1 Lior Vernia 2015-03-05 13:26:08 UTC
This is likely due to the number being bigger than the maximum Integer value in Java, while our IntegerValidation class tries to parse things as an Integer (rather than say BigInteger). Shouldn't be specific to the MTU field on the add/edit network dialog.

Comment 2 Alexander Wels 2015-03-06 16:07:25 UTC
The underlying cause is the same as bz1168315 which has a pending patch to solve the strange error messages and provide a clearer error message. If 8000000000 is a valid MTU value, we will have to change the type of the field to be BigInteger as Lior describes.

@Einav I think we can close as duplicate

Comment 3 Einav Cohen 2015-03-06 16:40:21 UTC
(In reply to Alexander Wels from comment #2)
> The underlying cause is the same as bz1168315 which has a pending patch to
> solve the strange error messages and provide a clearer error message. If
> 8000000000 is a valid MTU value, we will have to change the type of the
> field to be BigInteger as Lior describes.
> 
> @Einav I think we can close as duplicate

@Lior, are values larger than maximum-Integer valid as MTU values?

[if so, BZ should move back to 'network' (and the specific MTU field type should be changed to BigInteger, to my understanding) and should depend on Bug 1168315; otherwise, BZ can be closed as duplicate of Bug 1168315]

Comment 4 Lior Vernia 2015-03-08 08:15:26 UTC
Nah, there's no real use case for such values.

*** This bug has been marked as a duplicate of bug 1168315 ***