ipv6 subnet address mode should not only check "ipv6_address_mode" but also ipv6_ra_mode

Bug #1406436 reported by Wei Hu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Wei Hu
Juno
Fix Released
Undecided
Unassigned

Bug Description

Create an IPv6 subnet with ipv6-ra-mode is slaac or stateless, and ipv6-address-mode to none. Neutron will also allocate an stateful address to instance, which is not the instance actually get.

[root@node1 ~]# neutron subnet-show 5a2c86de-35f7-4d50-b490-9cf5f4edbe99
+-------------------+-------------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------------+
| allocation_pools | {"start": "2001:200::10", "end": "2001:200::ffff:ffff:ffff:fffe"} |
| | {"start": "2001:200::1", "end": "2001:200::e"} |
| cidr | 2001:200::/64 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 2001:200::f |
| host_routes | |
| id | 5a2c86de-35f7-4d50-b490-9cf5f4edbe99 |
| ip_version | 6 |
| ipv6_address_mode | |
| ipv6_ra_mode | dhcpv6-stateless |
| name | |
| network_id | 228afb74-bed4-4e66-9b5f-4bc56a37ee43 |
| tenant_id | b7843e73eea547629f26afb764fc3bef |
+-------------------+-------------------------------------------------------------------+

[root@node1 ~]# nova list
+--------------------------------------+--------------+--------+------------+-------------+----------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------------+--------+------------+-------------+----------------------------+
| 1ef77bb5-fe7e-4f17-8fac-99e79d5abdd2 | ubuntu_less | ACTIVE | - | Running | ipv6_gre=2001:200::12 |

Wei Hu (huwei-xtu)
Changed in neutron:
assignee: nobody → Wei Hu (huwei-xtu)
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/144399

Changed in neutron:
status: New → In Progress
Revision history for this message
Wei Hu (huwei-xtu) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/144399
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7018eff5ec4021b8a8c75712667c9db66fc65e05
Submitter: Jenkins
Branch: master

commit 7018eff5ec4021b8a8c75712667c9db66fc65e05
Author: WeiHu <email address hidden>
Date: Tue Dec 30 10:45:55 2014 +0800

    Fix IPv6 Subnet Slaac Check

    Currently, "is_slaac_subnet" method only checks "ipv6_address_mode".
    This will let neutron allocate a stateful IPv6 address for instance
    when ipv6_ra_mode set to "stateless" or "slaac", and "ipv6_address_mode"
    unset. But actually, instance get IPv6 address prefix from radvd, and
    auto configure IPv6 address by itself. This change will let "is_slaac_
    subnet" also check ipv6_ra_mode attribute, which will no longer allow
    fixed IPs on auto-address subnets and delete subnet will correctly delete
    auto-address ports.

    Change-Id: Ic99193a0a2669fb281759d9b47c7aae6a4f6ecce
    Closes-Bug: 1406436

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

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/149214

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

Reviewed: https://review.openstack.org/149214
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e27f00d94990c09a0c396e2854125214c3e11ec5
Submitter: Jenkins
Branch: stable/juno

commit e27f00d94990c09a0c396e2854125214c3e11ec5
Author: WeiHu <email address hidden>
Date: Tue Dec 30 10:45:55 2014 +0800

    Fix IPv6 Subnet Slaac Check

    Currently, "is_slaac_subnet" method only checks "ipv6_address_mode".
    This will let neutron allocate a stateful IPv6 address for instance
    when ipv6_ra_mode set to "stateless" or "slaac", and "ipv6_address_mode"
    unset. But actually, instance get IPv6 address prefix from radvd, and
    auto configure IPv6 address by itself. This change will let "is_slaac_
    subnet" also check ipv6_ra_mode attribute, which will no longer allow
    fixed IPs on auto-address subnets and delete subnet will correctly delete
    auto-address ports.

    Conflicts:
     neutron/db/db_base_plugin_v2.py
     neutron/plugins/ml2/plugin.py

    Change-Id: Ic99193a0a2669fb281759d9b47c7aae6a4f6ecce
    Closes-Bug: 1406436
    (cherry picked from commit 7018eff5ec4021b8a8c75712667c9db66fc65e05)

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-2 → 2015.1.0
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.