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 pod create command ignored the default pod infra image specified in containers.conf #12771

Closed
noracenofun opened this issue Jan 7, 2022 · 16 comments · Fixed by #12780
Closed
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

@noracenofun
Copy link

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

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 7, 2022
@rhatdan
Copy link
Member

rhatdan commented Jan 7, 2022

This is working for me on podman 3.4?

$ 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")

@rhatdan
Copy link
Member

rhatdan commented Jan 7, 2022

$ podman ps
CONTAINER ID  IMAGE                                         COMMAND     CREATED        STATUS            PORTS       NAMES
2f8b78eea7a6  registry.access.redhat.com/ubi8/pause:latest              5 minutes ago  Up 2 seconds ago              fcb3a6047702-infra
93117700e8f1  docker.io/library/alpine:latest               top         2 seconds ago  Up 2 seconds ago              zealous_einstein

@noracenofun
Copy link
Author

But that's not the issue.

containers.conf - The container engine configuration file specifies default configuration options and command-line flags for container engines.

Container engines read the /usr/share/containers/containers.conf and /etc/containers/containers.conf, and /etc/containers/containers.conf.d/.conf files if they exist. When running in rootless mode, they also read $HOME/.config/containers/containers.conf and $HOME/.config/containers/containers.conf.d/.conf files.

Fields specified in containers.conf override the default options, as well as options in previously read containers.conf files.

Issue: podman ignores the configuration of infra_image in the configuration files

@rhatdan
Copy link
Member

rhatdan commented Jan 8, 2022

Yes I set this default in my ~/.config/containers/containers.conf

$ cat ~/.config/containers/containers.conf
[containers]

[machine]

[network]

[engine]
infra_image = "registry.access.redhat.com/ubi8/pause"

@noracenofun
Copy link
Author

OK but I still get this result

$ podman system reset

WARNING! This will remove:
        - all containers
        - all pods
        - all images
        - all build cache
Are you sure you want to continue? [y/N] y

$ cat ~/.config/containers/containers.conf
[containers]

[machine]

[network]

[engine]
infra_image = "registry.access.redhat.com/ubi8/pause"

$ 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
5d91e8d3cf67b8f83684dd5560e0d016b032514cbcecb70b9979cff7d2fa6c20

$ podman ps -a
CONTAINER ID  IMAGE                 COMMAND     CREATED             STATUS      PORTS       NAMES
e4e14e8491a3  k8s.gcr.io/pause:3.5              About a minute ago  Created                 5d91e8d3cf67-infra
$ podman system reset

WARNING! This will remove:
        - all containers
        - all pods
        - all images
        - all build cache
Are you sure you want to continue? [y/N] y

$ podman run --pod new:example ubi8-micro date
Resolved "ubi8-micro" as an alias (/etc/containers/registries.conf.d/001-rhel-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8-micro:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob dbadbc21a470 done
Copying blob 4f4fb700ef54 done
Copying config ca5ba0a917 done
Writing manifest to image destination
Storing signatures
Sat Jan  8 13:16:32 UTC 2022

$ podman ps -a
CONTAINER ID  IMAGE                                         COMMAND     CREATED         STATUS                     PORTS       NAMES
21ff9e6c4604  k8s.gcr.io/pause:3.5                                      32 seconds ago  Up 32 seconds ago                      9e00e05e3902-infra
9643c2b6f337  registry.access.redhat.com/ubi8-micro:latest  date        32 seconds ago  Exited (0) 32 seconds ago              nice_nash

Only podman play kube returns the correct result

$ cat ~/example.yml
apiVersion: v1
kind: Pod
metadata:
  labels:
    app: exmaple
  name: pod
spec:
  containers:
  - command:
    image: registry.access.redhat.com/ubi8/ubi-micro:latest
    name: ctr
    resources: {}
    securityContext:
      allowPrivilegeEscalation: true
      capabilities:
        drop:
        - CAP_MKNOD
        - CAP_AUDIT_WRITE
      privileged: false
      readOnlyRootFilesystem: false
      seLinuxOptions: {}
    stdin: true
    tty: true
    workingDir: /
  dnsConfig: {}
  restartPolicy: Never
status: {}

$ podman play kube example.yml
Trying to pull registry.access.redhat.com/ubi8/ubi-micro:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 4f4fb700ef54 skipped: already exists
Copying blob dbadbc21a470 done
Copying config ca5ba0a917 done
Writing manifest to image destination
Storing signatures
Pod:
39a5a77c37e17cff42d1ed4e667c0af464690dce4e2ccf6d285e680385c0f9d2
Container:
ea76d8342c08dcdf44065a8e581ca6276091cd41cb1c9f79924c01a9032eef82

$ podman ps
CONTAINER ID  IMAGE                                             COMMAND               CREATED         STATUS             PORTS       NAMES
5a122a114b4d  registry.access.redhat.com/ubi8/pause:latest                            38 seconds ago  Up 15 seconds ago              39a5a77c37e1-infra
ea76d8342c08  registry.access.redhat.com/ubi8/ubi-micro:latest  /bin/sh -c /bin/s...  15 seconds ago  Up 15 seconds ago              pod-ctr

@noracenofun
Copy link
Author

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

@noracenofun noracenofun changed the title podman pod create command ignored the default pod infra image specified in containers.conf podman pod create command ignored the default pod infra image specified in containers.conf Jan 9, 2022
rhatdan added a commit to rhatdan/podman that referenced this issue Jan 10, 2022
Remove hard code use of the DefaultInfraImage and rely on
getting this from containers.conf.

Fixes: containers#12771

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@wswind
Copy link

wswind commented Jan 25, 2022

Is this fixed?

@noracenofun
Copy link
Author

Is this fixed?

Yes and No!

tested with pre-release 4.0.0-RC2

==> No / not ok
received output: localhost/podman-pause:4.0.0-rc2-1642795764
expected output: k8s.gcr.io/pause:3.5

possibly only the output of the command podman pod create --help must be adjusted here - default string/value of infra-image for output

$ podman version
Client:       Podman Engine
Version:      4.0.0-rc2
API Version:  4.0.0-rc2
Go Version:   go1.18beta1

Built:      Fri Jan 21 21:09:24 2022
OS/Arch:    linux/arm64

$ grep infra_image /usr/share/containers/containers.conf
#infra_image = "k8s.gcr.io/pause:3.4.1"

$ grep infra_image /etc/containers/containers.conf
grep: /etc/containers/containers.conf: No such file or directory

$ grep infra_image .config/containers/containers.conf
grep: .config/containers/containers.conf: No such file or directory

$ podman system reset

WARNING! This will remove:
        - all containers
        - all pods
        - all images
        - all build cache
Are you sure you want to continue? [y/N] y

$ podman pod create --help | grep infra-image
      --infra-image string            The image of the infra container to associate with the pod (default "k8s.gcr.io/pause:3.5")

# default "k8s.gcr.io/pause:3.5"

$ podman images
REPOSITORY  TAG         IMAGE ID    CREATED     SIZE

$ podman pod create
765b3f7f1c22eb11d7d00a75acbd985aed36226f0d50b7c405d38ce08b0f684c

$ podman images
REPOSITORY              TAG                   IMAGE ID      CREATED        SIZE
localhost/podman-pause  4.0.0-rc2-1642795764  7c3db3338e49  8 seconds ago  622 kB

==> Yes / ok
received output: registry.access.redhat.com/ubi8/pause:latest
expected output: registry.access.redhat.com/ubi8/pause:latest

$ grep infra_image .config/containers/containers.conf
infra_image = "registry.access.redhat.com/ubi8/pause"

$ podman system reset

WARNING! This will remove:
        - all containers
        - all pods
        - all images
        - all build cache
Are you sure you want to continue? [y/N] y

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

# default "registry.access.redhat.com/ubi8/pause"

$ podman images
REPOSITORY  TAG         IMAGE ID    CREATED     SIZE

$ podman pod create
d44ae7834729bab2e2ef5a49a8886d02d526b821a4b93371466eaa2bab0d9ed9

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

@mheon
Copy link
Member

mheon commented Jan 25, 2022

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.

@noracenofun
Copy link
Author

noracenofun commented Jan 25, 2022

Yes, I am aware of that. But why does the command podman pod create --help not yet support this feature for the output of the default infra-image?

no default configuration of infra_image in any containers.conf

$ podman pod create --help | grep infra-image
      --infra-image string            The image of the infra container to associate 
with the pod (default "k8s.gcr.io/pause:3.5")

expected output for example: ... (default "localhost/podman-pause:4.0.0-rc2-1642795764")
received output: ... (default "k8s.gcr.io/pause:3.5")


default configuration of infra_image set in local containers.conf

$ grep infra_image .config/containers/containers.conf
infra_image = "registry.access.redhat.com/ubi8/pause"

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

output as expected: ... (default "registry.access.redhat.com/ubi8/pause")


By the way, the solution is fine for me, the small output error does not bother me.

@mheon
Copy link
Member

mheon commented Jan 25, 2022

@rhatdan Looks like a bug?

@noracenofun
Copy link
Author

Possibly only a small fix needed in pkg github.com/containers/common/pkg/config - file default.go - line 49

	// DefaultInfraImage to use for infra container
	DefaultInfraImage = "k8s.gcr.io/pause:3.5"

Example change to

	// DefaultInfraImage to use for infra container
	DefaultInfraImage = "localhost/podman-pause:latest"

@rhatdan
Copy link
Member

rhatdan commented Jan 25, 2022

Please open a PR?

@noracenofun
Copy link
Author

noracenofun commented Jan 26, 2022

PR containers/common #909
PR #13043
PR #13064

@jensrudolf
Copy link

Hi, is there any chance, this fix is going to be backported to 3.4.2-rhel? This is a major breakage for us on rhel 8.5.

@vrothberg
Copy link
Member

The fixes will make it into RHEL 8.6 and according to https://bugzilla.redhat.com/show_bug.cgi?id=2055313 there is fair chance also to 8.5.

Note that RHEL-related questions should go through the Red Hat channels (e.g., Bugzilla). This will make sure that the issues receive the right priority and attention.

@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 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.

6 participants