← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1807394] [NEW] creating ipv6 subnet with invalid gateway results in HttpException: 500

 

Public bug reported:

[description]

Attempt to create an ipv6 subnet with a gateway address including prefix
results in 500 error returned by API.
Neutron-lib convert_ip_to_canonical_format [1] does not handle ValueError from netaddr.IPAddress

https://github.com/openstack/neutron-
lib/blob/master/neutron_lib/api/converters.py#L214

[reproduceable]

always


[environment]

devstack all-in-one


[reproduction steps]

1. create a network
~/devstack$ openstack network create net1
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | UP                                   |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2018-12-07T13:10:55Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | 47660b84-2511-4817-b08c-74a89e7ef3c9 |
| ipv4_address_scope        | None                                 |
| ipv6_address_scope        | None                                 |
| is_default                | False                                |
| is_vlan_transparent       | None                                 |
| location                  | None                                 |
| mtu                       | 1450                                 |
| name                      | net1                                 |
| port_security_enabled     | True                                 |
| project_id                | d6023de2edcd48608cf040993889e26c     |
| provider:network_type     | vxlan                                |
| provider:physical_network | None                                 |
| provider:segmentation_id  | 61                                   |
| qos_policy_id             | None                                 |
| revision_number           | 1                                    |
| router:external           | Internal                             |
| segments                  | None                                 |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tags                      |                                      |
| updated_at                | 2018-12-07T13:10:56Z                 |
+---------------------------+--------------------------------------+

2. create a subnet

~/devstack$ openstack  subnet create --network net1 --ip-version 6 --subnet-range 2001:db8:0:1::/64 --gateway 2001:db8:0:1:1:1:1:1/128 subnet1
HttpException: 500: Server Error for url: https://10.30.19.81:9696/v2.0/subnets, Request Failed: internal server error while processing your request.


[expected result]

BadRequest Exception


[perceived severity]

low

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1807394

Title:
  creating ipv6 subnet with invalid gateway results in HttpException:
  500

Status in neutron:
  New

Bug description:
  [description]

  Attempt to create an ipv6 subnet with a gateway address including prefix
  results in 500 error returned by API.
  Neutron-lib convert_ip_to_canonical_format [1] does not handle ValueError from netaddr.IPAddress

  https://github.com/openstack/neutron-
  lib/blob/master/neutron_lib/api/converters.py#L214

  [reproduceable]

  always

  
  [environment]

  devstack all-in-one

  
  [reproduction steps]

  1. create a network
  ~/devstack$ openstack network create net1
  +---------------------------+--------------------------------------+
  | Field                     | Value                                |
  +---------------------------+--------------------------------------+
  | admin_state_up            | UP                                   |
  | availability_zone_hints   |                                      |
  | availability_zones        |                                      |
  | created_at                | 2018-12-07T13:10:55Z                 |
  | description               |                                      |
  | dns_domain                | None                                 |
  | id                        | 47660b84-2511-4817-b08c-74a89e7ef3c9 |
  | ipv4_address_scope        | None                                 |
  | ipv6_address_scope        | None                                 |
  | is_default                | False                                |
  | is_vlan_transparent       | None                                 |
  | location                  | None                                 |
  | mtu                       | 1450                                 |
  | name                      | net1                                 |
  | port_security_enabled     | True                                 |
  | project_id                | d6023de2edcd48608cf040993889e26c     |
  | provider:network_type     | vxlan                                |
  | provider:physical_network | None                                 |
  | provider:segmentation_id  | 61                                   |
  | qos_policy_id             | None                                 |
  | revision_number           | 1                                    |
  | router:external           | Internal                             |
  | segments                  | None                                 |
  | shared                    | False                                |
  | status                    | ACTIVE                               |
  | subnets                   |                                      |
  | tags                      |                                      |
  | updated_at                | 2018-12-07T13:10:56Z                 |
  +---------------------------+--------------------------------------+

  2. create a subnet

  ~/devstack$ openstack  subnet create --network net1 --ip-version 6 --subnet-range 2001:db8:0:1::/64 --gateway 2001:db8:0:1:1:1:1:1/128 subnet1
  HttpException: 500: Server Error for url: https://10.30.19.81:9696/v2.0/subnets, Request Failed: internal server error while processing your request.

  
  [expected result]

  BadRequest Exception

  
  [perceived severity]

  low

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1807394/+subscriptions


Follow ups