summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-08-26 18:06:27 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-08-26 18:06:42 +0200
commite448122feff952f574acdd0f9dea3c1d2edcaccb (patch)
tree8f13e3924b60af21a36bd18b23b192f83a7558eb /cmd
parente47b54df3bdd7caf41d1639a7c06ce75a1989a63 (diff)
downloadpodman-e448122feff952f574acdd0f9dea3c1d2edcaccb.tar.gz
podman-e448122feff952f574acdd0f9dea3c1d2edcaccb.tar.bz2
podman-e448122feff952f574acdd0f9dea3c1d2edcaccb.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>
Diffstat (limited to 'cmd')
-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()