Router update creates router namespaces on nodes even though no VM is hosted for attached subnets

Bug #1353266 reported by Preethi Dsilva
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Swaminathan Vasudevan

Bug Description

1.create 2 networks,subnet on each network
2.create a dvr and attch these subnets to dvr
3.now perform router update(say adding extra route )
4.we see that dvr router namespace is created on all nodes with agent_mode=dvr_snat or agent_mode=dvr

Changed in neutron:
status: New → Incomplete
status: Incomplete → New
Changed in neutron:
assignee: nobody → Vinod Kumar (vinod-kumar5)
status: New → In Progress
Revision history for this message
Preethi Dsilva (prdsilva) wrote : RE: [Bug 1353266] Re: Router update creates router namespaces on nodes even though no VM is hosted for attached subnets

Armando I have yesterdays code recloned on devsatck
root@deOSC:/opt/stack/devstack# git log
commit 5e93727a23e3922efcdd80600a0b7fce5adb62cf
Merge: df2cc34 a216254

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Armando Migliaccio
Sent: Wednesday, August 06, 2014 11:21 AM
To: Dsilva, Preethi
Subject: [Bug 1353266] Re: Router update creates router namespaces on nodes even though no VM is hosted for attached subnets

Which router namespace are you referring to? Are you running with this
fix:

https://review.openstack.org/#/c/110862/

Please provide more input to help us triage this bug.

Thanks,
Armando

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1353266

Title:
  Router update creates router namespaces on nodes even though no VM is
  hosted for attached subnets

Status in OpenStack Neutron (virtual network service):
  In Progress

Bug description:
  1.create 2 networks,subnet on each network
  2.create a dvr and attch these subnets to dvr
  3.now perform router update(say adding extra route )
  4.we see that dvr router namespace is created on all nodes with agent_mode=dvr_snat or agent_mode=dvr

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1353266/+subscriptions

Revision history for this message
Preethi Dsilva (prdsilva) wrote :

The code used:
root@deOSC:/opt/stack/devstack# git log
commit 5e93727a23e3922efcdd80600a0b7fce5adb62cf
Merge: df2cc34 a216254

The expected behavior:
The DVr router namespace should not be created until a VM is hosted on the compute for the subnets attached on teh router

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

This will be a big problem at scale. Marking High to look deeper in to this.

Changed in neutron:
importance: Undecided → High
Revision history for this message
Vinod Kumar (vinod-kumar5) wrote :

Identified the problem and fixed it.
Before I commit I will run few more manual tests to ensure things are working.

Revision history for this message
Vinod Kumar (vinod-kumar5) wrote :

Fix committed.
I am working on the UT for the committed fix.

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Hi Vinod, can you verify that this does not interfere with bug #1353006?

What I mean here is that with the fix for this bug, the namespaces will be created on the network node, for instance during a set external gateway operation. Can you verify that your fix is effective even in the presence of fix for 1353006 available here:

https://review.openstack.org/#/c/112146/

Thanks,
Armando

Revision history for this message
Vinod Kumar (vinod-kumar5) wrote :

Hi Armando,
I will take the changes of fix 1353006 and check if my fix works with that.

Thanks
Vinod

Revision history for this message
Vinod Kumar (vinod-kumar5) wrote :

Hi Armando,

I verified both the fix put together and that works fine.
With my and your fix in place I did not see the exception thrown.

I have addressed the comments and uploaded a patch for all to review.
https://review.openstack.org/#/c/112576/3

Thanks
Vinod

