Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman network rm --force fails when the network is used by a pod #7791

Closed
Luap99 opened this issue Sep 27, 2020 · 0 comments · Fixed by #7793
Closed

podman network rm --force fails when the network is used by a pod #7791

Luap99 opened this issue Sep 27, 2020 · 0 comments · Fixed by #7793
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Luap99
Copy link
Member

Luap99 commented Sep 27, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

podman network rm --force fails when the network is used by a pod.

Steps to reproduce the issue:

$ sudo podman network create testnet
/etc/cni/net.d/testnet.conflist
$ sudo podman pod create --network testnet
38e69fa18b8462743bd878050ae2cf643c38debb8fa147dd384401bdf1c82ea3
$ sudo podman network rm -f testnet
Error: container 5cbf27a71bbd576c4449788859148feb4ec46a8bcfd6068ff06b01fc98353427 is the infra container of pod 38e69fa18b8462743bd878050ae2cf643c38debb8fa147dd384401bdf1c82ea3 and cannot be removed without removing the pod
$ sudo podman network ls
NAME         VERSION  PLUGINS
podman       0.4.0    bridge,portmap,firewall,tuning
testnet      0.4.0    bridge,portmap,firewall,dnsname

Describe the results you received:

Error: container 5cbf27a71bbd576c4449788859148feb4ec46a8bcfd6068ff06b01fc98353427 is the infra container of pod 38e69fa18b8462743bd878050ae2cf643c38debb8fa147dd384401bdf1c82ea3 and cannot be removed without removing the pod
The network is not removed with --force set.

Describe the results you expected:

The network and pod should have been removed.

Output of podman version:

Version:      2.2.0-dev
API Version:  2.0.0
Go Version:   go1.14.9
Git Commit:   03d01abec6d028e9d5f60615b0451e42d0611d1d
Built:        Sun Sep 27 22:12:23 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.16.2
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.21-2.fc32.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 81d18b6c3ffc266abdef7ca94c1450e669a6a388'
  cpus: 16
  distribution:
    distribution: fedora
    version: "32"
  eventLogger: journald
  hostname: paul-pc
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.8.11-200.fc32.x86_64
  linkmode: dynamic
  memFree: 5456822272
  memTotal: 16790605824
  ociRuntime:
    name: crun
    package: crun-0.14.1-5.fc32.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.14.1
      commit: 598ea5e192ca12d4f6378217d3ab1415efeddefa
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.4-1.fc32.x86_64
    version: |-
      slirp4netns version 1.1.4
      commit: b66ffa8e262507e37fca689822d23430f3357fe8
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 2
  swapFree: 8427139072
  swapTotal: 8463052800
  uptime: 2h 56m 37.67s (Approximately 0.08 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/paul/.config/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 0
    stopped: 2
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /home/paul/container_images
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.1.2-1.fc32.x86_64
      Version: |-
        fusermount3 version: 3.9.1
        fuse-overlayfs: version 1.1.0
        FUSE library version 3.9.1
        using FUSE kernel interface version 7.31
  graphRoot: /home/paul/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 5
  runRoot: /run/user/1000/containers
  volumePath: /home/paul/.local/share/containers/storage/volumes
version:
  APIVersion: 2.0.0
  Built: 1601237543
  BuiltTime: Sun Sep 27 22:12:23 2020
  GitCommit: 03d01abec6d028e9d5f60615b0451e42d0611d1d
  GoVersion: go1.14.9
  OsArch: linux/amd64
  Version: 2.2.0-dev
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 27, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants