DVR router namespaces are deleted when we manually move a DVR router from one SNAT_node to another SNAT_node even though there are active VMs in the node
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| neutron |
Medium
|
Swaminathan Vasudevan |
Bug Description
DVR router namespaces are deleted when we manually move the router from on dvr_snat node to another dvr_snat node.
It should be only deleting the snat_namespace and not the router_namespace, since there are 'dhcp' ports and 'vm' ports still serviced by DVR.
How to reproduce:
Configure a two node setup:
1. I have one node with Controller, compute and networking node with dhcp running in dvr_snat mode.
2. I have another node with compute and networking node without dhcp running in dvr_snat mode.
3. Now create network
4. Create a subnet
5. Create a router and attach the subnet to the router.
6. Also set a gateway to the router.
7. Now you should see that there are three namespaces in the first node.
a. snat_namespace
b. qrouter_namespace
c. dhcp_namespace
8. Now create a VM on the first node.
9. Now try to remove the router from the first agent and assign it to the second agent in the second node.
neutron l3-agent-
This currently removes both the snat_namespace and the router_namespace when there is still a valid vm and dhcp port.
Suspect that checking for available DVR service ports might be causing an issue here.
Will try to find out the root cause.
summary: |
DVR router namespaces are deleted when we manually move a DVR router - from one SNAT_node to another SNAT_node even though that are active VMs + from one SNAT_node to another SNAT_node even though there are active VMs in the node |
Fix proposed to branch: master
Review: https:/
Changed in neutron: | |
assignee: | nobody → Swaminathan Vasudevan (swaminathan-vasudevan) |
status: | New → In Progress |
Changed in neutron: | |
assignee: | Swaminathan Vasudevan (swaminathan-vasudevan) → Brian Haley (brian-haley) |
Changed in neutron: | |
importance: | Undecided → Medium |
Changed in neutron: | |
assignee: | Brian Haley (brian-haley) → Swaminathan Vasudevan (swaminathan-vasudevan) |
Changed in neutron: | |
assignee: | Swaminathan Vasudevan (swaminathan-vasudevan) → Oleg Bondarev (obondarev) |
Changed in neutron: | |
assignee: | Oleg Bondarev (obondarev) → Swaminathan Vasudevan (swaminathan-vasudevan) |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit c198710dc551bc0
Author: Swaminathan Vasudevan <email address hidden>
Date: Thu Mar 31 17:48:09 2016 -0700
DVR: Moving router from dvr_snat node removes the qrouters
Removing the router from dvr_snat node removes the qrouters
that are servicing the VM and dhcp ports.
If there are still dvr serviceable ports in the dvr_snat node,
and if router remove command is executed to remove the router
association from the dvr_snat agent then only the snat
functionality should be moved to the the different agent
and the router namespaces should be untouched.
This patch checks if there are any dvr serviceable ports for
the dvr router and if exists, it will not send a router_remove
message to the agent, but instead will send an router_update
message to the agent.
Change-Id: I5a3ba329346ab0
Closes-Bug: #1564575
Changed in neutron: | |
status: | In Progress → Fix Released |
Fix proposed to branch: stable/mitaka
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit 1f444899ca22584
Author: Swaminathan Vasudevan <email address hidden>
Date: Thu Mar 31 17:48:09 2016 -0700
DVR: Moving router from dvr_snat node removes the qrouters
Removing the router from dvr_snat node removes the qrouters
that are servicing the VM and dhcp ports.
If there are still dvr serviceable ports in the dvr_snat node,
and if router remove command is executed to remove the router
association from the dvr_snat agent then only the snat
functionality should be moved to the the different agent
and the router namespaces should be untouched.
This patch checks if there are any dvr serviceable ports for
the dvr router and if exists, it will not send a router_remove
message to the agent, but instead will send an router_update
message to the agent.
Change-Id: I5a3ba329346ab0
Closes-Bug: #1564575
(cherry picked from commit c198710dc551bc0
tags: | added: in-stable-mitaka |
This issue was fixed in the openstack/neutron 9.0.0.0b1 development milestone.
This issue was fixed in the openstack/neutron 8.1.2 release.
Remove_ router_ from_l3_ agent was overriden before with different actions based on the binding table, since we restricted the binding table to one, this might not be possible.
This was added by the patch. /review. openstack. org/#/c/ 122024/ 51
https:/
+ def remove_ router_ from_l3_ agent(self, context, agent_id, router_id): router( context, router_id) 'external_ gateway_ info'] and router. get('distribute d'): snat(context, router_id, agent_id=agent_id) not_sent = self.unbind_ router_ servicenode( context, not_sent: rpc_notifier. routers_ updated( routers= False) DVRsch_ db_mixin, router_ from_l3_ agent(
+ router = self.get_
+ if router[
+ binding = self.unbind_
+ if binding:
+ notification_
+ router_id, binding)
+ if notification_
+ self.l3_
+ context, [router_id], schedule_
+ else:
+ super(L3_
+ self).remove_
+ context, agent_id, router_id)