Adds a couple of new linters with many new warnings:
- perfsprint (fixed in code, excluded for tests)
- revive (fix the problems, disabled the dot import check as we use it
for ginkgo)
- inamedparam (disabled because it is opinionated)
- testifylint (great linter but we have like 1000+ issues that I have no
time fixing now)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
they are a dup of the _linux.go version. Move the linux-only
functions to the _linux.go file.
[NO NEW TESTS NEEDED]
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
port Commit 10d63bf089 (cgroups: use SessionBusPrivateNoAutoStartup)
from cgroups.go to cgroups_linux.go
do not start up a dbus daemon if it is not already running.
[NO NEW TESTS NEEDED] the fix is in a dependency.
Signed-off-by: Joni Korhonen <joni.korhonen@gmail.com>
Used `go fmt` rules to migrate away from deprecated functions, for
instance `gofmt -w -s -r 'ioutil.TempDir(a, b) -> os.MkdirTemp(a, b)'`
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Podman adds an Error: to every error message. So starting an error
message with "error" ends up being reported to the user as
Error: error ...
This patch removes the stutter.
Also ioutil.ReadFile errors report the Path, so wrapping the err message
with the path causes a stutter.
Signed-off-by: Daniel J Walsh <dwalsh@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>
in the first PR for improving cgroup creation, systemd was not included. This change is as simple as including a resource parameter in the `NewSystemd` function and leaving the creation
in podman to do the rest. Also, a new function has been added to convert spec.Linux limits into systemd properties
Signed-off-by: Charlie Doern <cdoern@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>