summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-08-26 18:06:27 +0200
committerMatthew Heon <mheon@redhat.com>2022-09-06 14:45:30 -0400
commitfc5cd0e2406302972c029946eae047609d9a53e1 (patch)
treec6283cfee8aac46c49ef4b31ecfa41d2eb2464ad
parentd4b62e322b7c67b5c242a4c47e0f76250f2c0037 (diff)
downloadpodman-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.go4
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()