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 image spec format complains "unterminated quoted string" while docker works #15355

Closed
larrycai opened this issue Aug 17, 2022 · 2 comments
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

@larrycai
Copy link

larrycai commented Aug 17, 2022

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

/kind bug

Description

podman image spec format has difference with docker output

Steps to reproduce the issue:

  1. use latest podman and pull any container image like podman/stable

  2. use podman inspect to check and docker command to compare

Describe the results you received:

# podman inspect --type=image quay.io/podman/stable -f '{{range $key, $value := .Config.Labels}}{{printf "%s: %s\n" $key $value}}{{end}}'
ERRO[0000] Printing inspect output: template: image inspect:1: unterminated quoted string 

Describe the results you expected:

same command, it works for docker

$ docker inspect --type=image quay.io/podman/stable -f '{{range $key, $value := .Config.Labels}}{{printf "%s: %s\n" $key $value}}{{end}}'
io.buildah.version: 1.26.2
license: MIT
name: fedora
org.opencontainers.image.created: 2022-08-16T18:21:01+00:00
org.opencontainers.image.revision: 3dace12777e27a7732acb25ae78f86ced8ae04da
org.opencontainers.image.source: https://github.com/containers/podman.git
org.opencontainers.image.version: 4.1.1
vendor: Fedora Project
version: 36

I expect it can keep the same behavior, though I know I can use $ podman inspect --type=image quay.io/podman/stable -f '{{range $key, $value := .Config.Labels}}{{$key}}: {{$value}}{{println}}{{end}}' instead, lots of legacy scripts rely on old format.

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

Output of podman version:

# podman version
Client:       Podman Engine
Version:      4.1.1
API Version:  4.1.1
Go Version:   go1.18.4
Built:        Fri Jul 22 19:05:59 2022
OS/Arch:      linux/amd64

Output of podman info:

# podman info
host:
  arch: amd64
  buildahVersion: 1.26.1
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.0-2.fc36.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: '
  cpuUtilization:
    idlePercent: 96.81
    systemPercent: 0.62
    userPercent: 2.56
  cpus: 16
  distribution:
    distribution: fedora
    variant: container
    version: "36"
  eventLogger: file
  hostname: ec6975f1d134
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.0-122-generic
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 706117632
  memTotal: 67413991424
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.5-1.fc36.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.5
      commit: 54ebb8ca8bf7e6ddae2eb919f5b82d1d96863dea
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/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: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-0.2.beta.0.fc36.x86_64
    version: |-
      slirp4netns version 1.2.0-beta.0
      commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 311h 2m 32.03s (Approximately 12.96 days)
plugins:
  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: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /var/lib/shared
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.9-1.fc36.x86_64
      Version: |-
        fusermount3 version: 3.10.5
        fuse-overlayfs: version 1.9
        FUSE library version 3.10.5
        using FUSE kernel interface version 7.31
    overlay.mountopt: nodev,fsync=0
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 53443997696
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.1.1
  Built: 1658516759
  BuiltTime: Fri Jul 22 19:05:59 2022
  GitCommit: ""
  GoVersion: go1.18.4
  Os: linux
  OsArch: linux/amd64
  Version: 4.1.1

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

# rpm -q podman
podman-4.1.1-3.fc36.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/main/troubleshooting.md)

Yes

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

I tested earlier version in RHEL8, the result uses image quay.io/podman/stable:v4.1

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 17, 2022
@flouthoc
Copy link
Collaborator

Hi @larrycai , I think this issue is duplicate of an issue #13446 which is assigned to me. Could you please track original issue for updates. Thanks :)

@larrycai
Copy link
Author

sure, sorry I may need to search issue first. thank you @flouthoc

@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 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 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

No branches or pull requests

2 participants