yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #44346
[Bug 1531363] Re: internal server error returned when set gateway of router with an octal ip address
Moved this to neutron since the validation code for ip addresses is done on the back-end. This also looks like a non-issue. Found this in the validation code:
neutron/api/v2/attributes.py:_validate_ip_address
# A leading '0' in IPv4 address may be interpreted as an octal number,
# e.g. 011 octal is 9 decimal. Since there is no standard saying
# whether IP address with leading '0's should be interpreted as octal
# or decimal, hence we reject leading '0's to avoid ambiguity.
Seems pretty clear that the error was thrown deliberately to "avoid ambiguity"
** Project changed: python-neutronclient => neutron
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1531363
Title:
internal server error returned when set gateway of router with an
octal ip address
Status in neutron:
Invalid
Bug description:
[Summary]
internal server error returned when set gateway of router with an octal ip address
[Topo]
devstack all-in-one node
[Description and expect result]
no error returned when set gateway of router with an octal ip address
[Reproduceable or not]
reproduceable
[Recreate Steps]
1) create a router:
root@45-59:/opt/stack/devstack# neutron router-create router100
Created a new router:
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | |
| distributed | False |
| external_gateway_info | |
| ha | False |
| id | ab35ac7b-dc5f-4ec4-b3a3-26f90ecd9fd7 |
| name | router100 |
| routes | |
| status | ACTIVE |
| tenant_id | 72a70635fa0c42a2bcba67edd760d516 |
+-------------------------+--------------------------------------+
2)internal server error returned when set gateway of router
with an octal ip address:
root@45-59:/opt/stack/devstack# neutron router-gateway-set --fixed-ip subnet_id=
015bc64c-ab58-41a1-a296-b58198cffacc,ip_address=172.168.0.011 router100 ext-net
Request Failed: internal server error while processing your request. >>>>ISSUE
root@45-59:/opt/stack/devstack#
Note: the ip address 172.168.0.011 may be interpreted as octal address since
there is a leading "0" in the address
3) if there is no leading "0" in the address, it's ok:
root@45-59:/opt/stack/devstack#
root@45-59:/opt/stack/devstack# neutron router-gateway-set --fixed-ip
subnet_id=015bc64c-ab58-41a1-a296-b58198cffacc,ip_address=172.168.0.11 router100 ext-net
Set gateway for router router100
root@45-59:/opt/stack/devstack# neutron router-show router100
+-------------------------+-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
| Field | Value
|
+-------------------------+-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
| admin_state_up | True
|
| availability_zone_hints |
|
| availability_zones | nova
|
| distributed | False
|
| external_gateway_info | {"network_id": "1fd330fa-e2f3-40a0-b6fc-5c1caa4981c8"
, "enable_snat": true, "external_fixed_ips": [{"subnet_id": "015bc64c-ab58-41a1
-a296-b58198cffacc", "ip_address": "172.168.0.11"}]} |
| ha | False
|
| id | ab35ac7b-dc5f-4ec4-b3a3-26f90ecd9fd7
|
| name | router100
|
| routes |
|
| status | ACTIVE
|
| tenant_id | 72a70635fa0c42a2bcba67edd760d516
|
+-------------------------+-------------------------------------------------------------------------------
-----------------------------------------------------------------------------
[Configration]
reproduceable bug, no need
[logs]
reproduceable bug, no need
[Root cause anlyze or debug inf]
reproduceable bug
[Attachment]
None
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1531363/+subscriptions