DVR associating a new floatingip on existing network fails after restart of l3 agent

Bug #1515341 reported by Erik Colnick
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Erik Colnick
Kilo
New
Undecided
Unassigned

Bug Description

If DVR is enabled and an l3-agent is restarted, adding a new vm to an existing network and then associating a floating ip to that vm will fail and set all floating ip statuses on that network to 'ERROR'. In tracking down this issue, it appears that the 'floating_ip_added_dist' method in agent/l3/dvr_local_router.py attempts to invoke 'self.rtr_fip_subnet.get_pair()' without first checking that self.rtr_fip_subnet is not None.

To reproduce this issue:
On a running DVR enabled installation, create a network, subnet, external network and router.
Boot a vm on the network and associate a floating ip to the vm.
Restart the neutron-l3-agent on the compute node hosting the vm.
Boot a second vm on the existing network hosted on the compute node where the neutron-l3-agent has been restarted.
Associate a new floatingip to the second vm.
Observe that the flaotingip is in the ERROR state and that the vm is not pingable via that floatingip.

Changed in neutron:
assignee: nobody → Erik Colnick (erikcolnick)
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/244258

Changed in neutron:
status: New → In Progress
tags: added: ki
tags: added: kilo-backport-potential liberty-backport-potential
removed: ki
Ryan Moats (rmoats)
tags: added: l3-dvr-backlog
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/246516

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

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/246532

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

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/246545

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

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

commit da3de52c507544c84463a037acac3b2b24a37fe0
Author: Erik Colnick <email address hidden>
Date: Wed Nov 11 04:44:42 2015 -0700

    Fix dvr_local_router.floating_ip_added_dist failure after agent restart

    If DVR is enabled and an l3-agent is restarted, associating a floatingip
    to an existing vm on the compute node where the l3-agent was restarted
    will fail. This commit fixes the floating_ip_added_dist method in
    dvr_local_router.py so that self.rtr_fip_subnet will be created if
    it is 'None' prior to the attempt to call the get_name() method on
    it.

    Change-Id: I860ee3522275f62f393e66853e53ef387598983d
    CLoses-Bug: #1515341

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

Reviewed: https://review.openstack.org/246545
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=325257e98ba1a0c461e79d151cf0d8f478fa27b7
Submitter: Jenkins
Branch: stable/liberty

commit 325257e98ba1a0c461e79d151cf0d8f478fa27b7
Author: Erik Colnick <email address hidden>
Date: Wed Nov 11 04:44:42 2015 -0700

    Fix dvr_local_router.floating_ip_added_dist failure after agent restart

    If DVR is enabled and an l3-agent is restarted, associating a floatingip
    to an existing vm on the compute node where the l3-agent was restarted
    will fail. This commit fixes the floating_ip_added_dist method in
    dvr_local_router.py so that self.rtr_fip_subnet will be created if
    it is 'None' prior to the attempt to call the get_name() method on
    it.

    Closes-Bug: #1515341
    (cherry-picked from commit da3de52c507544c84463a037acac3b2b24a37fe0)

    Conflicts:
     neutron/tests/unit/agent/l3/test_dvr_local_router.py

    Change-Id: I43b326f8b313b5be2d2d1f28c8eb351e42624391

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/251388

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/kilo)

Change abandoned by Erik Colnick (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/246532

Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.1

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Doug Wiegley (<email address hidden>) on branch: master
Review: https://review.openstack.org/246516
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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

Reviewed: https://review.openstack.org/251388
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=686c8853416e6abbf2a29ae5acaf4f4875c05375
Submitter: Jenkins
Branch: stable/kilo

commit 686c8853416e6abbf2a29ae5acaf4f4875c05375
Author: Erik Colnick <email address hidden>
Date: Wed Nov 11 04:44:42 2015 -0700

    Fix dvr_local_router.floating_ip_added_dist failure after agent restart

    If DVR is enabled and an l3-agent is restarted, associating a floatingip
    to an existing vm on the compute node where the l3-agent was restarted
    will fail. This commit fixes the floating_ip_added_dist method in
    dvr_local_router.py so that self.rtr_fip_subnet will be created if
    it is 'None' prior to the attempt to call the get_name() method on
    it.

    Closes-Bug: #1515341
    (cherry picked from commit da3de52c507544c84463a037acac3b2b24a37fe0)

    Conflicts:
     neutron/tests/unit/agent/l3/test_dvr_local_router.py

    Change-Id: I860ee3522275f62f393e66853e53ef387598983d

tags: added: in-stable-kilo
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 2015.1.4

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

tags: removed: kilo-backport-potential liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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.