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>
This commit is contained in:
Giuseppe Scrivano committed 2022-08-26 18:06:42 +02:00
1 parent e47b54df3b
commit e448122fef
1 file changed
+3 -1
+3 -1
View File
@@ -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()