diff options
author | baude <bbaude@redhat.com> | 2021-02-10 13:39:09 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2021-02-10 14:17:58 -0600 |
commit | 5ccb1596b444e15cbefa55e3315e742f091af9d4 (patch) | |
tree | dfea8a5dee7c99b4ae103a074e92fa805da85f93 /libpod/container_inspect.go | |
parent | 4d604c10897da33b7b3677631d219481cec11c7f (diff) | |
download | podman-5ccb1596b444e15cbefa55e3315e742f091af9d4.tar.gz podman-5ccb1596b444e15cbefa55e3315e742f091af9d4.tar.bz2 podman-5ccb1596b444e15cbefa55e3315e742f091af9d4.zip |
Display correct value for unlimited ulimit
When doing a container inspect on a container with unlimited ulimits,
the value should be -1. But because the OCI spec requires the ulimit
value to be uint64, we were displaying the inspect values as a uint64 as
well. Simple change to display as an int64.
Fixes: #9303
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r-- | libpod/container_inspect.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index f50c7dbfe..efe09af92 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -871,8 +871,8 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named for _, limit := range ctrSpec.Process.Rlimits { newLimit := define.InspectUlimit{} newLimit.Name = limit.Type - newLimit.Soft = limit.Soft - newLimit.Hard = limit.Hard + newLimit.Soft = int64(limit.Soft) + newLimit.Hard = int64(limit.Hard) hostConfig.Ulimits = append(hostConfig.Ulimits, newLimit) } } |