Skip to content

unmounting network namespace for container failed to remove ns path device or resource busy #1321

@rgl

Description

@rgl

Describe the bug

Sometimes podman compose down --volumes fails with the error: unmounting network namespace for container failed to remove ns path device or resource busy.

To Reproduce

Steps to reproduce the behavior:

  1. clone https://github.com/rgl/ubuntu-podman-compose-example
  2. podman compose up --build -d
  3. podman compose down --volumes

Expected behavior

I expected to see no errors.

Actual behavior

$ podman compose down --volumes
2025-10-11 15:53:13.803 time="2025-10-11T15:53:13+01:00" level=error msg="Unable to clean up network for container 98796ebd2a9ac7032845c3ded3768a933a72b72c2d0fb7f4179368bc1e66f546: \"unmounting network namespace for container 98796ebd2a9ac7032845c3ded3768a933a72b72c2d0fb7f4179368bc1e66f546: failed to remove ns path /run/user/112/netns/netns-c5b0e388-2628-cc82-7bff-893543533369: remove /run/user/112/netns/netns-c5b0e388-2628-cc82-7bff-893543533369: device or resource busy\""
2025-10-11 15:53:13.803 jenkins-ubuntu-podman-compose-example-2_etcd_1
2025-10-11 15:53:14.062 jenkins-ubuntu-podman-compose-example-2_hello_1
2025-10-11 15:53:14.062 jenkins-ubuntu-podman-compose-example-2_hello_1
2025-10-11 15:53:14.321 jenkins-ubuntu-podman-compose-example-2_etcd_1
2025-10-11 15:53:14.321 jenkins-ubuntu-podman-compose-example-2_etcd-data
2025-10-11 15:53:14.321 3d42ce140b6cc93ab60a2ed95c9079f72ca6bfd074d6fce97ae5d849b2ad0229
2025-10-11 15:53:14.591 jenkins-ubuntu-podman-compose-example-2_default

Output

$ podman-compose version
podman-compose version 1.5.0
podman version 4.9.3

Environment:

  • OS: Ubuntu Linux 24.04
  • podman version: 4.9.3
  • podman compose version: 1.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions