Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1060340

Summary: Unused network namespaces remain after heat stack-delete
Product: Red Hat OpenStack Reporter: jliberma <jliberma>
Component: openstack-neutronAssignee: RHOS Maint <rhos-maint>
Status: CLOSED DUPLICATE QA Contact: Ofer Blaut <oblaut>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.0CC: chrisw, jliberma, lpeer, nyechiel, oblaut, sbaker, sdake, shardy, yeylon
Target Milestone: ---   
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-13 12:46:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
template + script
none
Command output to reproduce none

Description jliberma@redhat.com 2014-01-31 20:53:32 UTC
Description of problem:
After successfully deleting a heat template the netns remains on the Neutron server.

Version-Release number of selected component (if applicable):
2013.2.1-4

How reproducible: 
Every time.

Steps to Reproduce:
1. Deploy a stack with heat stack-create.
2. Delete the stack with heat stack-delete.
3. Run ip netns list on the Neutron L2/L3 agent server.

Actual results:
The unused netns will remain behind.

Expected results:
Unused netns should be removed when heat stack is deleted.

Additional info:  Some output --

[root@rhos6 ~]# ip netns list
qdhcp-4dec062e-79f8-4f2a-9705-59b518c0b3fd
qdhcp-deb5c3f2-1f7c-44dd-8b28-f4364e40bf12
qrouter-7ed067cf-c69c-44fc-a846-fdcdfb876579
qrouter-79a49987-4c64-4ae1-8b5a-ff3c3f6c7143
qrouter-e2a90927-c520-46a0-9835-ef3caa8867f8
qdhcp-cd01161e-94f1-4d39-8bd8-ed8f63d443ec
qrouter-71dfad9f-6ceb-4332-8c49-76eed8da709e
qdhcp-a2d64041-fd3c-4978-8164-e961711ac820
qrouter-74785ccc-de6d-4673-9a10-eaf92eb9c788
qrouter-1dc65a2f-081b-49e6-b86e-055b110b1d8b
qdhcp-7dccc428-24c9-43d1-9f1c-10f3e0462f71
qdhcp-4ac8b4a8-983b-4bb8-b94e-8f753b248ac9

Comment 2 Steven Dake 2014-02-02 06:17:02 UTC
This sounds more like a Neutron problem then a Heat problem.  Could you attach the template you used, so we can investigate if the correct component is openstack-heat or openstack-neutron?

Comment 4 jliberma@redhat.com 2014-02-03 18:10:50 UTC
Created attachment 858760 [details]
template + script

Comment 5 jliberma@redhat.com 2014-02-03 18:12:05 UTC
Added a script and template.

I deploy the public network and subnet manually via Neutron commands. Then I deploy the router, private net, private subnet, Cinder volume, floating IP, and instances via a HOT template.

Comment 6 Steven Dake 2014-02-03 18:59:11 UTC
Could you include the exact steps you use the launch the instance including the creation of the public network and subnet?  You can use the "script" command to record the operations you perform, and type exit to save it to the file "typescript".

Regards,
-steve

Comment 7 jliberma@redhat.com 2014-02-13 22:02:11 UTC
Created attachment 862999 [details]
Command output to reproduce

Comment 8 Steven Dake 2014-02-14 20:42:01 UTC
Steve Baker,

Could you verify my logic before I bump this bug to neutron?

Based upon this log information from Comment #7:

[root@rhos1 bz1064889(refarch_member)]# ssh rhos6 ip netns
Warning: Permanently added 'rhos6,10.16.137.106' (RSA) to the list of known hosts.
root@rhos6's password: 
qdhcp-53f673eb-a147-49aa-b590-beba2ec561b7
qrouter-96eb702a-bf57-408a-bf1f-3a9521481a43

And the fact that inspecting the code at:
https://github.com/openstack/heat/blob/stable/havana/heat/engine/resources/neutron/router.py#L62

shows the delete path, this looks like a netns leak in Neutron or one of its dependencies.

Would you concur?

Comment 9 Steve Baker 2014-07-27 21:36:02 UTC
Given that heat is not aware of the network namespaces this appears to be a neutron bug. I have reassigned the component.

Comment 10 lpeer 2014-08-13 12:43:52 UTC
It is a configuration in Neutron if to delete the namespace or not. 

The default is not to delete the name space, configuration values -

dhcp-agent: 
-----------
dhcp_delete_namespaces = False

l3-agent:
--------- 
router_delete_namespaces = False

This is turned off because of some issue we saw in RHEL 6.

Ofer - I couldn't find the report on the issue, can you?

Comment 11 lpeer 2014-08-13 12:46:08 UTC
> Ofer - I couldn't find the report on the issue, can you?

found it, BZ 1103461

*** This bug has been marked as a duplicate of bug 1103461 ***