DVR: Missing fixed_ips info for IPv6 subnets

Bug #1786169 reported by Dongcan Ye
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Dongcan Ye

Bug Description

Reproduce Steps:

preconditions: DVR and DVR_SNAT enabled.

1. Create router, network, IPv4 subnet
# neutron router-create test_router
# neutron net-create test_net
# neutron subnet-create test_net 40.40.40.0/24 --name test_v4_subnet

2. Create two SLAAC-enabled subnets
# neutron subnet-create --ip-version 6 --ipv6_address_mode=dhcpv6-stateless --ipv6_ra_mode=dhcpv6-stateless test_net fdf8:f53b:82e4::51/64
# neutron subnet-create --ip-version 6 --ipv6_address_mode=slaac --ipv6_ra_mode=slaac test_net fdf8:f84c:82e4::51/64

3. Attach those subnets(one v4 subnet and two v6 subnets) to router
# neutron router-interface-add test_router test_v4_subnet
# neutron router-interface-add test_router V6_SUBNET1_ID
# neutron router-interface-add test_router V6_SUBNET2_ID

4. Then set gateway for the router.
# neutron router-gateway-set test_router EXTERNAL_NETWORK

The CSNAT router interface for IPv6 will get fixed ip from one of the IPv6 subnets.

If we set gateway for the router first, and then attach interface to the router.
The CSNAT router interface for IPv6 will get fixed ip from both IPv6 subnets.
In this situation, the csnat IPv6 address will update in _update_snat_v6_addrs_after_intf_update[1] after internal interface added.

So we also need to process correctly for multiple IPv6 subnets.

[1] https://github.com/openstack/neutron/blob/master/neutron/db/l3_dvr_db.py

Dongcan Ye (hellochosen)
Changed in neutron:
assignee: nobody → Dongcan Ye (hellochosen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/590157

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

Reviewed: https://review.openstack.org/590157
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c6aac9041f98f971cd1362bee2768a04bbe5cf1d
Submitter: Zuul
Branch: master

commit c6aac9041f98f971cd1362bee2768a04bbe5cf1d
Author: Dongcan Ye <email address hidden>
Date: Thu Aug 9 07:16:51 2018 +0000

    DVR: Add IPv6 csnat port address correctly

    If router gateway info update, in l3_dvr_db will receive events,
    We will get subnets from router attached DVR port, if exists
    multiple IPv6 slaac-enabled subnets, previous code will create
    csnat port form one of the IPv6 subnets.
    This is inconsistency with router interface
    udpate in _update_snat_v6_addrs_after_intf_update.

    This patch adds all IPv6 subnets if the distributed
    router port have multiple IPv6 subnets.

    Change-Id: I02ffed238897ebc91b96aebb7f94ed90b7613769
    Closes-Bug: #1786169

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/598325

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/598326

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/rocky)

Reviewed: https://review.openstack.org/598324
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=cf38c373d186501ac43b98e42c3c4fe3b512ccc7
Submitter: Zuul
Branch: stable/rocky

commit cf38c373d186501ac43b98e42c3c4fe3b512ccc7
Author: Dongcan Ye <email address hidden>
Date: Thu Aug 9 07:16:51 2018 +0000

    DVR: Add IPv6 csnat port address correctly

    If router gateway info update, in l3_dvr_db will receive events,
    We will get subnets from router attached DVR port, if exists
    multiple IPv6 slaac-enabled subnets, previous code will create
    csnat port form one of the IPv6 subnets.
    This is inconsistency with router interface
    udpate in _update_snat_v6_addrs_after_intf_update.

    This patch adds all IPv6 subnets if the distributed
    router port have multiple IPv6 subnets.

    Change-Id: I02ffed238897ebc91b96aebb7f94ed90b7613769
    Closes-Bug: #1786169
    (cherry picked from commit c6aac9041f98f971cd1362bee2768a04bbe5cf1d)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/queens)

Reviewed: https://review.openstack.org/598325
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c0d57c9404a916fc1e1346dec3f6f5766d9b4e2d
Submitter: Zuul
Branch: stable/queens

commit c0d57c9404a916fc1e1346dec3f6f5766d9b4e2d
Author: Dongcan Ye <email address hidden>
Date: Thu Aug 9 07:16:51 2018 +0000

    DVR: Add IPv6 csnat port address correctly

    If router gateway info update, in l3_dvr_db will receive events,
    We will get subnets from router attached DVR port, if exists
    multiple IPv6 slaac-enabled subnets, previous code will create
    csnat port form one of the IPv6 subnets.
    This is inconsistency with router interface
    udpate in _update_snat_v6_addrs_after_intf_update.

    This patch adds all IPv6 subnets if the distributed
    router port have multiple IPv6 subnets.

    Change-Id: I02ffed238897ebc91b96aebb7f94ed90b7613769
    Closes-Bug: #1786169
    (cherry picked from commit c6aac9041f98f971cd1362bee2768a04bbe5cf1d)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.1

This issue was fixed in the openstack/neutron 13.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 12.0.4

This issue was fixed in the openstack/neutron 12.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/pike)

Reviewed: https://review.openstack.org/598326
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9cb7643830445879f34e2206170b4f7e9a6cf432
Submitter: Zuul
Branch: stable/pike

commit 9cb7643830445879f34e2206170b4f7e9a6cf432
Author: Dongcan Ye <email address hidden>
Date: Thu Aug 9 07:16:51 2018 +0000

    DVR: Add IPv6 csnat port address correctly

    If router gateway info update, in l3_dvr_db will receive events,
    We will get subnets from router attached DVR port, if exists
    multiple IPv6 slaac-enabled subnets, previous code will create
    csnat port form one of the IPv6 subnets.
    This is inconsistency with router interface
    udpate in _update_snat_v6_addrs_after_intf_update.

    This patch adds all IPv6 subnets if the distributed
    router port have multiple IPv6 subnets.

    Change-Id: I02ffed238897ebc91b96aebb7f94ed90b7613769
    Closes-Bug: #1786169
    (cherry picked from commit c6aac9041f98f971cd1362bee2768a04bbe5cf1d)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.6

This issue was fixed in the openstack/neutron 11.0.6 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 14.0.0.0b1

This issue was fixed in the openstack/neutron 14.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.