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

Error: failed to parse 'podman info' results: json: cannot unmarshal string into Go value of type define.Info #11984

Closed
ichbindannmalwegmann opened this issue Oct 15, 2021 · 10 comments · Fixed by #12036
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

@ichbindannmalwegmann
Copy link

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

/kind bug

Description

Steps to reproduce the issue:

podman system connection add ...

Describe the results you received:

Error: failed to parse 'podman info' results: json: cannot unmarshal string into Go value of type define.Info

Describe the results you expected:

Podman should add the connection.

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

The error appears only with local podman version 3.4.0. If I downgrade the local podman version to 3.1.0 it works. The remote podman version remains 3.4.0.

Output of podman version:

Local podman:

Version:      3.4.0
API Version:  3.4.0
Go Version:   go1.16.8
Built:        Thu Sep 30 21:40:21 2021
OS/Arch:      linux/amd64

Remote podman:

Version:      3.4.0
API Version:  3.4.0
Go Version:   go1.16.8
Built:        Thu Sep 30 21:40:21 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.23.1
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.30-2.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.30, commit: '
  cpus: 8
  distribution:
    distribution: fedora
    variant: workstation
    version: "34"
  eventLogger: journald
  hostname: xps13
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1052
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1052
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.14.11-200.fc34.x86_64
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 3272818688
  memTotal: 16585383936
  ociRuntime:
    name: crun
    package: crun-1.2-1.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.2
      commit: 4f6c8e0583c679bfee6a899c05ac6b916022561b
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1052/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: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc34.x86_64
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 42951761920
  swapTotal: 42951761920
  uptime: 39m 14.21s
plugins:
  log:
  - k8s-file
  - none
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: ...
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.7.1-2.fc34.x86_64
      Version: |-
        fusermount3 version: 3.10.4
        fuse-overlayfs: version 1.7.1
        FUSE library version 3.10.4
        using FUSE kernel interface version 7.31
  graphRoot: /home/wegmann/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 235
  runRoot: /run/user/1052
  volumePath: ...
version:
  APIVersion: 3.4.0
  Built: 1633030821
  BuiltTime: Thu Sep 30 21:40:21 2021
  GitCommit: ""
  GoVersion: go1.16.8
  OsArch: linux/amd64
  Version: 3.4.0

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

podman-3.4.0-1.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.):

n.a.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 15, 2021
@rhatdan
Copy link
Member

rhatdan commented Oct 15, 2021

Weird. @Luap99 @mheon Any ideas?

@rhatdan
Copy link
Member

rhatdan commented Oct 15, 2021

Anything strange in our paths?

@ichbindannmalwegmann
Copy link
Author

Is it possible that the "podman info" on the remote side is called not in JSON output format?

@afbjorklund
Copy link
Contributor

@ichbindannmalwegmann : the podman system connection call uses podman info --format=json so it should be

@afbjorklund
Copy link
Contributor

afbjorklund commented Oct 15, 2021

Something is a bit weird, it calls an extra json.Marshal on the --format=json output ?

1d10ca7

So everything is quoted twice, and it looks like "{\n \"host\": {\n \"arch\": \"amd64\",\n

@jwhonce
Copy link
Member

jwhonce commented Oct 15, 2021

@afbjorklund Agreed, that should be removed.

@jwhonce jwhonce self-assigned this Oct 15, 2021
@jwhonce jwhonce added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Oct 15, 2021
jwhonce added a commit to jwhonce/podman that referenced this issue Nov 8, 2021
* Fix connection JSON encoding
* Add custom ginkgo matchers for connection testing
* Cleanup code

Fixes containers#11984

Signed-off-by: Jhon Honce <[email protected]>
@ghost
Copy link

ghost commented Jan 31, 2022

i am using podman 3.4.4 on windows,still got the problem ,what should i do .why not a bug fixed release ?

Error: failed to parse 'podman info' results: json: cannot unmarshal string into Go value of type define.Info

@rhatdan
Copy link
Member

rhatdan commented Jan 31, 2022

We don't tend to back port releases, unless you are doing it on RHEL. Podman 4.0 is in it's third RC.

@ghost
Copy link

ghost commented Jan 31, 2022

THanks, i already figure it's out. because the podman does not promiss API the same different by version.
3.3.x and 3.4.x not always the same .

I downgrade each client into the same version. it's ok.

@ghost
Copy link

ghost commented Jan 31, 2022

and i also try the podman@master branch。looks it has fixed the problem,

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

4 participants