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

REST API: missing tag from /v1.24/images/${img}/history #17763

Closed
eriksjolund opened this issue Mar 13, 2023 · 1 comment · Fixed by containers/common#1445 or #18414
Closed

REST API: missing tag from /v1.24/images/${img}/history #17763

eriksjolund opened this issue Mar 13, 2023 · 1 comment · Fixed by containers/common#1445 or #18414
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@eriksjolund
Copy link
Contributor

eriksjolund commented Mar 13, 2023

Issue Description

docker returns a tag

$ curl -s --unix-socket /var/run/docker.sock http://localhost/v1.24/images/d74e625d9115/history | jq .[0].Tags
[
  "alpine:3.17.2"
]

podman does not

$ curl -s --unix-socket $XDG_RUNTIME_DIR/podman/podman.sock http://localhost/v1.24/images/d74e625d9115/history | jq .[0].Tags
null

Steps to reproduce the issue

  1. sudo -i
  2. useradd test1
  3. usermod -aG docker test1
  4. machinectl shell test1@
  5. podman pull alpine:3.17.2
  6. docker pull alpine:3.17.2
  7. run podman images and detect the image id. Record the result in a shell variable
    img=d74e625d9115
  8. systemctl --user start podman.socket
  9. curl -s --unix-socket /var/run/docker.sock http://localhost/v1.24/images/${img}/history | jq .[0].Tags
  10. curl -s --unix-socket $XDG_RUNTIME_DIR/podman/podman.sock http://localhost/v1.24/images/d74e625d9115/history | jq .[0].Tags

Describe the results you received

[test1@localhost ~]$ curl -s --unix-socket /var/run/docker.sock http://localhost/v1.24/images/${img}/history |  jq .[0].Tags
[
  "alpine:3.17.2"
]
[test1@localhost ~]$ curl -s --unix-socket $XDG_RUNTIME_DIR/podman/podman.sock  http://localhost/v1.24/images/${img}/history | jq .[0].Tags
null
[test1@localhost ~]$ 

Describe the results you expected

[test1@localhost ~]$ curl -s --unix-socket /var/run/docker.sock http://localhost/v1.24/images/${img}/history |  jq .[0].Tags
[
  "alpine:3.17.2"
]
[test1@localhost ~]$ curl -s --unix-socket $XDG_RUNTIME_DIR/podman/podman.sock  http://localhost/v1.24/images/${img}/history | jq .[0].Tags
[
  "alpine:3.17.2"
]
[test1@localhost ~]$ 

podman info output

host:
  arch: arm64
  buildahVersion: 1.29.0
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.6-3.fc37.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.6, commit: '
  cpuUtilization:
    idlePercent: 99.65
    systemPercent: 0.12
    userPercent: 0.24
  cpus: 1
  distribution:
    distribution: fedora
    variant: coreos
    version: "37"
  eventLogger: journald
  hostname: localhost.localdomain
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 589824
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 589824
      size: 65536
  kernel: 6.1.14-200.fc37.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 925364224
  memTotal: 2050260992
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.8.1-1.fc37.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.8.1
      commit: f8a096be060b22ccd3d5f3ebe44108517fbf6c30
      rundir: /run/user/1001/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1001/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
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-8.fc37.aarch64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 31h 18m 41.00s (Approximately 1.29 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /var/home/test1/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/home/test1/.local/share/containers/storage
  graphRootAllocated: 10132369408
  graphRootUsed: 1956737024
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /run/user/1001/containers
  transientStore: false
  volumePath: /var/home/test1/.local/share/containers/storage/volumes
version:
  APIVersion: 4.4.1
  Built: 1676629538
  BuiltTime: Fri Feb 17 10:25:38 2023
  GitCommit: ""
  GoVersion: go1.19.5
  Os: linux
  OsArch: linux/arm64
  Version: 4.4.1

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

The commands above were run with podman 4.4.1 on Fedora CoreOS by using qemu on a macOS laptop (operating system: Ventura 13.2.1).

[test1@localhost ~]$ docker version
Client:
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.19.5
 Git commit:        %{shortcommit_cli}
 Built:             Sun Jan 29 17:38:04 2023
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.23
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.5
  Git commit:       %{shortcommit_moby}
  Built:            Sun Jan 29 17:38:04 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.15
  GitCommit:        
 runc:
  Version:          1.1.4
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        
[test1@localhost ~]$ podman version
Client:       Podman Engine
Version:      4.4.1
API Version:  4.4.1
Go Version:   go1.19.5
Built:        Fri Feb 17 10:25:38 2023
OS/Arch:      linux/arm64
[test1@localhost ~]$ rpm -q podman 
podman-4.4.1-3.fc37.aarch64

Additional information

I have another computer (arch: amd64) running Fedora 37. I re-run the Podman commands there with podman 4.4.2.
The container image ID changed and the container image size changed but nothing else.

@github-actions
Copy link

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

rhatdan added a commit to rhatdan/podman that referenced this issue Apr 25, 2023
Fixes: containers#17763

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
vrothberg added a commit to vrothberg/common that referenced this issue May 2, 2023
Correctly set the tags of history layers.  Also make sure to nil the
loop `layer` variable when it has no parent.

Fixes: containers/podman/issues/17763
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue May 2, 2023
Requires vendoring fixes from c/common and to update the transformation
code.  Also add a test to avoid future regressions.

Fixes: containers#17763
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue May 2, 2023
Requires vendoring fixes from c/common and to update the transformation
code.  Also add a test to avoid future regressions.

Fixes: containers#17763
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue May 2, 2023
Requires vendoring fixes from c/common and to update the transformation
code.  Also add a test to avoid future regressions.

Fixes: containers#17763
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue May 2, 2023
Requires vendoring fixes from c/common and to update the transformation
code.  Also add a test to avoid future regressions.

Fixes: containers#17763
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
@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 Aug 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
1 participant