Changed in neutron:
milestone: none → juno-3
Changed in neutron:
assignee: Vinod Kumar (vinod-kumar5) → Swaminathan Vasudevan (swaminathan-vasudevan)
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Mike Smith (michael-smith6)
Changed in neutron:
assignee: Mike Smith (michael-smith6) → Swaminathan Vasudevan (swaminathan-vasudevan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/112576
Reason: superseded

Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Mike Smith (michael-smith6)
Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

This appears to be the latest patch that addresses this problem. Though it may itself be broken up in to separate patches.

https://review.openstack.org/#/c/114410/

Changed in neutron:
assignee: Mike Smith (michael-smith6) → Swaminathan Vasudevan (swaminathan-vasudevan)
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Vivekanandan Narasimhan (vivekanandan-narasimhan)
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → juno-rc1
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/118704

Changed in neutron:
assignee: Vivekanandan Narasimhan (vivekanandan-narasimhan) → Carl Baldwin (carl-baldwin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in neutron:
assignee: Carl Baldwin (carl-baldwin) → Swaminathan Vasudevan (swaminathan-vasudevan)
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Mike Smith (michael-smith6)
Changed in neutron:
assignee: Mike Smith (michael-smith6) → Carl Baldwin (carl-baldwin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 43637f257f353254bf3bb68e5b7631ae1aacd831
Author: Michael Smith <email address hidden>
Date: Tue Sep 2 16:59:36 2014 +0000

    Add scheduler unit tests to enable bug fixes and refactoring

    Improves the coverage for DVR scheduling and will allow safer bug
    fixes and refactoring in follow-on patches.

    Change-Id: I02d0126e31adcab88a7ee82ba1cb76f952c9a68c
    Partial-bug: #1353266
    Partial-bug: #1356639
    Co-Authored-By: Swaminathan Vasudevan <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit f31a56a06c01adecfeaa679b49243c24accb65d1
Author: Michael Smith <email address hidden>
Date: Tue Sep 2 17:05:12 2014 +0000

    Remove subnet_id from check_ports_exist_on_l3agent

    Refactor check_ports_exist_on_l3agent so that subnet_id no longer
    needs to be passed. Instead it calls get_subnet_ids_on_router. This
    helps to pave the way for removing hints from schedule router.

    Partial-bug: #1353266
    Partial-bug: #1356639
    Co-Authored-By: Swaminathan Vasudevan <email address hidden>

    Change-Id: I6e9dcb0b899294bb4cf3e3d616a0a690049c338e

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit 671e3ffa468974bf3b52f787e865eba2b6c97ffe
Author: Michael Smith <email address hidden>
Date: Tue Sep 2 17:07:04 2014 +0000

    Call unbind_snat_servicenode from schedule router

    Refactor to move the call to plugin.unbind_snat_servicenode from
    schedule_snat_router to _schedule_router. This is a move to pave the
    way for removing hints from schedule router.

    Partial-bug: #1353266
    Partial-bug: #1356639
    Co-Authored-By: Swaminathan Vasudevan <email address hidden>

    Change-Id: I062d8cc3cb870bbaa033d5b107a7dd868dfafa19

Changed in neutron:
assignee: Carl Baldwin (carl-baldwin) → Mike Smith (michael-smith6)
Changed in neutron:
assignee: Mike Smith (michael-smith6) → Swaminathan Vasudevan (swaminathan-vasudevan)
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Armando Migliaccio (armando-migliaccio)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit 357404e73427aeb4a45c2b226706703f4f846dfc
Author: Michael Smith <email address hidden>
Date: Tue Sep 2 17:08:06 2014 +0000

    Remove hints from schedule_router

    Partial-bug: #1353266
    Partial-bug: #1356639
    Co-Authored-By: Swaminathan Vasudevan <email address hidden>

    Change-Id: Ie6b55e5d0d70be74b19c91994e52eb1719e32fef

Changed in neutron:
assignee: Armando Migliaccio (armando-migliaccio) → Swaminathan Vasudevan (swaminathan-vasudevan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit 5a36f0ad24903a3a8ec213840ab164834917a32e
Author: Michael Smith <email address hidden>
Date: Tue Sep 2 17:09:12 2014 +0000

    Avoid an extra database query in schedule_snat_router

    bind_snat_servicenode already knows the chosen_agent. By waiting
    until after it is called, we can use it to avoid another db query.

    Closes-bug: #1353266
    Closes-bug: #1356639
    Co-Authored-By: Swaminathan Vasudevan <email address hidden>

    Change-Id: Iba5668b2717e188d5289ede982bfc1b46f4eeb5b

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-rc1 → 2014.2
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.