← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Reviewed:  https://review.openstack.org/623498
Committed: https://git.openstack.org/cgit/openstack/neutron-lib/commit/?id=532b398b90fff1b224086b4eb52ac9ef7412a0f4
Submitter: Zuul
Branch:    master

commit 532b398b90fff1b224086b4eb52ac9ef7412a0f4
Author: Vlad Gridin <vladyslav.gridin@xxxxxxxxxxxxxxxxx>
Date:   Fri Dec 7 15:20:44 2018 +0100

    Handle ValueError in canonical address convertion
    
    netaddr.IPAddress raises ValueError for some unsupported
    address formats. This patch will catch this exception
    in addition to AddrFormatError.
    
    Closes-Bug: 1807394
    
    Change-Id: I06eea42906f1fe4443fa4959e79a1993a9664efe


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
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:
  Fix Released

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


References