IpamBackendMixin._gateway_ip_str is not reading correctly the subnet IP version

Bug #1856726 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

The "subnet" parameter passed to this function comes from the API request to the plugin to create a subnet. The "subnet" parameter is a dictionary based on the DB model. In this DB model, the IP version parameter is called "ip_version", instead of "version" [1].

[1] https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L59

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/699465

Changed in neutron:
status: New → In Progress
Changed in neutron:
status: In Progress → Triaged
importance: Undecided → Medium
Changed in neutron:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/699465
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0b3cff33c1904b82146701b521749cff01f44e9a
Submitter: Zuul
Branch: master

commit 0b3cff33c1904b82146701b521749cff01f44e9a
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Dec 17 16:50:36 2019 +0000

    Subnet gateway should be a valid IP

    When a subnet is created and allocated, the gateway IP is created
    based on the subnet CIDR. In case of IPv6 prefix delegation, this
    CIDR is a temporary one. In this case the gateway IP cannot be
    assigned yet and the value stored in the DB should be "None".

    IpamBackendMixin._gateway_ip_str must read properly the IP version
    stored in the "subnet" variable, under the key "ip_version"
    instead of "version".

    Closes-Bug: #1856726
    Closes-Bug: #1856675

    Change-Id: I9313c880cc458f08dc3a1b0ff13187b764ba7042

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 16.0.0.0b1

This issue was fixed in the openstack/neutron 16.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.