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

podman history --no-trunc truncates #9120

Closed
rolweber opened this issue Jan 27, 2021 · 3 comments · Fixed by #9122
Closed

podman history --no-trunc truncates #9120

rolweber opened this issue Jan 27, 2021 · 3 comments · Fixed by #9122
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.

Comments

@rolweber
Copy link

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

/kind bug

Description

podman history ignores the --no-trunc option.

Steps to reproduce the issue:

  1. Create a containerfile with this content:

    FROM registry.access.redhat.com/ubi8/ubi-minimal
    RUN echo one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty
  2. podman build -t history-example .

  3. podman history --no-trunc history-example

Describe the results you received:

I get a history with truncated command:

ID                                                                CREATED             CREATED BY                                     SIZE     COMMENT
3b35b6630252690584cfdd97730ae9a622eb7b4de84bcb50fb50dda08a027905  About a minute ago  /bin/sh -c echo one two three four five si...  2.05 kB  
7331d26c1fdfb4c5cc19fd8fdf039c8efe6e5df7c46f02d027bf685c8614107f  6 weeks ago                                                        20.5 kB  
<missing>                                                         6 weeks ago                                                        104 MB   Imported from -

Describe the results you expected:

I expect a history with the full command. For comparison, this is what docker history --no-trunc shows:

IMAGE                                                                     CREATED          CREATED BY                                                                                                                                            SIZE      COMMENT
sha256:88c01fefe07fc0a831269a207e9596e4425511db7c483c4bd6fcb9d3b9886576   57 seconds ago   /bin/sh -c echo one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty   0B        
sha256:7331d26c1fdfb4c5cc19fd8fdf039c8efe6e5df7c46f02d027bf685c8614107f   6 weeks ago                                                                                                                                                            4.65kB    
<missing>                                                                 6 weeks ago                                                                                                                                                            103MB     Imported from -

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

This might be a regression, or is platform dependent. I'm observing the problem on fc33 in my dev environment. On a Travis build server with Ubuntu, and podman installed from ppa:projectatomic/ppa, the full history seems to be provided. Otherwise, the build wouldn't have detected containers/buildah/issues/2937.

Output of podman version:

Version:      2.2.1
API Version:  2.1.0
Go Version:   go1.15.5
Built:        Tue Dec  8 15:37:50 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.18.0
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.21-3.fc33.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 0f53fb68333bdead5fe4dc5175703e22cf9882ab'
  cpus: 1
  distribution:
    distribution: fedora
    version: "33"
  eventLogger: journald
  hostname: li-d94ead45-8c12-2249-903a-e2804902b72a.ibm.com
  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.10.8-200.fc33.x86_64
  linkmode: dynamic
  memFree: 223637504
  memTotal: 8335781888
  ociRuntime:
    name: crun
    package: crun-0.16-3.fc33.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.16
      commit: eb0145e5ad4d8207e84a327248af76663d4e50dd
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.8-1.fc33.x86_64
    version: |-
      slirp4netns version 1.1.8
      commit: d361001f495417b880f20329121e3aa431a8f90f
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 4166250496
  swapTotal: 4167036928
  uptime: 8h 45m 55.35s (Approximately 0.33 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/rolweber/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.3.0-1.fc33.x86_64
      Version: |-
        fusermount3 version: 3.9.3
        fuse-overlayfs: version 1.3
        FUSE library version 3.9.3
        using FUSE kernel interface version 7.31
  graphRoot: /home/rolweber/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 27
  runRoot: /run/user/1000/containers
  volumePath: /home/rolweber/.local/share/containers/storage/volumes
version:
  APIVersion: 2.1.0
  Built: 1607438270
  BuiltTime: Tue Dec  8 15:37:50 2020
  GitCommit: ""
  GoVersion: go1.15.5
  OsArch: linux/amd64
  Version: 2.2.1

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

podman-2.2.1-1.fc33.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

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

VirtualBox

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 27, 2021
@rolweber
Copy link
Author

For direct comparison with docker...

Makefile

IMAGE=local/no-trunc-history

podman:
	podman build -t $(IMAGE) .
	podman history --no-trunc $(IMAGE) | grep twenty


docker:
	docker build -t $(IMAGE) .
	docker history --no-trunc $(IMAGE) | grep twenty

Dockerfile

FROM registry.access.redhat.com/ubi8/ubi-minimal

RUN echo one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty

@rolweber
Copy link
Author

rolweber commented Jan 27, 2021

A workaround is to use podman history --no-trunc --format json, but that isn't understood by docker.

@Luap99 Luap99 self-assigned this Jan 27, 2021
@Luap99 Luap99 added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Jan 27, 2021
Luap99 pushed a commit to Luap99/libpod that referenced this issue Jan 27, 2021
@Luap99
Copy link
Member

Luap99 commented Jan 27, 2021

PR #9122 should fix this

mheon pushed a commit to mheon/libpod that referenced this issue Jan 29, 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
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants