Centralized floating ip Error status

Bug #1741411 reported by sunzuohua
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Brian Haley

Bug Description

DVR
l3 agent mode on network nodes : dvr_snat
l3 agent mode on compute nodes : dvr_no_external

Reproduction steps:

1.Create a dvr.
2.Create a vm and associate a floating ip.
3.Restart l3 agent on the compute node which hosting the vm or add a new interface to the router.
4.The floating ip status becomes error.

Reason:

When l3 agent gets dvr info from server

1) If the agent mode is "dvr_snat", the value of "host" for the fip will be "FLOATING_IP_HOST_NEEDS_BINDING and the value of "dvr_snat_bound" will be "True".

2) If the agent mode is not "dvr_snat", the value of "host" for the fip will be the real host that hosting the vm and there is not "dvr_snat_bound".

Then l3 agents on the compute nodes will get dvr infos including centralized floating ips and try to config them in fip ns. But the agent mode on compute node is "dvr_no_external" and there is no fip ns, so the agent will fail to config the fips.

https://github.com/openstack/neutron/blob/master/neutron/db/l3_dvr_db.py#L736

sunzuohua (zuohuasun)
tags: added: l3-dvr
Revision history for this message
Miguel Lavalle (minsel) wrote :

Just to confirm, is this with master branch?

Revision history for this message
sunzuohua (zuohuasun) wrote :

I found the problem in pike branch. But I checked the master branch and the code is the same.

tags: added: l3-dvr-backlog
removed: l3-dvr
Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

I don't quiet get the issue here.
Let me rephrase it.
You mentioned that the agent requesting is the 'dvr_no_external'. So when this agent restarts it will try to get sync data of routers from the server.

So when it receives the 'sync' data the router that has floatingIP does not have the flag 'dvr_snat_bound' configured. ? Is this the issue that you are seeing.

Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

So in this case,
if (l3_agent_mode == (
     l3_const.L3_AGENT_MODE_DVR_NO_EXTERNAL) and
         requesting_agent_mode == (
             const.L3_AGENT_MODE_DVR_SNAT)):
                 port['agent'] = (l3_const.L3_AGENT_MODE_DVR_NO_EXTERNAL)
                 port_dict.update({port['id']: port})

So in this case it should also include 'requesting_agent_mode = const.L3_AGENT_MODE_DVR_NO_EXTERNAL' or 'requesting_agent_mode = const.L3_AGENT_MODE_DVR_SNAT'.
Probably this should solve the problem.

Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Swaminathan Vasudevan (swaminathan-vasudevan)
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/532683

Changed in neutron:
status: Confirmed → In Progress
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Brian Haley (brian-haley)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 477d4135ba079b0239a3e4f24c92ae3b7742e537
Author: Swaminathan Vasudevan <email address hidden>
Date: Wed Jan 10 14:45:29 2018 -0800

    DVR: Fix dvr_no_external agent restart with fips

    Centralized floating IP return to Error state when
    the 'dvr_no_external' agent restarts.
    The sync data received from the server was not handling
    the agent properly and so was not update the 'dvr_snat_bound'
    flag.
    This would initiate an floating IP Error state.
    This patch will fix the issue mentioned above.

    Closes-Bug: #1741411
    Change-Id: Id1cf26ffba8262ba7b3e5f41faa4cb28ba9dcb7d

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/545133

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/545134

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

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

commit dfbbf15305d818dedbebb09f40f580c3d625f5a8
Author: Swaminathan Vasudevan <email address hidden>
Date: Wed Jan 10 14:45:29 2018 -0800

    DVR: Fix dvr_no_external agent restart with fips

    Centralized floating IP return to Error state when
    the 'dvr_no_external' agent restarts.
    The sync data received from the server was not handling
    the agent properly and so was not update the 'dvr_snat_bound'
    flag.
    This would initiate an floating IP Error state.
    This patch will fix the issue mentioned above.

    Closes-Bug: #1741411
    Change-Id: Id1cf26ffba8262ba7b3e5f41faa4cb28ba9dcb7d
    (cherry picked from commit 477d4135ba079b0239a3e4f24c92ae3b7742e537)

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

Reviewed: https://review.openstack.org/545134
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5b0a0f5d9758960fdbf2f13c1ac277aab1ade39c
Submitter: Zuul
Branch: stable/pike

commit 5b0a0f5d9758960fdbf2f13c1ac277aab1ade39c
Author: Swaminathan Vasudevan <email address hidden>
Date: Wed Jan 10 14:45:29 2018 -0800

    DVR: Fix dvr_no_external agent restart with fips

    Centralized floating IP return to Error state when
    the 'dvr_no_external' agent restarts.
    The sync data received from the server was not handling
    the agent properly and so was not update the 'dvr_snat_bound'
    flag.
    This would initiate an floating IP Error state.
    This patch will fix the issue mentioned above.

    Closes-Bug: #1741411
    Change-Id: Id1cf26ffba8262ba7b3e5f41faa4cb28ba9dcb7d
    (cherry picked from commit 477d4135ba079b0239a3e4f24c92ae3b7742e537)

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

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

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

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

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

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