podman: ```podman pod create``` command ignored the default pod infra image specified in containers.conf

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

/kind bug

Description

podman pod create command ignored the default pod infra image specified in containers.conf

also the commands podman create --pod new: podman run --pod new:

#  1. /usr/share/containers/containers.conf
#  2. /etc/containers/containers.conf
#  3. $HOME/.config/containers/containers.conf

issue exist on CentOS Stream 9 with podman 3.4.3-dev and Red Hat Enterprise Linux 9.0 Beta (Plow) with podman 4.0.0-dev

Steps to reproduce the issue:

$ grep infra_image ~/.config/containers/containers.conf
#infra_image = "k8s.gcr.io/pause:3.4.1"
infra_image = "registry.access.redhat.com/ubi8/pause"

$ podman images
REPOSITORY  TAG         IMAGE ID    CREATED     SIZE

$ podman pod create --name example

$ podman images
REPOSITORY        TAG         IMAGE ID      CREATED       SIZE
k8s.gcr.io/pause  3.5         f7ff3c404263  9 months ago  491 kB

$ podman create --pod new:example1 ubi8-micro date

$ podman images
REPOSITORY                             TAG         IMAGE ID      CREATED       SIZE
registry.access.redhat.com/ubi8-micro  latest      ca5ba0a917b4  3 weeks ago   53.8 MB
k8s.gcr.io/pause                       3.5         f7ff3c404263  9 months ago  491 kB

$ podman run --pod new:example2 ubi8-micro date
Fri Jan  7 18:42:13 UTC 2022

$ podman images
REPOSITORY                             TAG         IMAGE ID      CREATED       SIZE
registry.access.redhat.com/ubi8-micro  latest      ca5ba0a917b4  3 weeks ago   53.8 MB
k8s.gcr.io/pause                       3.5         f7ff3c404263  9 months ago  491 kB

Describe the results you received:

$ podman images
REPOSITORY        TAG         IMAGE ID      CREATED       SIZE
...
k8s.gcr.io/pause  3.5         f7ff3c404263  9 months ago  491 kB

Describe the results you expected:

$ podman images
REPOSITORY                             TAG         IMAGE ID      CREATED      SIZE
...
registry.access.redhat.com/ubi8/pause  latest      5e78f220d29d  2 weeks ago  3.42 MB

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

Output of podman version:

CentOS Stream 9

Version:      3.4.3-dev
API Version:  3.4.3-dev
Go Version:   go1.17.2
Built:        Fri Nov 26 10:06:08 2021
OS/Arch:      linux/arm64

Enterprise Linux 9.0 Beta (Plow)

Version:      4.0.0-dev
API Version:  4.0.0-dev
Go Version:   go1.16.6
Built:        Mon Oct 11 10:44:49 2021
OS/Arch:      linux/arm64

Output of podman info --debug:

CentOS Stream 9

host:
  arch: arm64
  buildahVersion: 1.23.1
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.30-3.el9.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.30, commit: 6787998e1edd409420620e34a693f1e0874d960d'
  cpus: 1
  distribution:
    distribution: '"centos"'
    version: "9"
  eventLogger: journald
  hostname: mycentos
  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.14.0-34.el9.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 529805312
  memTotal: 1001164800
  ociRuntime:
    name: crun
    package: crun-1.3-1.el9.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.3
      commit: 4f6c8e0583c679bfee6a899c05ac6b916022561b
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_NET_RAW,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-3.el9.aarch64
    version: |-
      slirp4netns version 1.1.8
      commit: d361001f495417b880f20329121e3aa431a8f90f
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.2
  swapFree: 2147479552
  swapTotal: 2147479552
  uptime: 20m 32.45s
plugins:
  log:
  - k8s-file
  - none
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - quay.io
  - docker.io
store:
  configFile: /home/user1/.config/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 2
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/user1/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 2
  runRoot: /run/user/1000/containers
  volumePath: /home/user1/.local/share/containers/storage/volumes
version:
  APIVersion: 3.4.3-dev
  Built: 1637917568
  BuiltTime: Fri Nov 26 10:06:08 2021
  GitCommit: ""
  GoVersion: go1.17.2
  OsArch: linux/arm64
  Version: 3.4.3-dev

Enterprise Linux 9.0 Beta (Plow)

host:
  arch: arm64
  buildahVersion: 1.23.1
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.30-3.el9.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.30, commit: 5cacd3c61336391b984d21d5ad89265dd6a72779'
  cpus: 1
  distribution:
    distribution: '"rhel"'
    version: "9.0"
  eventLogger: file
  hostname: myrhel
  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.14.0-21.el9.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 649568256
  memTotal: 1001230336
  ociRuntime:
    name: crun
    package: crun-1.3-1.el9.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.3
      commit: 4f6c8e0583c679bfee6a899c05ac6b916022561b
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_NET_RAW,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-3.el9.aarch64
    version: |-
      slirp4netns version 1.1.8
      commit: d361001f495417b880f20329121e3aa431a8f90f
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.2
  swapFree: 2147479552
  swapTotal: 2147479552
  uptime: 2m 7.99s
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - quay.io
  - docker.io
