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
[PreFix] - There is no validation for "/" string in the Netmask filed in UI a...
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network (Show other bugs)
3.6.2
x86_64 Linux
medium Severity medium (vote)
: ovirt-4.0.6
: ---
Assigned To: Marcin Mirecki
Michael Burman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-27 03:54 EST by Michael Burman
Modified: 2017-01-18 02:25 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-18 02:25:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
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 03:54 EST, Michael Burman
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 58968 master MERGED engine: IPv4AddressConverter should also convert netmask prefix with leading slash 2016-06-27 10:44 EDT
oVirt gerrit 59856 ovirt-engine-4.0 MERGED engine: IPv4AddressConverter should also convert netmask prefix with leading slash 2016-06-29 04:36 EDT

  None (edit)
Description Michael Burman 2015-12-27 03:54:35 EST
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 10:18:07 EST
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 05:35:42 EDT
The bugs do not really depend, but they are confusingly similar
Comment 3 Yaniv Lavi 2016-03-27 08:26:36 EDT
(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 05:49:47 EDT
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 09:14:01 EDT
oVirt 4.0 beta has been released, moving to RC milestone.
Comment 6 Michael Burman 2016-12-08 04:04:58 EST
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.