diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-08-26 18:06:27 +0200 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-09-06 14:45:30 -0400 |
commit | fc5cd0e2406302972c029946eae047609d9a53e1 (patch) | |
tree | c6283cfee8aac46c49ef4b31ecfa41d2eb2464ad | |
parent | d4b62e322b7c67b5c242a4c47e0f76250f2c0037 (diff) | |
download | podman-fc5cd0e2406302972c029946eae047609d9a53e1.tar.gz podman-fc5cd0e2406302972c029946eae047609d9a53e1.tar.bz2 podman-fc5cd0e2406302972c029946eae047609d9a53e1.zip |
service: make move to sub-cgroup non fatal
if we are running in a container in the root cgroup, Podman tries to
move itself to a sub-cgroup. This could be a problem in a setup where
the cgroups are not writeable, so just log a debug message and
continue, since anyway it is a best-effort operation.
Closes: https://github.com/containers/podman/issues/15498
[NO NEW TESTS NEEDED]
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r-- | cmd/podman/system/service_abi.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go index 8d0240a8d..68ac8902b 100644 --- a/cmd/podman/system/service_abi.go +++ b/cmd/podman/system/service_abi.go @@ -105,7 +105,9 @@ func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities } if err := utils.MaybeMoveToSubCgroup(); err != nil { - return err + // it is a best effort operation, so just print the + // error for debugging purposes. + logrus.Debugf("Could not move to subcgroup: %v", err) } servicereaper.Start() |