store:
  configFile: /home/user1/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/user1/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/user/1000/containers
  volumePath: /home/user1/.local/share/containers/storage/volumes
version:
  APIVersion: 4.0.0-dev
  Built: 1633941889
  BuiltTime: Mon Oct 11 10:44:49 2021
  GitCommit: ""
  GoVersion: go1.16.6
  OsArch: linux/arm64
  Version: 4.0.0-dev

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

CentOS Stream 9

podman-3.4.3-0.6.el9.aarch64

Enterprise Linux 9.0 Beta (Plow)

podman-4.0.0-0.22.el9.aarch64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md) Yes

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

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Your failure case is actually another 4.0 change - the default is now to not pull the infra image, but to build one locally based on a local pause binary - so the localhost image is the one we built. This improves Podman’s ability to work on systems without an internet connection.

Same issue on the MacBook Pro M1 and additionally the command podman play kube does not give the correct result here either

$ podman version
Client:
Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.17.3
Built:        Wed Dec  8 19:41:11 2021
OS/Arch:      darwin/arm64

Server:
Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.16.8
Built:        Wed Dec  8 22:48:10 2021
OS/Arch:      linux/arm64

$ podman machine ls
NAME                     VM TYPE     CREATED       LAST UP            CPUS        MEMORY      DISK SIZE
podman-machine-default*  qemu        22 hours ago  Currently running  1           2.147GB     10.74GB

$ podman machine ssh cat /etc/os-release
Warning: Permanently added '[localhost]:62273' (ED25519) to the list of known hosts.
NAME="Fedora Linux"
VERSION="35.20220103.2.0 (CoreOS)"
ID=fedora
VERSION_ID=35
VERSION_CODENAME=""
PLATFORM_ID="platform:f35"
PRETTY_NAME="Fedora CoreOS 35.20220103.2.0"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:35"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=35
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=35
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='35.20220103.2.0'
DEFAULT_HOSTNAME=localhost

$ podman pod create --help | grep ubi
      --infra-image string            The image of the infra container to associate with the pod (default "registry.access.redhat.com/ubi8/pause")

$ podman pod create
e6d213d5515dfb4500a7f72cd947176728d1cc97a49242d3940b17b90a05d3bc

$ podman ps -a
CONTAINER ID  IMAGE                 COMMAND     CREATED         STATUS      PORTS       NAMES
34f3b5f03547  k8s.gcr.io/pause:3.5              18 seconds ago  Created                 e6d213d5515d-infra

$ podman pod rm -a
e6d213d5515dfb4500a7f72cd947176728d1cc97a49242d3940b17b90a05d3bc

$ podman rmi -a
Untagged: k8s.gcr.io/pause:3.5
Deleted: f7ff3c40426311c68450b0a2fce030935a625cef0e606ff2e6756870f552e760

$ podman run --pod new:example ubi8-micro date
Resolved "ubi8-micro" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8-micro:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob sha256:dbadbc21a470c77ace3eb82e7a8a61de6142880406570585275538bbdf0e976b
Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
Copying blob sha256:dbadbc21a470c77ace3eb82e7a8a61de6142880406570585275538bbdf0e976b
Copying config sha256:ca5ba0a917b49983239b2cec0e53f6e6026342af0a23819e625556e0342207a8
Writing manifest to image destination
Storing signatures
Sat Jan  8 14:57:19 UTC 2022

$ podman ps -a
CONTAINER ID  IMAGE                                         COMMAND     CREATED         STATUS                     PORTS       NAMES
6fb8b9ac9403  k8s.gcr.io/pause:3.5                                      40 seconds ago  Up 40 seconds ago                      a2527b288310-infra
a1989a1795d4  registry.access.redhat.com/ubi8-micro:latest  date        40 seconds ago  Exited (0) 40 seconds ago              amazing_ganguly

$ podman pod rm -a
a2527b288310a7ebe56820ebb5e8d7396fa73eb34561e32f42e4847cfb84160c

$ podman rmi -a
Untagged: registry.access.redhat.com/ubi8-micro:latest
Untagged: k8s.gcr.io/pause:3.5
Deleted: ca5ba0a917b49983239b2cec0e53f6e6026342af0a23819e625556e0342207a8
Deleted: f7ff3c40426311c68450b0a2fce030935a625cef0e606ff2e6756870f552e760

$ podman play kube example.yml
Pod:
fbabf81d7a8008e96a9ed6bc4bcc3d9ae66d49dabbc3674f51721a89e2305f0b
Container:
ea3950bfd5e4905adb68814f03e62130a1ed7dbf4cdb562a5d309f655e08a6ee

$ podman ps -a
CONTAINER ID  IMAGE                                             COMMAND               CREATED             STATUS             PORTS       NAMES
3a58fd635f86  k8s.gcr.io/pause:3.5                                                    About a minute ago  Up 33 seconds ago              fbabf81d7a80-infra
ea3950bfd5e4  registry.access.redhat.com/ubi8/ubi-micro:latest  /bin/sh -c /bin/s...  32 seconds ago      Up 33 seconds ago              pod-ctr