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

containers.conf -> infra_image doesn't work #12245

Closed
xfoobar opened this issue Nov 10, 2021 · 10 comments · Fixed by #12250
Closed

containers.conf -> infra_image doesn't work #12245

xfoobar opened this issue Nov 10, 2021 · 10 comments · Fixed by #12250
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

@xfoobar
Copy link

xfoobar commented Nov 10, 2021

/kind bug

Description

Cannot change infra_image by using user containers.conf

Steps to reproduce the issue:

mkdir -p "~/.config/containers"
touch "~/.config/containers/containers.conf"

Edit file

[containers]

[engine]
infra_image = "kubernetes/pause:latest"

[machine]

[network]

[secrets]
podman pod create --name=test
podman ps -a

Describe the results you received:

CONTAINER ID  IMAGE                 COMMAND     CREATED         STATUS      PORTS       NAMES
3540b0f79a5f  k8s.gcr.io/pause:3.5              28 seconds ago  Created                 68cc7bd1005c-infra

Describe the results you expected:

CONTAINER ID  IMAGE                 COMMAND     CREATED         STATUS      PORTS       NAMES
3540b0f79a5f  kubernetes/pause:latest              28 seconds ago  Created                 68cc7bd1005c-infra

Additional information you deem important (e.g. issue happens only occasionally):
It still doesn't work after modifying /usr/share/containers/containers.conf

Output of podman version:

Version:      3.4.1
API Version:  3.4.1
Go Version:   go1.16.8
Built:        Wed Oct 20 22:31:56 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.23.1
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.30-2.fc35.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.30, commit: '
  cpus: 8
  distribution:
    distribution: fedora
    variant: server
    version: "35"
  eventLogger: journald
  hostname: xxxxx
  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.16-301.fc35.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 3394224128
  memTotal: 4097449984
  ociRuntime:
    name: crun
    package: crun-1.2-1.fc35.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.2
      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_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: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc35.x86_64
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.2
  swapFree: 4096782336
  swapTotal: 4096782336
  uptime: 1h 39m 48.17s (Approximately 0.04 days)
plugins:
  log:
  - k8s-file
  - none
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  docker.io:
    Blocked: false
    Insecure: false
    Location: xxxxxx.mirror.aliyuncs.com
    MirrorByDigestOnly: false
    Mirrors: null
    Prefix: docker.io
  search:
  - docker.io
store:
  configFile: /home/vbn/.config/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/vbn/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 6
  runRoot: /run/user/1000/containers
  volumePath: /home/vbn/.local/share/containers/storage/volumes
version:
  APIVersion: 3.4.1
  Built: 1634740316
  BuiltTime: Wed Oct 20 22:31:56 2021
  GitCommit: ""
  GoVersion: go1.16.8
  OsArch: linux/amd64
  Version: 3.4.1

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

podman-3.4.1-1.fc35.x86_64

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.):
physical/Fedora35

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

Thanks for reaching out, I'll prepare a fix.

giuseppe added a commit to giuseppe/libpod that referenced this issue Nov 10, 2021
otherwise the setting in the containers.conf file is not honored.

Closes: containers#12245

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe
Copy link
Member

opened a PR: #12249

@giuseppe
Copy link
Member

@vrothberg ah sorry, I was working on that already, does the fix LGTY?

@vrothberg
Copy link
Member

@vrothberg ah sorry, I was working on that already, does the fix LGTY?

LGTM

@giuseppe
Copy link
Member

I've closed #12249 in favor of #12250

@vrothberg
Copy link
Member

I've closed #12249 in favor of #12250

🤣 a double-race :-)

vrothberg added a commit to vrothberg/libpod that referenced this issue Nov 10, 2021
Fix a bug where pods would be created with the hard-coded default infra
image instead of the custom one from containers.conf.  Add a simple
regression test.

Fixes: containers#12245
Signed-off-by: Valentin Rothberg <[email protected]>
@luxifer
Copy link

luxifer commented Dec 3, 2021

Hello, has this been released in the 3.4.2?

@rhatdan
Copy link
Member

rhatdan commented Dec 3, 2021

I doubt it, most likely will not be released until Podman 4.0

@luxifer
Copy link

luxifer commented Dec 3, 2021

This bug is actually boring because when we configure the infra image in containers.conf it's not taken into account :/

@rhatdan
Copy link
Member

rhatdan commented Dec 3, 2021

You could always attempt to setup a mirror for the image.

@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
5 participants