containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.83k stars 2.42k forks source link

API Remove pod returns `null` instead of string #11786

Open arctic-alpaca opened 3 years ago

arctic-alpaca commented 3 years ago

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

/kind bug

Description

The remove pod API endpoint returns null instead of a string for Err.

Steps to reproduce the issue:

  1. podman pod create --name test

  2. podman system service unix:///home/`whoami`/testing.sock --log-level=debug --time=500

  3. curl -v -X DELETE --unix-socket /home/`whoami`/testing.sock http://d/v3.0.0/libpod/pods/test

Describe the results you received: {"Err":null,"Id":"ad616474ff43c63017304815dae32359a2792ab3f9001e0e8d304a18162cfbdf"}

Describe the results you expected: {"Err":"","Id":"ad616474ff43c63017304815dae32359a2792ab3f9001e0e8d304a18162cfbdf"} Or some other string instead of null

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

Output of podman version:

Version:      3.3.1
API Version:  3.3.1
Go Version:   go1.16.5
Git Commit:   4c5283fabff2de5145838f1847a5a7b2b1fbc0a5-dirty
Built:        Tue Jan  1 01:00:00 1980
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.22.3
  cgroupControllers: []
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 12
  distribution:
    distribution: debian
    version: "11"
  eventLogger: file
  hostname: DESKTOP
  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.16.3-microsoft-standard-WSL2
  linkmode: static
  memFree: 6877728768
  memTotal: 13343838208
  ociRuntime:
    name: crun
    package: 'crun: /usr/bin/crun'
    path: /usr/bin/crun
    version: |-
      crun version 0.18.1-7931a-dirty
      commit: 7931a1eab0590eff4041c1f74e2844b297c31cea
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /tmp/podman-run-1000/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: ""
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: 'slirp4netns: /usr/bin/slirp4netns'
    version: |-
      slirp4netns version 1.1.8
      commit: unknown
      libslirp: 4.3.1-git
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.4.4
  swapFree: 4294967296
  swapTotal: 4294967296
  uptime: 6h 44m 30.7s (Approximately 0.25 days)
registries:
  search:
  - docker.io
store:
  configFile: /home/alpaca/.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: /usr/bin/fuse-overlayfs'
      Version: |-
        fusermount3 version: 3.10.3
        fuse-overlayfs: version 1.4
        FUSE library version 3.10.3
        using FUSE kernel interface version 7.31
  graphRoot: /home/alpaca/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 43
  runRoot: /tmp/podman-run-1000/containers
  volumePath: /home/alpaca/.local/share/containers/storage/volumes
version:
  APIVersion: 3.3.1
  Built: 315532800
  BuiltTime: Tue Jan  1 01:00:00 1980
  GitCommit: 4c5283fabff2de5145838f1847a5a7b2b1fbc0a5-dirty
  GoVersion: go1.16.5
  OsArch: linux/amd64
  Version: 3.3.1

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)

Using the static version from here. Can't try a newer one as they fail with:

./podman: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./podman)
./podman: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./podman)

Additional environment details (AWS, VirtualBox, physical, etc.): Windows 10, WSL2, Debian Bullseye

rhatdan commented 3 years ago

0001-We-should-use-same-api-as-local.patch.txt Charlie, not sure if this is a bug or not, but we should apply this patch to the code, if you are going to open a PR.

cdoern commented 3 years ago

Ok, @rhatdan applied patch, will open a PR and we can discuss if it is an issue or not. Should I add a test to make sure the response is of type string?

github-actions[bot] commented 3 years ago

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

cdoern commented 3 years ago

@rhatdan did we ever decide if this is actually a bug?

rhatdan commented 3 years ago

Yes I think it should be fixed.

github-actions[bot] commented 2 years ago

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

rhatdan commented 2 years ago

@cdoern still working on this?

cdoern commented 2 years ago

yep @rhatdan I have a PR out for it, I will check back on it today

github-actions[bot] commented 2 years ago

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

rhatdan commented 2 years ago

@cdoern any progress?

cdoern commented 2 years ago

@rhatdan I am waiting on some feedback from @jwhonce I am getting stuck in some weird spots. I applied the diff you gave me but Jhon says that it is a breaking API change.

rhatdan commented 2 years ago

Breaking API changes are good for 4.0

cdoern commented 2 years ago

ok, I will try to figure this out and get the PR working @rhatdan

cdoern commented 2 years ago

@jwhonce is "Err' not the right keyword for deleting pods? https://github.com/containers/podman/pull/12164/checks?check_run_id=4694248413

the api docs says it is... https://docs.podman.io/en/latest/_static/api.html#operation/PodDeleteLibpod

github-actions[bot] commented 2 years ago

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

rhatdan commented 2 years ago

@cdoern @jwhonce Is this fixed?

github-actions[bot] commented 2 years ago

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

github-actions[bot] commented 2 years ago

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

rhatdan commented 2 years ago

@baude Any movement on this?

github-actions[bot] commented 2 years ago

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

umohnani8 commented 2 years ago

@cdoern can we revisit this? What was the actual reason for closing the PR you created for it.

github-actions[bot] commented 2 years ago

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

rhatdan commented 2 years ago

@cdoern @umohnani8 what is the state of this?

github-actions[bot] commented 2 years ago

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