iproute - Cannot remove /var/run/netns/namespace: Device or resource busy

Bug #1238981 reported by Chris J Arges
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iproute (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Medium
Chris J Arges
Quantal
Fix Released
Medium
Chris J Arges
Raring
Fix Released
Medium
Chris J Arges

Bug Description

[Impact]
Trying to remove a namespace when another namespace is mounted may fail.
Upstream discussion here: http://comments.gmane.org/gmane.linux.network/240795
This affects P/Q/R, but is fixed in S.

[Test Case]
Run this as root in one terminal:

ip netns add netns_one
ip netns add netns_two
ip link add name if_one type veth peer name if_one_peer
ip link add name if_two type veth peer name if_two_peer
ip link set dev if_one_peer netns netns_one
ip link set dev if_two_peer netns netns_two
ip netns exec netns_one bash

Run this as root in another terminal:
ip netns delete netns_two

It should pass, but this fails with:
Cannot remove /var/run/netns/netns_two: Device or resource busy

[Fix]
This patch fixes the issue:
https://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/commit/?id=58a3e8270fe72f8ed92687d3a3132c2a708582dd

Chris J Arges (arges)
Changed in iproute (Ubuntu):
status: New → Fix Released
Changed in iproute (Ubuntu Precise):
assignee: nobody → Chris J Arges (arges)
Changed in iproute (Ubuntu Quantal):
assignee: nobody → Chris J Arges (arges)
Changed in iproute (Ubuntu Raring):
assignee: nobody → Chris J Arges (arges)
Changed in iproute (Ubuntu Precise):
importance: Undecided → Medium
Changed in iproute (Ubuntu Quantal):
importance: Undecided → Medium
Changed in iproute (Ubuntu Raring):
importance: Undecided → Medium
Changed in iproute (Ubuntu Precise):
status: New → Triaged
Changed in iproute (Ubuntu Quantal):
status: New → Triaged
Changed in iproute (Ubuntu Raring):
status: New → Triaged
Changed in iproute (Ubuntu Precise):
status: Triaged → In Progress
Changed in iproute (Ubuntu Quantal):
status: Triaged → In Progress
Changed in iproute (Ubuntu Raring):
status: Triaged → In Progress
Revision history for this message
Chris J Arges (arges) wrote :
Chris J Arges (arges)
description: updated
Revision history for this message
Chris J Arges (arges) wrote :

packages uploaded to precise/quantal/raring -proposed waiting on approval

Revision history for this message
Stéphane Graber (stgraber) wrote : Please test proposed package

Hello Chris, or anyone else affected,

Accepted iproute into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/iproute/20111117-1ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in iproute (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in iproute (Ubuntu Quantal):
status: In Progress → Fix Committed
Revision history for this message
Stéphane Graber (stgraber) wrote :

Hello Chris, or anyone else affected,

Accepted iproute into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/iproute/20120521-3ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in iproute (Ubuntu Raring):
status: In Progress → Fix Committed
Revision history for this message
Stéphane Graber (stgraber) wrote :

Hello Chris, or anyone else affected,

Accepted iproute into raring-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/iproute/20121211-2ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Chris J Arges (arges) wrote :

I have verified this in P/Q/R .

tags: added: verification-done
removed: verification-needed
Chris J Arges (arges)
tags: added: verification-failed
removed: verification-done
Chris J Arges (arges)
Changed in iproute (Ubuntu Quantal):
status: Fix Committed → In Progress
Changed in iproute (Ubuntu Precise):
status: Fix Committed → In Progress
Changed in iproute (Ubuntu Raring):
status: Fix Committed → In Progress
tags: removed: verification-failed
Revision history for this message
Chris J Arges (arges) wrote :

The following case can cause a potential issue:

ip netns add 1
ip netns exec 1 bash

< upgrade package >

ip netns add 2
ip netns exec 2 bash

ip netns exec 1 bash

Here we get "seting the network namespace failed: Invalid argument"

However, if you add the namespace from not within an already exec'ed namespace then the above works fine. Therefore I believe this shouldn't be an issue with the package as it is.

In addition, if users upgrade their iproute package without existing namespaces they won't be affected. Or if they have existing namespaces and reboot they won't be affected.

Also the above is an unsupported case after discussion with upstream:
http://marc.info/?l=linux-netdev&m=138394662105029&w=2

Marking this verified as it does fix the original bug.

tags: added: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iproute - 20111117-1ubuntu2.1

---------------
iproute (20111117-1ubuntu2.1) precise; urgency=low

  * Fix ip netns delete failures. (LP: #1238981)
 -- Chris J Arges <email address hidden> Mon, 07 Oct 2013 10:59:29 -0500

Changed in iproute (Ubuntu Precise):
status: In Progress → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iproute - 20120521-3ubuntu1.1

---------------
iproute (20120521-3ubuntu1.1) quantal; urgency=low

  * Fix ip netns delete failures. (LP: #1238981)
 -- Chris J Arges <email address hidden> Tue, 15 Oct 2013 14:50:24 -0500

Changed in iproute (Ubuntu Quantal):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iproute - 20121211-2ubuntu1

---------------
iproute (20121211-2ubuntu1) raring; urgency=low

  * Fix ip netns delete failures. (LP: #1238981)
 -- Chris J Arges <email address hidden> Tue, 15 Oct 2013 14:50:33 -0500

Changed in iproute (Ubuntu Raring):
status: In Progress → Fix Released
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.