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

Docker compat: Return null when swappiness is -1 #24126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

inknos
Copy link
Collaborator

@inknos inknos commented Oct 1, 2024

Fixes: #23824

Does this PR introduce a user-facing change?

`podman inspect` returns MemorySwappiness: null when it's not set

Copy link
Contributor

openshift-ci bot commented Oct 1, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: inknos
Once this PR has been reviewed and has the lgtm label, please assign mtrmac for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@inknos
Copy link
Collaborator Author

inknos commented Oct 1, 2024

I speak a very broken Go, and I am not sure whether this is the right place to fix it, so I need some expertise here. @baude @Luap99

(It makes some sense in my head though)

pkg/specgenutil/specgen.go Outdated Show resolved Hide resolved
libpod/define/container_inspect.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Oct 3, 2024
@inknos
Copy link
Collaborator Author

inknos commented Oct 3, 2024

@Luap99 makes more sense now.

However, I am checking it on my system and MemorySwappiness is 0...

$ ./bin/podman inspect practical_germain | grep Swap
               "MemorySwap": 0,
               "MemorySwappiness": 0,

Not sure if I am missing something or if this is part of a bigger problem. Shouldn't it be -1 on systems with cgroupsv2?

$ grep cgroup /proc/filesystems
nodev   cgroup
nodev   cgroup2

@inknos inknos changed the title Docker compat: Return null when swappiness is 0 Docker compat: Return null when swappiness is -1 Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Change to remote API; merits scrutiny release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman inspect should return null on some value instead of 0
2 participants