When removing a router, its namespace is not cleaned from the system

Bug #1250366 reported by Rami Vaknin
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Santosh Kumar

Bug Description

Version
=======
Hanavan on rhel

Description
===========
Scenario:
1. Create a router
2. Create a network
3. Create a subnet associated with the newly-created network
4. Attach the subnet interface to the router, a namespace for that router should be created (visible in the output of "ip netns" command)
5. Remove the interface from the router
6. Delete the router, this deletion opration should also clean the namespace that was created for the router, however this namespace is not deleted.
Note that the namespace contains the deleted router's id in its name.

$ neutron router-list
<empty output>

$ ip netns
qlbaas-ce1dfacd-77df-4f6a-819f-a56e17927546
qrouter-3480f0cf-8f98-4f5c-a5fc-b422cec5a3c1

$ neutron router-create router2
Created a new router:
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| external_gateway_info | |
| id | f4069e92-a595-4692-a7a8-9158df5715e7 |
| name | router2 |
| status | ACTIVE |
| tenant_id | c6218eb9b8c44c91861ea7998db55505 |
+-----------------------+--------------------------------------+

$ neutron net-create test_name
Created a new network:
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| admin_state_up | True |
| id | db11452e-2066-4657-915d-4eb6bbb3525a |
| name | test_name |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | c6218eb9b8c44c91861ea7998db55505 |
+----------------+--------------------------------------+

$ neutron subnet-create db11452e-2066-4657-915d-4eb6bbb3525a 172.16.0.0/24
Created a new subnet:
+------------------+------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------+
| allocation_pools | {"start": "172.16.0.2", "end": "172.16.0.254"} |
| cidr | 172.16.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 172.16.0.1 |
| host_routes | |
| id | 959cabf8-9a56-4333-b6fb-2ee384beff2c |
| ip_version | 4 |
| name | |
| network_id | db11452e-2066-4657-915d-4eb6bbb3525a |
| tenant_id | c6218eb9b8c44c91861ea7998db55505 |
+------------------+------------------------------------------------+

$ neutron router-interface-add f4069e92-a595-4692-a7a8-9158df5715e7 959cabf8-9a56-4333-b6fb-2ee384beff2c
Added interface b3b109c0-b56e-4fe3-bb51-c6c890f37175 to router f4069e92-a595-4692-a7a8-9158df5715e7.

$ ip netns
qlbaas-ce1dfacd-77df-4f6a-819f-a56e17927546
qrouter-3480f0cf-8f98-4f5c-a5fc-b422cec5a3c1
qrouter-f4069e92-a595-4692-a7a8-9158df5715e7

$ neutron router-interface-delete f4069e92-a595-4692-a7a8-9158df5715e7 959cabf8-9a56-4333-b6fb-2ee384beff2c
Removed interface from router f4069e92-a595-4692-a7a8-9158df5715e7.

$ neutron router-delete router2
Deleted router: router2

$ ip netns
qlbaas-ce1dfacd-77df-4f6a-819f-a56e17927546
qrouter-3480f0cf-8f98-4f5c-a5fc-b422cec5a3c1
qrouter-f4069e92-a595-4692-a7a8-9158df5715e7

Tags: l3-ipam-dhcp
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

That might be a known common issue: https://bugs.launchpad.net/neutron/+bug/1052535
Please attach the logs from l3 agent, there should be some additional information on this issue.

tags: added: l3-ipam-dhcp
Changed in neutron:
status: New → Confirmed
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

Please also specify which plugin/agent are you using?

Revision history for this message
Oleg Bondarev (obondarev) wrote :

Similar bug with rich history :) - https://bugs.launchpad.net/neutron/+bug/1052535

Revision history for this message
Rami Vaknin (rvaknin) wrote :

Working with ovs.
So can I close this one? does the other bug includes the router scenario or only will fix the network scenario?

Changed in neutron:
assignee: nobody → Santosh Kumar (santosh-kumar4)
Revision history for this message
Santosh Kumar (santosh-kumar4) wrote :
Download full text (4.1 KiB)

Hi Rami,

I have executed the same use case as mentioned above in bug, however my observation is .. that it takes some time around 15 minutes.. after that router name space gets deleted it self from Network Node.

Please let me know , if you have same observation.

1. Create Network:

sdn@santosh-osc:~$ neutron net-create n8
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | ef341e64-ce2e-4663-aa3c-d38a0fadf02d |
| name | n8 |
| provider:network_type | vlan |
| provider:physical_network | physnet1 |
| provider:segmentation_id | 1000 |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 59ec1d4be19845c282b7bc63507a0834 |
+---------------------------+--------------------------------------+

2. Create Subnet:

sdn@santosh-osc:~$ neutron subnet-create n8 10.10.10.0/24 --name s8
Created a new subnet:
+------------------+------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------+
| allocation_pools | {"start": "10.10.10.2", "end": "10.10.10.254"} |
| cidr | 10.10.10.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.10.10.1 |
| host_routes | |
| id | 14eb0ef9-35a7-4f92-b633-982870aa1eb1 |
| ip_version | 4 |
| name | s8 |
| network_id | ef341e64-ce2e-4663-aa3c-d38a0fadf02d |
| tenant_id | 59ec1d4be19845c282b7bc63507a0834 |
+------------------+------------------------------------------------+

3. Create Router :

sdn@santosh-osc:~$ neutron router-create r8
Created a new router:
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| external_gateway_info | |
| id | f362c702-6842-44e7-8a0f-86a1ce4e8633 |
| name | r8 |
| status | ACTIVE |
| tenant_id | 59ec1d4be19845c282b7bc63507a0834 |
+-----------------------+--------------------------...

Read more...

Revision history for this message
Santosh Kumar (santosh-kumar4) wrote :

Hi ,

I have discussion with Author of Bug , he do not have any issue if stale namespace gets cleared after some time.
Can anybody pls confirm the same ....

Regards,
Santosh Kumar

Changed in neutron:
status: Confirmed → Incomplete
Revision history for this message
Santosh Kumar (santosh-kumar4) wrote :

As per my discussion with <email address hidden> , marking this bug invalid.

Changed in neutron:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.