yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #79151
[Bug 1835344] [NEW] neutron doesn't check the validity of gateway_ip as a subnet had been created
Public bug reported:
neutron doesn't check the validity of gateway_ip as a subnet had been created.
Then we attach interface into a router for this subnet, the neutron-server will report a error, like: "IP address 10.10.13.254 is not a valid IP for the specified subnet."
How to reproduce:
1. create a subnet, specify the gateway_ip which isn't in the cidr range.
# neutron subnet-create --name xxxx-subnet12 --gateway 10.10.13.254 xxx-net1 10.10.13.0/25
2. create a router:
# neutron router-create xxx-router1
3. attach interface into a router for this subnet.
# neutron router-interface-add xxx-router1 xxx-subnet123
result:
expected: success
real: unsuccessful, "IP address 10.10.13.254 is not a valid IP for the specified subnet."
Improve:
So, I think we should check the validity of gateway_ip for subnet when create a subnet.
tests:
[root@xxxx]# neutron subnet-create --name xxx-subnet12 --gateway 10.10.13.254 xxx-pool-net1 10.10.13.0/25
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new subnet:
+---------------------+------------------------------------------------+
| Field | Value |
+---------------------+------------------------------------------------+
| allocation_pools | {"start": "10.10.13.1", "end": "10.10.13.126"} |
| available_ip_number | 126 |
| available_ips | {"start": "10.10.13.1", "end": "10.10.13.126"} |
| cidr | 10.10.13.0/25 |
| created_at | 2019-07-04T02:37:07Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.10.13.254 |
| host_routes | |
| id | 16dc9a28-f4d2-4b1e-9922-d78b4453147a |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | xxx-subnet12 |
| network_id | 2fa614ec-8532-46a4-a23a-d599d1c1aaf8 |
| project_id | f0208ec2708e436fa02bb79bb3851f86 |
| revision_number | 0 |
| service_types | |
| subnetpool_id | |
| tags | |
| tenant_id | f0208ec2708e436fa02bb79bb3851f86 |
| updated_at | 2019-07-04T02:37:07Z |
+---------------------+------------------------------------------------+
[root@xxx]# neutron router-interface-add xxx-router123 xxx-subnet12
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
IP address 10.10.13.254 is not a valid IP for the specified subnet.
Neutron server returns request_ids: ['req-c58bab6f-2152-4cd5-8cbd-e6f8cb7052ed']
** Affects: neutron
Importance: Undecided
Assignee: Li Zhouzhou (lizhouzhou)
Status: In Progress
** Changed in: neutron
Assignee: (unassigned) => Li Zhouzhou (lizhouzhou)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1835344
Title:
neutron doesn't check the validity of gateway_ip as a subnet had been
created
Status in neutron:
In Progress
Bug description:
neutron doesn't check the validity of gateway_ip as a subnet had been created.
Then we attach interface into a router for this subnet, the neutron-server will report a error, like: "IP address 10.10.13.254 is not a valid IP for the specified subnet."
How to reproduce:
1. create a subnet, specify the gateway_ip which isn't in the cidr range.
# neutron subnet-create --name xxxx-subnet12 --gateway 10.10.13.254 xxx-net1 10.10.13.0/25
2. create a router:
# neutron router-create xxx-router1
3. attach interface into a router for this subnet.
# neutron router-interface-add xxx-router1 xxx-subnet123
result:
expected: success
real: unsuccessful, "IP address 10.10.13.254 is not a valid IP for the specified subnet."
Improve:
So, I think we should check the validity of gateway_ip for subnet when create a subnet.
tests:
[root@xxxx]# neutron subnet-create --name xxx-subnet12 --gateway 10.10.13.254 xxx-pool-net1 10.10.13.0/25
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new subnet:
+---------------------+------------------------------------------------+
| Field | Value |
+---------------------+------------------------------------------------+
| allocation_pools | {"start": "10.10.13.1", "end": "10.10.13.126"} |
| available_ip_number | 126 |
| available_ips | {"start": "10.10.13.1", "end": "10.10.13.126"} |
| cidr | 10.10.13.0/25 |
| created_at | 2019-07-04T02:37:07Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.10.13.254 |
| host_routes | |
| id | 16dc9a28-f4d2-4b1e-9922-d78b4453147a |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | xxx-subnet12 |
| network_id | 2fa614ec-8532-46a4-a23a-d599d1c1aaf8 |
| project_id | f0208ec2708e436fa02bb79bb3851f86 |
| revision_number | 0 |
| service_types | |
| subnetpool_id | |
| tags | |
| tenant_id | f0208ec2708e436fa02bb79bb3851f86 |
| updated_at | 2019-07-04T02:37:07Z |
+---------------------+------------------------------------------------+
[root@xxx]# neutron router-interface-add xxx-router123 xxx-subnet12
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
IP address 10.10.13.254 is not a valid IP for the specified subnet.
Neutron server returns request_ids: ['req-c58bab6f-2152-4cd5-8cbd-e6f8cb7052ed']
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1835344/+subscriptions
Follow ups