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 inspect should return null on some value instead of 0 #23824

Open
chisaato opened this issue Aug 31, 2024 · 5 comments · May be fixed by #24126
Open

podman inspect should return null on some value instead of 0 #23824

chisaato opened this issue Aug 31, 2024 · 5 comments · May be fixed by #24126
Assignees
Labels
6.0 Breaking changes for Podman 6.0 jira kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote

Comments

@chisaato
Copy link

Issue Description

here is a difference in podman docker emulation api.

In the crun config, swappiness is unset, which means this value can be return to null in podman inspect.
Also, on system with cgoupv2 changing swappiness does not make any sense, so it should be unset and give a null.

Steps to reproduce the issue

Steps to reproduce the issue

  1. create any containers with docker then inspect it
  2. create any containers with podman then inspect it
  3. compare the dirrerence

Describe the results you received

podman inspect gives MemorySwappiness to 0 instead of null .

Describe the results you expected

this value should be null like docker inspect

podman info output

host:
  arch: amd64
  buildahVersion: 1.37.2
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - rdma
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.10-1.fc40.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: '
  cpuUtilization:
    idlePercent: 97.31
    systemPercent: 0.86
    userPercent: 1.82
  cpus: 32
  databaseBackend: boltdb
  distribution:
    distribution: fedora
    version: "40"
  eventLogger: journald
  freeLocks: 2046
  hostname: gzz-desktop
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.10.6-200.fc40.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 40367509504
  memTotal: 66913804288
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.12.1-1.fc40.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.12.1
    package: netavark-1.12.1-1.fc40.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.12.1
  ociRuntime:
    name: crun
    package: crun-1.15-1.fc40.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.15
      commit: e6eacaf4034e84185fd8780ac9262bbf57082278
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20240821.g1d6142f-1.fc40.x86_64
    version: |
      pasta 0^20240821.g1d6142f-1.fc40.x86_64
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  rootlessNetworkCmd: pasta
  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: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.2-2.fc40.x86_64
    version: |-
      slirp4netns version 1.2.2
      commit: 0ee2d87523e906518d34a6b423271e4826f71faf
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.5
  swapFree: 8589930496
  swapTotal: 8589930496
  uptime: 0h 22m 30.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 2
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /usr/lib/containers/storage
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 1023709442048
  graphRootUsed: 37784383488
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 31
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.2.2
  Built: 1724198400
  BuiltTime: Wed Aug 21 08:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.6
  Os: linux
  OsArch: linux/amd64
  Version: 5.2.2

Podman in a container

No

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

after checking difference between docker inspect and podman inspect I found there is more fields that docker gives null but podman gives empty value (0,empty array,etc.)

@chisaato chisaato added the kind/bug Categorizes issue or PR as related to a bug. label Aug 31, 2024
@github-actions github-actions bot added the remote Problem is in podman-remote label Aug 31, 2024
@mheon mheon added the 6.0 Breaking changes for Podman 6.0 label Sep 5, 2024
@mheon
Copy link
Member

mheon commented Sep 5, 2024

Tagging as 6.0 as this could be considered a breaking change to folks that rely on the current format of podman inspect. Still something we want to fix but will have to wait for our next breaking change release.

@Luap99
Copy link
Member

Luap99 commented Sep 6, 2024

Well for podman inspect yes, but the first line talk about the docker API and links to watchtower which uses the docker API AFAIK so we can and should certainly fix it there to match docker

@baude
Copy link
Member

baude commented Sep 13, 2024

@inknos mind making the docker api side changes?

@tuxillo
Copy link

tuxillo commented Oct 16, 2024

When is 6.0 coming out? Is there a release cycle?

@Luap99
Copy link
Member

Luap99 commented Oct 16, 2024

There are no specific plans for a 6.0 at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.0 Breaking changes for Podman 6.0 jira kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants