Public bug reported:

Stale snat namespace on the controller after recovery of dead l3 agent.

Note: Only on Stable/LIBERTY Branch:


Setup:
Multiple controller (DVR_SNAT) setup.

Steps:
1) Create tenant network, subnet and router.
 2) Create a external network
 3) Attached internal & external network to a router
 4) Create VM on above tenant network.
 5) Make sure VM can reach outside using CSNAT.
 6) Find router hosting l3 agent and stop the l3 agent.
 7) Manually move router to other controller (dvr_snat mode). SNAT namespace 
should be create on new controller node.
 8) Start the l3 agent on the controller (the one that  stopped in step6)
 9) Notice that snat namespace is now available on 2 controller and it is not 
getting deleted from the agent which is not hosting it.


Example:
| cfa97c12-b975-4515-86c3-9710c9b88d76 | L3 agent           | vm2-ctl2-936 | 
:-)   | True           | neutron-l3-agent          |
| df4ca7c5-9bae-4cfb-bc83-216612b2b378 | L3 agent           | vm1-ctl1-936 | 
:-)   | True           | neutron-l3-agent          |


mysql> select * from csnat_l3_agent_bindings;
+--------------------------------------+--------------------------------------+---------+------------------+
| router_id                            | l3_agent_id                          | 
host_id | csnat_gw_port_id |
+--------------------------------------+--------------------------------------+---------+------------------+
| 0fb68420-9e69-41bb-8a88-8ab53b0faabb | cfa97c12-b975-4515-86c3-9710c9b88d76 | 
NULL    | NULL             |
+--------------------------------------+--------------------------------------+---------+------------------+


On vm1-ctl1-936

Stale SNAT namespace on Initially hosting controller.

ubuntu@vm1-ctl1-936:~/devstack$ sudo ip netns
snat-0fb68420-9e69-41bb-8a88-8ab53b0faabb
qrouter-0fb68420-9e69-41bb-8a88-8ab53b0faabb


On vm2-ctl2-936 (2nd Controller)

ubuntu@vm2-ctl2-936:~$ ip netns
snat-0fb68420-9e69-41bb-8a88-8ab53b0faabb
qrouter-0fb68420-9e69-41bb-8a88-8ab53b0faabb

** Affects: neutron
     Importance: Undecided
         Status: New


** Tags: l3-dvr-backlog

** Tags added: l3-dvr-backlog

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

Title:
  SNAT namespace is not getting cleared after the manual move of SNAT
  with dead agent

Status in neutron:
  New

Bug description:
  Stale snat namespace on the controller after recovery of dead l3
  agent.

  Note: Only on Stable/LIBERTY Branch:

  
  Setup:
  Multiple controller (DVR_SNAT) setup.

  Steps:
  1) Create tenant network, subnet and router.
   2) Create a external network
   3) Attached internal & external network to a router
   4) Create VM on above tenant network.
   5) Make sure VM can reach outside using CSNAT.
   6) Find router hosting l3 agent and stop the l3 agent.
   7) Manually move router to other controller (dvr_snat mode). SNAT namespace 
should be create on new controller node.
   8) Start the l3 agent on the controller (the one that  stopped in step6)
   9) Notice that snat namespace is now available on 2 controller and it is not 
getting deleted from the agent which is not hosting it.

  
  Example:
  | cfa97c12-b975-4515-86c3-9710c9b88d76 | L3 agent           | vm2-ctl2-936 | 
:-)   | True           | neutron-l3-agent          |
  | df4ca7c5-9bae-4cfb-bc83-216612b2b378 | L3 agent           | vm1-ctl1-936 | 
:-)   | True           | neutron-l3-agent          |

  
  mysql> select * from csnat_l3_agent_bindings;
  
+--------------------------------------+--------------------------------------+---------+------------------+
  | router_id                            | l3_agent_id                          
| host_id | csnat_gw_port_id |
  
+--------------------------------------+--------------------------------------+---------+------------------+
  | 0fb68420-9e69-41bb-8a88-8ab53b0faabb | cfa97c12-b975-4515-86c3-9710c9b88d76 
| NULL    | NULL             |
  
+--------------------------------------+--------------------------------------+---------+------------------+


  On vm1-ctl1-936

  Stale SNAT namespace on Initially hosting controller.

  ubuntu@vm1-ctl1-936:~/devstack$ sudo ip netns
  snat-0fb68420-9e69-41bb-8a88-8ab53b0faabb
  qrouter-0fb68420-9e69-41bb-8a88-8ab53b0faabb

  
  On vm2-ctl2-936 (2nd Controller)

  ubuntu@vm2-ctl2-936:~$ ip netns
  snat-0fb68420-9e69-41bb-8a88-8ab53b0faabb
  qrouter-0fb68420-9e69-41bb-8a88-8ab53b0faabb

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to