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

Inconsistent treatment of manifest lists in "podman run" #7233

Closed
avikivity opened this issue Aug 5, 2020 · 8 comments · Fixed by #7798
Closed

Inconsistent treatment of manifest lists in "podman run" #7233

avikivity opened this issue Aug 5, 2020 · 8 comments · Fixed by #7798
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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. stale-issue

Comments

@avikivity
Copy link

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

/kind bug

Description

A podman run with the image pointing to a local manifest list will fail.

A podman run with the image pointing to a manifest list in a registry will succeed.

At best this is confusing. At worst, it means there is no way to extend a manifest list, since it will be treated differently if created locally or pulled, and I have to remove it in order to use it.

Steps to reproduce the issue:

Reproducer script:

#!/bin/bash -ex

M=docker.io/avikivity/test-manifest

podman pull docker.io/fedora:32
podman manifest create "$M"
podman manifest add --all "$M" docker.io/fedora:32
podman manifest push --all "$M" docker://"$M"
podman run --rm "$M" echo y || echo failed running image from manifest
podman rmi "$M"
podman run --rm "$M" echo y && echo succeeded running image from manifest
  1. Edit the reproducer, substituting an unused name that you can push to for M.

  2. Run the reproducer

  3. Wonder why the same podman run command fails or succeeds depending on local state

Describe the results you received:

failed running image from manifest
succeeded running image from manifest

Describe the results you expected:

succeeded running image from manifest

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

Output of podman version:

Version:      2.0.4
API Version:  1
Go Version:   go1.14.6
Built:        Thu Jan  1 02:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.15.0
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.19-1.fc32.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.19, commit: 5dce9767526ed27f177a8fa3f281889ad509fea7'
  cpus: 12
  distribution:
    distribution: fedora
    version: "32"
  eventLogger: file
  hostname: avi
  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.7.8-200.fc32.x86_64
  linkmode: dynamic
  memFree: 2141855744
  memTotal: 33542152192
  ociRuntime:
    name: crun
    package: crun-0.14.1-1.fc32.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.14.1
      commit: 598ea5e192ca12d4f6378217d3ab1415efeddefa
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.4-1.fc32.x86_64
    version: |-
      slirp4netns version 1.1.4
      commit: b66ffa8e262507e37fca689822d23430f3357fe8
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 2
  swapFree: 15166337024
  swapTotal: 16869486592
  uptime: 359h 10m 34.1s (Approximately 14.96 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/avi/.config/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 1
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.1.2-1.fc32.x86_64
      Version: |-
        fusermount3 version: 3.9.1
        fuse-overlayfs: version 1.1.0
        FUSE library version 3.9.1
        using FUSE kernel interface version 7.31
  graphRoot: /home/avi/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 33
  runRoot: /run/user/1000/containers
  volumePath: /home/avi/.local/share/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Thu Jan  1 02:00:00 1970
  GitCommit: ""
  GoVersion: go1.14.6
  OsArch: linux/amd64
  Version: 2.0.4

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

podman-2.0.4-1.fc32.x86_64

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

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 5, 2020
@rhatdan
Copy link
Member

rhatdan commented Aug 6, 2020

@QiWang19 PTAL

@QiWang19
Copy link
Contributor

QiWang19 commented Aug 6, 2020

Create & Run using a manifest returns error var ErrImageIsBareList = stderrors.New("image contains a manifest list or image index, but no runnable image") , is this as expected?
@rhatdan @nalind ?

@github-actions
Copy link

github-actions bot commented Sep 6, 2020

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Sep 8, 2020

I would think not, but will wait for @nalind to respond.

@QiWang19
Copy link
Contributor

QiWang19 commented Sep 8, 2020

Podman haven't implemented to pick one image from the list of images from a manifest list, just have checked with @nalind that had been supported in cri-o, will look into it.

@nalind
Copy link
Member

nalind commented Sep 9, 2020

No, it isn't expected. It falls out of the current implementation, where the name is associated with the manifest list and not the images that are mentioned in it. I think we have most of what would be needed to make this work if the runnable image was in local storage (I think the only missing piece is tagging the runnable image with a digested reference that matches the name that's been assigned to the list, e.g. repository@digest), but the reproducer script isn't pulling them down (manifest add doesn't pull layers), so there's no local image to run. I don't have a guess as to whether or not we want to be pulling the image in that case.

@QiWang19
Copy link
Contributor

if the manifest list exists locally, try with --pull always can success podman run --pull always --rm "$M", but is this enough for this issue?

@avikivity
Copy link
Author

--pull always works, but I can't tell my users to to use that.

I can rmi the local manifest as a workaround.

@QiWang19 QiWang19 added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Sep 23, 2020
@QiWang19 QiWang19 linked a pull request Sep 28, 2020 that will close this issue
@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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. stale-issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants