You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
podman.errors.exceptions.APIError: 500 Server Error: Internal Server Error (decode(): json: cannot unmarshal number -1 into Go struct field POSIXRlimit.r_limits.hard of type uint64)
Describe the results you expected
Expected successful creation of container with memlock min/max set to maximum values.
Issue Description
https://docs.podman.io/en/latest/_static/api.html#tag/containers/operation/ContainerCreateLibpod
r_limits
hard integer
Hard is the hard limit for the specified type
soft integer
Soft is the soft limit for the specified type
There is no direct reference to Ulimits.
#19879
In PR 19879 Podman added support for passing Ulimits as -1 to mean min / max
Steps to reproduce the issue
/podman-py
containers_create
https://github.com/containers/podman-py/blob/main/podman/domain/containers_create.py
Code Example
client.containers.create(image=img, command=['/bin/bash'], ulimits=[{"Name": "memlock", "Soft": -1, "Hard": -1}])
Describe the results you received
podman.errors.exceptions.APIError: 500 Server Error: Internal Server Error (decode(): json: cannot unmarshal number -1 into Go struct field POSIXRlimit.r_limits.hard of type uint64)
Describe the results you expected
Expected successful creation of container with memlock min/max set to maximum values.
podman info output
Podman in a container
Yes
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: