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

Docker compatibility: pull of uncached/new image has final status that doesn't indicate success to docker-java #10258

Closed
candrews opened this issue May 7, 2021 · 0 comments · Fixed by #10259
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

@candrews
Copy link

candrews commented May 7, 2021

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

/kind bug

Description

Steps to reproduce the issue:
This issue only happens for images that podman doesn't already have cached. If podman already has the image, it returns a final status that docker-java interprets as success.

  1. Use docker-java (such as through testcontainers) to pull an image that is not already in podman's image cache

Describe the results you received:
docker-java fails with this exception:
com.github.dockerjava.api.exception.DockerClientException: Could not pull image: Pull complete

Describe the results you expected:
No exception should be thrown

Additional information you deem important (e.g. issue happens only occasionally):
The problem is that podman's last status when pulling an image isn't one of that statuses that docker-java checks for, which are:

  • Download complete
  • Image is up to date
  • Downloaded newer image
  • this image was pulled from a legacy registry
  • : downloaded

https://github.com/docker-java/docker-java/blob/3.2.7/docker-java-api/src/main/java/com/github/dockerjava/api/model/PullResponseItem.java#L33

I ran the same test with Docker and with Podman so I could compare the data requests/responses.
Docker transcript:
docker.log
Podman transcript:
podman.log

Notice that docker's pull transcript ends with a status of Status: Downloaded newer image for alpine:3.5 which matches one o the patterns docker-java looks for:

{"status":"Download complete","progressDetail":{},"id":"8cae0e1ac61c"}\r
\r
< 2021/05/07 10:53:18.350530  length=191 from=1276 to=1466
b9\r
{"status":"Extracting","progressDetail":{"current":32768,"total":1971694},"progress":"[\\u003e                                                  ]  32.77kB/1.972MB","id":"8cae0e1ac61c"}\r
\r
< 2021/05/07 10:53:18.471037  length=192 from=1467 to=1658
ba\r
{"status":"Extracting","progressDetail":{"current":360448,"total":1971694},"progress":"[=========\\u003e                                         ]  360.4kB/1.972MB","id":"8cae0e1ac61c"}\r
\r
< 2021/05/07 10:53:18.498898  length=193 from=1659 to=1851
bb\r
{"status":"Extracting","progressDetail":{"current":1971694,"total":1971694},"progress":"[==================================================\\u003e]  1.972MB/1.972MB","id":"8cae0e1ac61c"}\r
\r
< 2021/05/07 10:53:18.531872  length=74 from=1852 to=1925
44\r
{"status":"Pull complete","progressDetail":{},"id":"8cae0e1ac61c"}\r
\r
< 2021/05/07 10:53:18.549703  length=100 from=1926 to=2025
5e\r
{"status":"Digest: sha256:66952b313e51c3bd1987d7c4ddf5dba9bc0fb6e524eed2448fa660246b3e76ec"}\r
\r
< 2021/05/07 10:53:18.554150  length=66 from=2026 to=2091
3c\r
{"status":"Status: Downloaded newer image for alpine:3.5"}\r

Which docker-java interprets as success.

However, podman's pull transcript ends with a status of Pull complete, which is not one of the statuses that docker-java considers to be successful:

{"status":"Download complete","progressDetail":{},"id":"f80194ae2e0c"}
\r
< 2021/05/07 10:51:17.812881  length=78 from=395 to=472
43\r
{"status":"Pull complete","progressDetail":{},"id":"f80194ae2e0c"}

Output of podman version:

podman version 3.2.0-rc1

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.20.2-dev
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.0.27-2.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 8
  distribution:
    distribution: fedora
    version: "34"
  eventLogger: journald
  hostname: craigatwork
  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.11.18-300.fc34.x86_64
  linkmode: dynamic
  memFree: 799834112
  memTotal: 16647507968
  ociRuntime:
    name: crun
    package: crun-0.19.1-2.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.19.1
      commit: 1535fedf0b83fb898d449f9680000f729ba719f5
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    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
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.9-1.fc34.x86_64
    version: |-
      slirp4netns version 1.1.8+dev
      commit: 6dc0186e020232ae1a6fcc1f7afbc3ea02fd3876
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 17023361024
  swapTotal: 17024671744
  uptime: 18h 30m 25.48s (Approximately 0.75 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/candrews/.config/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 2
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.5.0-1.fc34.x86_64
      Version: |-
        fusermount3 version: 3.10.3
        fuse-overlayfs: version 1.5
        FUSE library version 3.10.3
        using FUSE kernel interface version 7.31
  graphRoot: /home/candrews/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 5
  runRoot: /run/user/1000
  volumePath: /home/candrews/.local/share/containers/storage/volumes
version:
  APIVersion: 3.2.0-rc1
  Built: 1620248626
  BuiltTime: Wed May  5 17:03:46 2021
  GitCommit: ""
  GoVersion: go1.16.3
  OsArch: linux/amd64
  Version: 3.2.0-rc1

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

podman-3.2.0-0.1.rc1.fc34.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.):

Fedora 34 system

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 7, 2021
@candrews candrews changed the title Docker compatibility: new pull of image should report "Status: Downloaded newer image for " Docker compatibility: pull of uncached/new image has final status that doesn't indicate success to docker-java May 7, 2021
rhatdan added a commit to rhatdan/podman that referenced this issue May 7, 2021
Fixes: containers#10258

[NO TESTS NEEDED] Difficult to create tests for this.

Signed-off-by: Daniel J Walsh <[email protected]>
@rhatdan rhatdan self-assigned this May 7, 2021
@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
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.

3 participants