Bug 1080074 - [Neutron integration][webadmin] improve CIDR validation when creating network with subnet on Neutron
Summary: [Neutron integration][webadmin] improve CIDR validation when creating network...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.0
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Dan Kenigsberg
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks: 1063716
TreeView+ depends on / blocked
 
Reported: 2014-03-24 15:58 UTC by Martin Pavlik
Modified: 2016-04-20 01:25 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 01:25:26 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:
ylavi: Triaged+


Attachments (Terms of Use)
log_collector (8.71 MB, application/x-xz)
2014-03-24 15:58 UTC, Martin Pavlik
no flags Details
screenshots+engine log (2.90 MB, application/x-gzip)
2015-04-27 16:29 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 32539 0 master MERGED tools: CidrValidation Utils Never
oVirt gerrit 32540 0 master MERGED engine: integrate CidrValidation to backend Never
oVirt gerrit 32541 0 master MERGED webadmin: integrate CidrValidator to frontend Never

Description Martin Pavlik 2014-03-24 15:58:29 UTC
Created attachment 878114 [details]
log_collector

Description of problem:

if user tries to create network with subnet on Neutron external provider
RHEVM will accept CIDR value such as 1.1.1.1/24
which gets refused by neutron server with
Invalid input for cidr. Reason: '1.1.1.1/24' isn't a recognized IP subnet cidr, '1.1.1.0/24' is recommended.


Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Manager Version: 3.4.0-0.10.beta2.el6ev 

How reproducible:
100%

Steps to Reproduce:
1. have working setup with neutron as external network provider configured
2. networks -> new
3. name: test, check Create on external provider, select your neutron provider
4. select Subnet in upper left corner of the dialog
5. Name: test, CIDR: 1.1.1.1/24, click OK


Actual results:
Error while executing action Add Subnet to Provider: Failed to communicate with the external provider.

Expected results:
1) CIDR: 1.1.1.1/24 does not pass validation in New logical network dialog
2) appropriate tooltip explaining what is wrong is displayed, it would be great if could provide as clear explanation as neutron logs, e.g. Reason: '1.1.1.1/24' isn't a recognized IP subnet cidr, '1.1.1.0/24' is recommended.

Additional info:

2014-03-24 16:52:11,963 ERROR [org.ovirt.engine.core.bll.provider.network.AddSubnetToProviderCommand] (ajp-/127.0.0.1:8702-10) [57fdacab] Command org.ovirt.engine.core.bll.provider.network.AddSubnetToProviderCommand throw Vdc Bll exception. With error message VdcBLLException: (Failed with error PROVIDER_FAILURE and code 5050)

Comment 3 Michael Burman 2015-04-27 16:23:31 UTC
Tested on - 3.6.0-0.0.master.20150412172306.git55ba764.el6


1) CIDR: 1.1.1.1/24 or 2.2.0.1/16 does not pass validation in New logical network dialog 

2) CIDR field is colored in red and Appropriate tooltip explaining what is wrong-
"This field must contain CIDR notation of an IP subnet, please ensure that the IP address matches the prefix. example:valid network address:2.2.0.0/16 invalid:2.2.0.1/16"

This is all look very nice until trying to create the network with a valid address such as 1.1.1.0/24 or as suggested in tooltip 2.2.0.0/16, then i get-
Operation canceled

 Error while executing action: may not be null

result- network created without subnet.
on neutron network created without subnet as well.

engine.log
 CanDoAction of action 'AddSubnetToProvider' failed for user admin@internal. Reasons: VAR__TYPE__SUBNET,VAR__ACTION__ADD,may not be null

faildQA

Comment 4 Michael Burman 2015-04-27 16:29:08 UTC
Created attachment 1019377 [details]
screenshots+engine log

Comment 5 Lior Vernia 2015-04-28 07:32:43 UTC
Michael, please open a different bug then, because it sounds like a different issue (and also a regression, unlike this bug which always existed). It might or might not have been caused by the fix to this, we'll have to investigate...

Comment 6 Michael Burman 2015-04-28 12:30:58 UTC
Lior, i will do that.

So moving this to verified, thank you.

Verified on - 3.6.0-0.0.master.20150412172306.git55ba764.el6

1) CIDR: 1.1.1.1/24 or 2.2.0.1/16 does not pass validation in New logical network dialog 

2) CIDR field is colored in red and Appropriate tooltip explaining what is wrong-
"This field must contain CIDR notation of an IP subnet, please ensure that the IP address matches the prefix. example:valid network address:2.2.0.0/16 invalid:2.2.0.1/16"


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