← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1535557] [NEW] Multiple l3 agents are scheduled to host one newly created router if multiple interfaces are added at the same time

 

Public bug reported:

I have three all-in-one controller nodes deployed by DevStack with the
latest codes. Neutron servers on these controllers are set behind
Pacemaker and HAProxy to realize active/active HA. MariaDB Galera
cluster is used as my database backend.

In neutron.conf, I have made the following changes:
router_scheduler_driver = neutron.scheduler.l3_agent_scheduler.ChanceScheduler

When we add interfaces of multiple subnets to a newly created router, we
might end up with more than one l3 agents hosting this router. This bug
is not easy to reproduce. You may need to repeat the following steps
several times.

How to reproduce:

Prerequisite
make the following changes in neutron.conf
[DEFAULT]
router_scheduler_driver = neutron.scheduler.l3_agent_scheduler.ChanceScheduler

Step 0: Confirm multiple l3 agents are running
$ neutron agent-list --agent_type='L3 agent'
my result is shown http://paste.openstack.org/show/483963/

Step 1: Create two networks
$ neutron net-create net-l3agent-test-1
$ neutron net-create net-l3agent-test-2

Step 2: Add one subnet to each of the two networks
$ neutron subnet-create --name subnet-l3agent-test-1 net-l3agent-test-1 192.168.11.0/24
$ neutron subnet-create --name subnet-l3agent-test-2 net-l3agent-test-2 192.168.12.0/24

Step 3: Create a router
$ neutron router-create router-l3agent-test

Step 4: Add the two subnets as the router's interfaces immediately after creating the router at the same time
On controller1:
$ neutron router-interface-add router-l3agent-test subnet-l3agent-test-1
On controller2:
$ neutron router-interface-add router-l3agent-test subnet-l3agent-test-2

Step 5: Check which l3 agent(s) is/are hosting the router
$ neutron l3-agent-list-hosting-router router-l3agent-test
my result is shown http://paste.openstack.org/show/483962/

If you end up with only one l3 agent, please proceed as follows
Step 6: Clear interfaces on the router
$ neutron router-interface-delete router-l3agent-test subnet-l3agent-test-1
$ neutron router-interface-delete router-l3agent-test subnet-l3agent-test-2

Step 7: Delete the router
$ neutron router-delete router-l3agent-test

Go back to Step 3-5

** Affects: neutron
     Importance: Undecided
     Assignee: Lujin Luo (luo-lujin)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => Lujin Luo (luo-lujin)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1535557

Title:
  Multiple l3 agents are scheduled to host one newly created router if
  multiple interfaces are added at the same time

Status in neutron:
  New

Bug description:
  I have three all-in-one controller nodes deployed by DevStack with the
  latest codes. Neutron servers on these controllers are set behind
  Pacemaker and HAProxy to realize active/active HA. MariaDB Galera
  cluster is used as my database backend.

  In neutron.conf, I have made the following changes:
  router_scheduler_driver = neutron.scheduler.l3_agent_scheduler.ChanceScheduler

  When we add interfaces of multiple subnets to a newly created router,
  we might end up with more than one l3 agents hosting this router. This
  bug is not easy to reproduce. You may need to repeat the following
  steps several times.

  How to reproduce:

  Prerequisite
  make the following changes in neutron.conf
  [DEFAULT]
  router_scheduler_driver = neutron.scheduler.l3_agent_scheduler.ChanceScheduler

  Step 0: Confirm multiple l3 agents are running
  $ neutron agent-list --agent_type='L3 agent'
  my result is shown http://paste.openstack.org/show/483963/

  Step 1: Create two networks
  $ neutron net-create net-l3agent-test-1
  $ neutron net-create net-l3agent-test-2

  Step 2: Add one subnet to each of the two networks
  $ neutron subnet-create --name subnet-l3agent-test-1 net-l3agent-test-1 192.168.11.0/24
  $ neutron subnet-create --name subnet-l3agent-test-2 net-l3agent-test-2 192.168.12.0/24

  Step 3: Create a router
  $ neutron router-create router-l3agent-test

  Step 4: Add the two subnets as the router's interfaces immediately after creating the router at the same time
  On controller1:
  $ neutron router-interface-add router-l3agent-test subnet-l3agent-test-1
  On controller2:
  $ neutron router-interface-add router-l3agent-test subnet-l3agent-test-2

  Step 5: Check which l3 agent(s) is/are hosting the router
  $ neutron l3-agent-list-hosting-router router-l3agent-test
  my result is shown http://paste.openstack.org/show/483962/

  If you end up with only one l3 agent, please proceed as follows
  Step 6: Clear interfaces on the router
  $ neutron router-interface-delete router-l3agent-test subnet-l3agent-test-1
  $ neutron router-interface-delete router-l3agent-test subnet-l3agent-test-2

  Step 7: Delete the router
  $ neutron router-delete router-l3agent-test

  Go back to Step 3-5

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


Follow ups