Bug 1294334 - [PreFix] - There is no validation for "/" string in the Netmask filed in UI and it ends up with 'Internal engine error' and exception in engine log
Summary: [PreFix] - There is no validation for "/" string in the Netmask filed in UI a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 3.6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.0.6
: ---
Assignee: Marcin Mirecki
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-27 08:54 UTC by Michael Burman
Modified: 2017-01-18 07:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-18 07:25:36 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: ovirt-4.1+


Attachments (Terms of Use)
engine log (514.77 KB, application/x-gzip)
2015-12-27 08:54 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1216081 0 high CLOSED [Neutron integration][webadmin] Networks with valid input for CIDR created without subnet and with error:Error while exe... 2021-02-22 00:41:40 UTC
oVirt gerrit 58968 0 master MERGED engine: IPv4AddressConverter should also convert netmask prefix with leading slash 2016-06-27 14:44:00 UTC
oVirt gerrit 59856 0 ovirt-engine-4.0 MERGED engine: IPv4AddressConverter should also convert netmask prefix with leading slash 2016-06-29 08:36:57 UTC

Internal Links: 1216081

Description Michael Burman 2015-12-27 08:54:35 UTC
Created attachment 1109786 [details]
engine log

Description of problem:
[PreFix] - There is no validation for "/" string in the Netmask field in UI and it ends up with 'Internal engine error' and exception in engine log.

"Error while executing action HostSetupNetworks: Internal Engine Error"

engine.log -->

2015-12-27 10:40:58,444 ERROR [org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (ajp-/127.0.0.1:8702-13) [4f1f75fb] Command 'org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand' failed:
 For input string: "/25"
2015-12-27 10:40:58,444 ERROR [org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (ajp-/127.0.0.1:8702-13) [4f1f75fb] Exception: java.lang.NumberFormatException: For input string: "/25"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) [rt.jar:1.8.0_51]

- "/" was a valid string for the new RFE - 1012881
for example, it was valid to enter /24 or /32 in the Netmask field in the network's edit dialog in Setup network, but now, because it was a valid string, there is no validation for this string, but in the last 3.6.2 build it ends up with internal engine error and exceptions in engine log ^^ 

- "/" should not be a valid string any more, there should be a validation for this string, like we have for all other non-valid strings in this field and the field should be marked in red. 
- We should no see any engine errors and exceptions in engine log.  

Version-Release number of selected component (if applicable):
3.6.2-0.1.el6

How reproducible:
100

Steps to Reproduce:
1. Create network and attach to host via Setup networks dialog
2. Edit the network and enter /24 in the Netmask / Routing Prefix: field
3. Approve operation

Actual results:
Exception in engine log ends up with internal engine error
No validation for '/' string, because it used to be a valid value in older 3.6.z versions.
See BZ - 1012881

Expected results:
There should be validation for '/' string and it shouldn't be a valid value any more for prefix. Only 0-32
In case of '/' string, the field should be colored in red.

Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2015-12-27 15:18:07 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 Dan Kenigsberg 2016-03-27 09:35:42 UTC
The bugs do not really depend, but they are confusingly similar

Comment 3 Yaniv Lavi 2016-03-27 12:26:36 UTC
(In reply to Dan Kenigsberg from comment #2)
> The bugs do not really depend, but they are confusingly similar

So moving to see also

Comment 4 Sandro Bonazzola 2016-05-02 09:49:47 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 5 Yaniv Lavi 2016-05-23 13:14:01 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 6 Michael Burman 2016-12-08 09:04:58 UTC
It is now optional to use the '/' string again.
Engine will accept '/24' and '24' in the Routing Prefix filed in the edit network dialog.

Verified on - 4.0.6.2-0.1.el7ev


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