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 |
Fix Released
|
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 |
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) |
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)