Bug 903696 - It's possible to create a network with default gateway out of the network's range
Summary: It's possible to create a network with default gateway out of the network's r...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 2.0 (Folsom)
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact: Yaniv Kaul
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-24 15:32 UTC by Rami Vaknin
Modified: 2019-09-09 13:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-12 17:06:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rami Vaknin 2013-01-24 15:32:53 UTC
Description of problem:
Network creation while the specified default gateway is out of the network's range is possible and pass successfully

Version-Release number of selected component (if applicable):
Folsom on RHEL6.4, FlatDHCPManager, openstack-nova-2012.2.2-6.el6ost.noarch

Steps to Reproduce:
1. Create a network where the default gateway is out of the network's range, for instance:

$ nova-manage network create --label=net08_34 --fixed_range_v4=192.168.6.0/24 --bridge=br100 --project_id=a75203c3c0234ea0b3c16565e52af01e --num_networks=1 --gateway=192.168.7.7

Actual results:
Command passed successfully.

# mysql -u root nova -e "select id,cidr,netmask,bridge,gateway,broadcast,dhcp_start,label,bridge_interface from networks where label like 'net08_34';"
+----+----------------+---------------+--------+-------------+---------------+-------------+----------+------------------+
| id | cidr           | netmask       | bridge | gateway     | broadcast     | dhcp_start  | label    | bridge_interface |
+----+----------------+---------------+--------+-------------+---------------+-------------+----------+------------------+
|  8 | 192.168.6.0/24 | 255.255.255.0 | br100  | 192.168.7.7 | 192.168.6.255 | 192.168.6.2 | net08_34 | eth2             |
+----+----------------+---------------+--------+-------------+---------------+-------------+----------+------------------+


Expected results:
The command should fail with an exception which explains that the default gateway's address should be from within the network's range

Comment 2 Russell Bryant 2013-02-12 17:06:22 UTC
nova-manage is a very low level admin tool.  It does very little validation and instead just assumes valid input from the admin in many cases.  So, I don't think this is something we need to fix.


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