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

Cannot delete custom network using TCP API because ip not installed in Podman image #11403

Closed
mattymo opened this issue Sep 2, 2021 · 1 comment · Fixed by #11404
Closed
Assignees
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

@mattymo
Copy link
Contributor

mattymo commented Sep 2, 2021

/kind bug

Description
This problem occurs when using quay.io/podman/stable:v3.3.0

# docker --debug network rm testapp-245072058098
Error response from daemon: failed to delete the network interface "cni-podman1": exec: "ip": executable file not found in $PATH

Podman logs with debug enabled:

time="2021-09-02T07:22:15Z" level=info msg="APIHandler(dbecbfa5-7c84-487d-8654-c490d4720f64) -- DELETE /v1.40/networks/a7ed2df3f684 BEGIN"
time="2021-09-02T07:22:15Z" level=debug msg="APIHandler(dbecbfa5-7c84-487d-8654-c490d4720f64) -- Header: Accept=[*/*]"
time="2021-09-02T07:22:15Z" level=debug msg="APIHandler(dbecbfa5-7c84-487d-8654-c490d4720f64) -- Header: Connection=[Keep-Alive]"
time="2021-09-02T07:22:15Z" level=debug msg="APIHandler(dbecbfa5-7c84-487d-8654-c490d4720f64) -- Header: User-Agent=[Apache-HttpClient/4.5.10 (Java/11.0.12)]"
time="2021-09-02T07:22:15Z" level=debug msg="APIHandler(dbecbfa5-7c84-487d-8654-c490d4720f64) -- Header: Accept-Encoding=[gzip,deflate]"
time="2021-09-02T07:22:15Z" level=info msg="Request Failed(Internal Server Error): failed to delete the network interface \"cni-podman1\": exec: \"ip\": executable file not found in $PATH"
time="2021-09-02T07:22:15Z" level=debug msg="APIHandler(dbecbfa5-7c84-487d-8654-c490d4720f64) -- DELETE /v1.40/networks/a7ed2df3f684 END"

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.22.3
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - memory
  - devices
  - freezer
  - net_cls
  - blkio
  - perf_event
  - hugetlb
  - pids
  - net_prio
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.29-2.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: '
  cpus: 56
  distribution:
    distribution: fedora
    version: "34"
  eventLogger: file
  hostname: component-skeleton-dev-null-el7-244-b451121d-lbj57-7j316
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 3.10.0-1127.8.2.el7.x86_64
  linkmode: dynamic
  memFree: 443130503168
  memTotal: 540768747520
  ociRuntime:
    name: crun
    package: crun-0.21-1.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.21
      commit: c4c3cdf2ce408ed44a9e027c618473e6485c635b
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc34.x86_64
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 0
  swapTotal: 0
  uptime: 3216h 55m 18.06s (Approximately 134.00 days)
registries:
  platform-docker-repo.ap.int.zone:
    Blocked: false
    Insecure: true
    Location: platform-docker-repo.ap.int.zone
    MirrorByDigestOnly: false
    Mirrors: null
    Prefix: platform-docker-repo.ap.int.zone
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /var/lib/shared
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.7.1-1.fc34.x86_64
      Version: |-
        fusermount3 version: 3.10.4
        fuse-overlayfs: version 1.7.1
        FUSE library version 3.10.4
        using FUSE kernel interface version 7.31
    overlay.mountopt: nodev,fsync=0
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 8
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 3.3.0
  Built: 1629488174
  BuiltTime: Fri Aug 20 19:36:14 2021
  GitCommit: ""
  GoVersion: go1.16.6
  OsArch: linux/amd64
  Version: 3.3.0

This was apparently present in the image in the past #3886 but it got dropped

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 2, 2021
@Luap99 Luap99 self-assigned this Sep 2, 2021
@Luap99
Copy link
Member

Luap99 commented Sep 2, 2021

I take this, there is no point in using ip anyway. We should talk directly to the kernel.

Luap99 added a commit to Luap99/libpod that referenced this issue Sep 2, 2021
We only use the `ip` util to remove a network interface. We can do
this directly via the netlink lib, no need to call a external binary.

[NO TESTS NEEDED]

Fixes containers#11403

Signed-off-by: Paul Holzinger <[email protected]>
@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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 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