-
Notifications
You must be signed in to change notification settings - Fork 305
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
runc incompatibility: cannot set swap limit without the memory limit
#1001
Comments
runc does reject such configuration, too, but only for cgroup v2. |
Doesn't seem rejected (runc v1.1.4, Ubuntu 22.04, kernel 5.15, cgroup v2 unified) |
runc compatibility: now -v prints the version in the same mode as --version. Closes: containers#1001 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
how should it be handled? Reading the memory limit? |
runc just treats |
Runc accepts `0` value of `swap` from config as an exception case * See: https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/fs2/memory.go#L36 * See: https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/utils.go#L431 As per the documentation here: https://facebookmicrosites.github.io/cgroup2/docs/memory-controller.html#using-swap Setting `memory.swap.max` to `0` is treated as `swap` being disabled hence allow `crun` to do the same. Closes: containers#1001 Signed-off-by: Aditya R <arajan@redhat.com>
While checking the
Once I remove these check |
Runc accepts `0` value of `swap` from config as an exception case * See: https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/fs2/memory.go#L36 * See: https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/utils.go#L431 As per the documentation here: https://facebookmicrosites.github.io/cgroup2/docs/memory-controller.html#using-swap Setting `memory.swap.max` to `0` is treated as `swap` being disabled hence allow `crun` to do the same. Closes: containers#1001 Signed-off-by: Aditya R <arajan@redhat.com>
Runc accepts `0` value of `swap` from config as an exception case * See: https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/fs2/memory.go#L36 * See: https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/utils.go#L431 As per the documentation here: https://facebookmicrosites.github.io/cgroup2/docs/memory-controller.html#using-swap Setting `memory.swap.max` to `0` is treated as `swap` being disabled hence allow `crun` to do the same. Closes: containers#1001 Signed-off-by: Aditya R <arajan@redhat.com>
Okay I think if 1: https://facebookmicrosites.github.io/cgroup2/docs/memory-controller.html#using-swap |
runc (v1.1.4) accepts the following
.linux.resources
configuration, but crun (v1.5) rejects withcannot set swap limit without the memory limit
The text was updated successfully, but these errors were encountered: