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

/libpod/pods/json returns null when there are no pods #7392

Closed
jwhonce opened this issue Aug 20, 2020 · 0 comments · Fixed by #7395
Closed

/libpod/pods/json returns null when there are no pods #7392

jwhonce opened this issue Aug 20, 2020 · 0 comments · Fixed by #7395
Labels
HTTP API Bug is in RESTful API 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

@jwhonce
Copy link
Member

jwhonce commented Aug 20, 2020

/kind bug

Description

The containers and images endpoints return the empty set '[]' vs. the pods endpoint which returns null

Steps to reproduce the issue:

  1. In window#1: podman system service tcp:localhost:8080 --log-level=debug --time=0

  2. In window#2: curl -s -v 'http://localhost:8080/v1.40.0/libpod/pods/json'

Describe the results you received:

  • Connected to localhost (127.0.0.1) port 8080 (#0)

GET /v1.40.0/libpod/pods/json HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.69.1
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Content-Type: application/json
    < Date: Thu, 20 Aug 2020 16:12:26 GMT
    < Content-Length: 5
    <
    null

Describe the results you expected:

  • Connected to localhost (127.0.0.1) port 8080 (#0)

GET /v1.40.0/libpod/pods/json HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.69.1
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Content-Type: application/json
    < Date: Thu, 20 Aug 2020 16:12:26 GMT
    < Content-Length: 5
    <
    []

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

Output of podman version:

bin/podman version
Version:      2.1.0-dev
API Version:  1
Go Version:   go1.14.6
Built:        Wed Dec 31 17:00:00 1969
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.16.0-dev
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.19-1.fc32.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.19, commit: 5dce9767526ed27f177a8fa3f281889ad509fea7'
  cpus: 8
  distribution:
    distribution: fedora
    version: "32"
  eventLogger: file
  hostname: jhonce-fc.local
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.7.14-200.fc32.x86_64
  linkmode: dynamic
  memFree: 1210273792
  memTotal: 33485557760
  ociRuntime:
    name: crun
    package: crun-0.14.1-1.fc32.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.14.1
      commit: 598ea5e192ca12d4f6378217d3ab1415efeddefa
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 16736579584
  swapTotal: 16877875200
  uptime: 166h 27m 48.24s (Approximately 6.92 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 1
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Wed Dec 31 17:00:00 1969
  GitCommit: ""
  GoVersion: go1.14.6
  OsArch: linux/amd64
  Version: 2.1.0-dev

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

Built from master commit dd4e0da4241ac0b6deac3f5e07ea4eeb5819379e

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.):

@jwhonce jwhonce added kind/bug Categorizes issue or PR as related to a bug. HTTP API Bug is in RESTful API labels Aug 20, 2020
@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
HTTP API Bug is in RESTful API 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.

1 participant