This fixes the following staticcheck warning:
> pkg/cgroups/utils_linux.go:224:25: QF1001: could apply De Morgan's law (staticcheck)
> if parts[2] == "/" && !(unifiedMode && parts[1] == "") {
> ^
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
In podman we have code to move a process into a new systemd cgroup. This
code lived in the podman utils package. Because the new rootlessnetns
must call into that move this code to c/common.
Instead of dumping this again into a "util" package create a systemd
package which should have a better name. Also move the cgroup code
directly into pkg/cgroup. I am sure we can do some cleanup there in a
followup to prevent duplication.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Selectively disable cases that I cannot touch or don't bother spending
time on. Future cases will be avoided.
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
`github.com/pkg/errors` is deprecated since quite some time so we now
use the native error wrapping for more idiomatic golang.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
switch c/common to use runc cgroup creation so that we can use resource limits
This entails importing the newly refactored runc code to manage reading from and writing to cgroup.
vendoring in directly an unreleased runc commit from opencontainers/runc#3452
Signed-off-by: cdoern <cdoern@redhat.com>