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 client API version negotation resolves 1.40 but creating a container with a certain image platform requires at least 1.41 although Podman does support it #14204

Closed
prskr opened this issue May 11, 2022 · 8 comments · Fixed by #14219
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@prskr
Copy link

prskr commented May 11, 2022

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

/kind feature

Description

When trying to use the Docker API with Podman (rootless or not doesn't make a difference) to start a container with setting an image platform it returns an error.

Steps to reproduce the issue:

  1. Create a new Go Docker API client with client.WithAPIVersionNegotiation()

  2. Try to create a new container with specifying the image platform

Describe the results you received:

Docker client returns the following error

specify container image platform" requires API version 1.41, but the Docker daemon API version is 1.40

Describe the results you expected:

Container should be created taking the image platform into account (if feasible).

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

The version is coming from version/version.go but if I manually set the version to 1.41 it works but I wouldn't consider this a real option because the code is part of a library and should actually use the proper negotiation procedure - especially if Podman apparently supports the features (and also does respond to the 1.41 endpoint).

Output of podman version:

Client:       Podman Engine
Version:      4.1.0
API Version:  4.1.0
Go Version:   go1.18.1
Git Commit:   e4b03902052294d4f342a185bb54702ed5bed8b1
Built:        Fri May  6 20:18:30 2022
OS/Arch:      linux/amd64

Output of podman info --debug:

(paste your output here)

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

host:
  arch: amd64
  buildahVersion: 1.26.1
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.1.0-1
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: bdb4f6e56cd193d40b75ffc9725d4b74a18cb33c'
  cpuUtilization:
    idlePercent: 88.87
    systemPercent: 2.3
    userPercent: 8.83
  cpus: 8
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: $HOSTNAME
  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.17.5-arch1-2
  linkmode: dynamic
  logDriver: journald
  memFree: 1320366080
  memTotal: 16622784512
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 1.4.5-1
    path: /usr/bin/crun
    version: |-
      crun version 1.4.5
      commit: c381048530aa750495cf502ddb7181f2ded5b400
      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: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /sbin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.2.0-1
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.4
  swapFree: 8184655872
  swapTotal: 8192520192
  uptime: 1h 13m 52.55s (Approximately 0.04 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: $HOME/.config/containers/storage.conf
  containerStore:
    number: 7
    paused: 0
    running: 1
    stopped: 6
  graphDriverName: vfs
  graphOptions: {}
  graphRoot: /home/baez/.local/share/containers/storage
  graphRootAllocated: 684612124672
  graphRootUsed: 318109036544
  graphStatus: {}
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 12
  runRoot: /run/user/1000
  volumePath: $HOME/.local/share/containers/storage/volumes
version:
  APIVersion: 4.1.0
  Built: 1651861110
  BuiltTime: Fri May  6 20:18:30 2022
  GitCommit: e4b03902052294d4f342a185bb54702ed5bed8b1
  GoVersion: go1.18.1
  Os: linux
  OsArch: linux/amd64
  Version: 4.1.0

(Output is from Podman rootless but like already said doesn't matter if rootless or not)

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

Yes

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

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label May 11, 2022
@rhatdan
Copy link
Member

rhatdan commented May 11, 2022

@jwhonce PTAL

@mheon
Copy link
Member

mheon commented May 12, 2022

Should just need to change https://github.com/containers/podman/blob/main/version/version.go#L44 to v1.41

mheon added a commit to mheon/libpod that referenced this issue May 23, 2022
Docker bumped their API, so we should do the same.

Fixes containers#14204

Signed-off-by: Matthew Heon <[email protected]>
@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented Jun 12, 2022

@mheon what ended up happening with this?

@mheon
Copy link
Member

mheon commented Jun 12, 2022

I have a PR open. I thought we were clear to merge, but there seems to be disagreement. We can work this out on Monday in a postscrum.

@Ahsan-Aziz-Ishan
Copy link

Any update ?

@edhar-rybak
Copy link

Interested in this feature

@jwhonce
Copy link
Member

jwhonce commented Jul 28, 2022

We have cards in our backlog to review the changes between 1.40 and 1.41 and implement the differences. It is on the roadmap, but not scheduled yet.

@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/feature Categorizes issue or PR as related to a new feature. 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