Bug 1062685

Summary: deleting netns ends in Device or resource busy and blocks further namespace usage
Product: Red Hat OpenStack Reporter: Miguel Angel Ajo <majopela>
Component: iprouteAssignee: Petr Šabata <psabata>
Status: CLOSED ERRATA QA Contact: Roey Dekel <rdekel>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.0CC: breeler, fdinitto, lhh, lpeer, majopela, nyechiel, oblaut, rhos-maint, sclewis, yeylon
Target Milestone: z4Keywords: Patch, ZStream
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: iproute-2.6.32-130.el6ost.netns.3 Doc Type: Bug Fix
Doc Text:
Cause: The /var/run/netns directory and all its subdirectories weren't mounted as shared, preventing unmounting of earlier created network namespaces as they were copied into the later ones. Consequence: It was sometimes impossible to delete a network namespace even when it wasn't directly in use. Fix: All netns mounts are now mounted as shared, allowing unmounts to propagate across network namespaces. Result: Deleting a network namespace now only fails if it's directly in use.
Story Points: ---
Clone Of:
: 1173435 (view as bug list) Environment:
Last Closed: 2014-05-29 20:00:04 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:
Bug Depends On:    
Bug Blocks: 1051028, 1051036, 1080561, 1173435    

Description Miguel Angel Ajo 2014-02-07 17:21:10 UTC
Description of problem:

   

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


How reproducible:

100%

Steps to Reproduce:
1. ip netns add netns_one
2. ip netns add netns_two
3. ip link add name if_one type veth peer name if_one_peer
4. ip link add name if_two type veth peer name if_two_peer
5. ip link set dev if_one_peer netns netns_one
6.  ip link set dev if_two_peer netns netns_two

7. ip netns exec netns_one bash

# in other terminal:

8. ip netns delete netns_two


Actual results:
> # => Cannot remove /var/run/netns/netns_two: Device or resource busy

Expected results:
Correct removal of the netns_two


Additional info:

Original description here:
http://permalink.gmane.org/gmane.linux.network/240875

Upstream iproute patch:
https://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/commit/?id=58a3e8270fe72f8ed92687d3a3132c2a708582dd

Comment 2 Miguel Angel Ajo 2014-02-10 09:31:05 UTC
Rising priority to high, since it's blocking 2 bugs with high priority.

Comment 3 Petr Šabata 2014-02-10 13:33:41 UTC
Patch available and seems to work.

Comment 4 Miguel Angel Ajo 2014-02-10 14:57:11 UTC
I confirm that it also happens if you omit steps 3,4,5,6.

Comment 8 Miguel Angel Ajo 2014-03-24 07:34:40 UTC
Please, this is an important bugfix we need for Thu 2014-04-03 , when we dev freeze RHOS 4.0 A4. Without this fix high availability will have severe problems.

Comment 11 Ofer Blaut 2014-04-22 09:21:41 UTC
Tested on iproute-2.6.32-130.el6ost.netns.3.x86_64
using steps 1,2,7,8

Comment 13 errata-xmlrpc 2014-05-29 20:00:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0576.html