compute port lose fixed_ips on restart l3-agent if subnet is prefix delegated

Bug #1505316 reported by Atsuko Ito
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
venkata anil

Bug Description

I've created two networks: net04_ext and slaac-auto. First is dualstack public external network and second is tenant network with static private IPv4 subnet and prefix delegated IPv6 subnet.

I have ISC DHCPv6 prefix delegation server, that serves GUA's:
prefix6 2001:0470:739e:fe00:: 2001:0470:739e:feff:: /64;

| id | name | subnets |
| 848cb239-d423-40fb-89fb-3f22212a83f6 | net04_ext | 62a101e5-26fe-451c-a3a1-cf7ebdefc308 2001:470:739e::/64 |
| | | 1996fd93-d890-4500-a552-1602f5e1114e 172.16.0.0/24 |
| 147aa018-315d-4344-a26e-ca1bd3f22afe | slaac-auto | ebd9bb05-c180-4466-bb92-f6ab6efa58a8 2001:470:739e:fefe::/64 |
| | | 6031c529-12d8-4ba5-be4e-90b52330c4e0 192.168.114.0/24 |

I have a router named slaac-router, that connects slaac-auto to net04_ext. Prefix 2001:470:739e:fefe::/64 was automatically delegated by prefix delegation.

| id | name | external_gateway_info | distributed | ha |
| 5c758a05-5771-4d8b-a60c-62549ca9fc34 | slaac-router | {"network_id": "848cb239-d423-40fb-89fb-3f22212a83f6", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "1996fd93-d890-4500-a552-1602f5e1114e", "ip_address": "172.16.0.143"}, {"subnet_id": "62a101e5-26fe-451c-a3a1-cf7ebdefc308", "ip_address": "2001:470:739e:0:f816:3eff:fefc:c99b"}]} | False | False |

I have an instance in slaac-auto network.

When I've restarted neutron-l3-agent, router has rebind its GUA address, but instance lost both IPv4 and IPv6 fixed_ips.

| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------------------+
| be16f0fd-d185-4cc7-b4a5-129b7ed9537a | | fa:16:3e:98:69:8e | |
| c559bdcd-76f0-4914-84b5-6dca82371668 | | fa:16:3e:ba:ea:ea | {"subnet_id": "ebd9bb05-c180-4466-bb92-f6ab6efa58a8", "ip_address": "2001:470:739e:fefe::1"} |
| f839c7d2-da54-40d4-96f7-28bf0c64b48b | | fa:16:3e:df:c2:ea | {"subnet_id": "6031c529-12d8-4ba5-be4e-90b52330c4e0", "ip_address": "192.168.114.2"} |

To reproduce:
1. Setup OpenStack with prefix delegation
2. Create public dualstack network
3. Create private network with prefix delegated subnet
4. Create router and hook it up to new subnets
5. Create instance
6. Restart neutron-l3-agent
7. Check out instance fixed_ips (both in nova and neutron)

Neutron from master https://github.com/openstack/neutron/commit/b060e5b

Atsuko Ito (yottatsa)
summary: - compute port lose fixed_ips on restart l3-agent if subnet is pd
+ compute port lose fixed_ips on restart l3-agent if subnet is prefix
+ delegated
Atsuko Ito (yottatsa)
tags: added: ipv6
tags: removed: liberty-rc-potential
Changed in neutron:
assignee: nobody → venkata anil (anil-venkata)
tags: added: l3-ipam-dhcp
Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
Changed in neutron:
status: Confirmed → In Progress
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/241227

Atsuko Ito (yottatsa)
Changed in mos:
milestone: none → 8.0
assignee: nobody → Vladimir Eremin (yottatsa)
assignee: Vladimir Eremin (yottatsa) → MOS Neutron (mos-neutron)
Atsuko Ito (yottatsa)
no longer affects: mos
Changed in neutron:
assignee: venkata anil (anil-venkata) → John Davidge (john-davidge)
Changed in neutron:
assignee: John Davidge (john-davidge) → venkata anil (anil-venkata)
Changed in neutron:
assignee: venkata anil (anil-venkata) → Carl Baldwin (carl-baldwin)
Revision history for this message
Matthew Thode (prometheanfire) wrote :

I've been able to reproduce this in my V6-only PD network. Oddly, since it's slaac I can still ssh to it if I remember the IP.

Changed in neutron:
assignee: Carl Baldwin (carl-baldwin) → venkata anil (anil-venkata)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit c2f780648d878477bec731d255e71c112ca941b5
Author: venkata anil <email address hidden>
Date: Wed Apr 6 08:39:13 2016 +0000

    Fix prefix delegation deleting addresses for ports

    If a network has IPv4 and IPv6(prefix delegated) subnets,
    prefix delegation is deleting port's IPv4 address and
    not properly updating IPv6 address.

    Prefix Delegation(PD) is calling port_update with empty fixed_ip,
    for the port with IPv4 and IPv6(PD) subnets. After fixing this,
    when _update_ips_for_port is called with new_ips having IPv6 PD subnet,
    it is unable to add IPv6 address with new subnet prefix,
    as _test_fixed_ips_for_port not returning IPv6 PD subnet.

    To fix this, we explicitly add PD subnet to "to_add" list,
    so that IPv6 address with new prefix added to PD subnet's port.

    Closes-bug: #1509626
    Partial-Bug: #1505316
    Change-Id: I1162ca7d004461c335b0f6e0a9b5d6dff0a10429

Revision history for this message
venkata anil (anil-venkata) wrote :

@Vladimir Eremin
Can you please check if https://review.openstack.org/241227 completely fixes your problem?

Thanks
Anil

Revision history for this message
Atsuko Ito (yottatsa) wrote :

Will check this week

Revision history for this message
venkata anil (anil-venkata) wrote :

@Vladimir Eremin
Can you please check if https://review.openstack.org/241227 completely fixes your problem?

Thanks
Anil

tags: added: neutron-proactive-backport-potential
Revision history for this message
Matthew Thode (prometheanfire) wrote :

how'd the test go?

if I can find time I'll test this as well

this probably won't fix the semi-related bug of https://bugs.launchpad.net/neutron/+bug/1570122 but will hopefully mean nova lists shows the IP

tags: removed: neutron-proactive-backport-potential
Revision history for this message
venkata anil (anil-venkata) wrote :

https://bugs.launchpad.net/neutron/+bug/1570122 is not related to this bug. Bug 1505316 is about
1) ipam deleting IPv4 address while adding IPV6 PD subnet to fixed_ips
2) ipam not adding PD subnet for ip allocation
So IMHO, we can close this bug(1505316), and can have separate bugs for any other IPv6 PD related issues.

Changed in neutron:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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