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 play kube --network flag #10807

Closed
e-minguez opened this issue Jun 29, 2021 · 0 comments · Fixed by #10816 or #11468
Closed

podman play kube --network flag #10807

e-minguez opened this issue Jun 29, 2021 · 0 comments · Fixed by #10816 or #11468
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

@e-minguez
Copy link
Contributor

e-minguez commented Jun 29, 2021

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

/kind bug

Description

podman play kube --network flag doesn't allow to specify port_handler settings, instead it only allows you to connect the pod to CNI networks. From the help command:

--network string                Connect pod to CNI network(s)

Steps to reproduce the issue:

  1. Create any yaml file to run a pod
  2. Run podman play kube --network=slirp4netns:port_handler=slirp4netns /path/to/your/yaml

Describe the results you received:

ERRO[0000] Error freeing pod lock after failed creation: no such file or directory
Error: error adding Infra Container: unable to find network configuration for slirp4netns:port_handler=slirp4netns: network not found

Describe the results you expected:

The pod is able to run properly with slirp4netns and its options.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

podman version 3.2.1

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.21.0
  cgroupControllers: []
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.29-1.el8.3.5.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: '
  cpus: 8
  distribution:
    distribution: '"centos"'
    version: "8"
  eventLogger: journald
  hostname: endurance.minwi.lan
  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: 4.18.0-310.el8.x86_64
  linkmode: dynamic
  memFree: 29252780032
  memTotal: 33393192960
  ociRuntime:
    name: crun
    package: crun-0.20.1-1.el8.3.2.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.20.1
      commit: 0d42f1109fd73548f44b01b3e84d04a279e99d2e
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/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: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.8-4.el8.7.34.x86_64
    version: |-
      slirp4netns version 1.1.8
      commit: d361001f495417b880f20329121e3aa431a8f90f
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.1
  swapFree: 4290768896
  swapTotal: 4290768896
  uptime: 22h 58m 34.14s (Approximately 0.92 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/edu/.config/containers/storage.conf
  containerStore:
    number: 11
    paused: 0
    running: 11
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.5.0-1.el8.5.12.x86_64
      Version: |-
        fusermount3 version: 3.2.1
        fuse-overlayfs: version 1.5
        FUSE library version 3.2.1
        using FUSE kernel interface version 7.26
  graphRoot: /home/edu/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 17
  runRoot: /run/user/1000
  volumePath: /home/edu/.local/share/containers/storage/volumes
version:
  APIVersion: 3.2.1
  Built: 1624286448
  BuiltTime: Mon Jun 21 16:40:48 2021
  GitCommit: ""
  GoVersion: go1.16.4
  OsArch: linux/amd64
  Version: 3.2.1

Package info (e.g. output of rpm -q podman or apt list podman):

Name        : podman
Epoch       : 0
Version     : 3.2.1
Release     : 1.el8.4.1
Architecture: x86_64
Install Date: lun 28 jun 2021 09:55:34 CEST
Group       : Unspecified
Size        : 54338294
License     : ASL 2.0
Signature   : RSA/SHA256, lun 21 jun 2021 16:43:00 CEST, Key ID 4d64390375060aa4
Source RPM  : podman-3.2.1-1.el8.4.1.src.rpm
Build Date  : lun 21 jun 2021 16:42:50 CEST
Build Host  : goat09
Relocations : (not relocatable)
Vendor      : obs://build.opensuse.org/devel:kubic
URL         : https://podman.io/
Summary     : Manage Pods, Containers and Container Images

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

Physical box running CentOS Stream with kubic packages for podman.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 29, 2021
@rhatdan rhatdan self-assigned this Jun 29, 2021
rhatdan added a commit to rhatdan/podman that referenced this issue Jun 30, 2021
Since Podman create/run can support this, so should play.

Fixes: containers#10807

Signed-off-by: Daniel J Walsh <[email protected]>
Luap99 added a commit to Luap99/libpod that referenced this issue Sep 8, 2021
Commit 092902b introduced advanced network options for podman play
kube. However this never worked because it unconditionally set the
network mode to bridge after it parsed the network option.

Added a test to ensure the correct mode is set.

Truly fixes containers#10807

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
2 participants