From 6489f8f8af8b9b065da846d92b6ed08d468f0894b8bd3db1bcd20f954f02af37 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 26 May 2022 16:43:53 +0000 Subject: [PATCH] Accepting request 979149 from devel:microos OBS-URL: https://build.opensuse.org/request/show/979149 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/podman?expand=0&rev=94 --- ...roupPath-skip-empty-line-to-avoid-fa.patch | 31 +++++++++++++++++++ podman.changes | 9 ++++++ podman.spec | 1 + 3 files changed, 41 insertions(+) create mode 100644 0004-fix-Container.cGroupPath-skip-empty-line-to-avoid-fa.patch diff --git a/0004-fix-Container.cGroupPath-skip-empty-line-to-avoid-fa.patch b/0004-fix-Container.cGroupPath-skip-empty-line-to-avoid-fa.patch new file mode 100644 index 0000000..a9778eb --- /dev/null +++ b/0004-fix-Container.cGroupPath-skip-empty-line-to-avoid-fa.patch @@ -0,0 +1,31 @@ +From a079b84539fc6120c12ee656f0224303845b3206 Mon Sep 17 00:00:00 2001 +From: ttyS3 +Date: Sun, 8 May 2022 01:25:48 +0800 +Subject: [PATCH] fix: Container.cGroupPath() skip empty line to avoid false + error logging + +Signed-off-by: ttyS3 + +[NO NEW TESTS NEEDED] +--- + libpod/container.go | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libpod/container.go b/libpod/container.go +index e280b87a8..a953f1da9 100644 +--- a/libpod/container.go ++++ b/libpod/container.go +@@ -958,6 +958,10 @@ func (c *Container) cGroupPath() (string, error) { + + var cgroupPath string + for _, line := range bytes.Split(lines, []byte("\n")) { ++ // skip last empty line ++ if len(line) == 0 { ++ continue ++ } + // cgroups(7) nails it down to three fields with the 3rd + // pointing to the cgroup's path which works both on v1 and v2. + fields := bytes.Split(line, []byte(":")) +-- +2.36.1 + diff --git a/podman.changes b/podman.changes index 79e3cab..49e7aea 100644 --- a/podman.changes +++ b/podman.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon May 23 11:48:34 UTC 2022 - Dario Faggioli + +- Backport upstream commit be5abf03ababc ("fix: Container.cGroupPath() + skip empty line to avoid false error logging") for fixing "Error parsing + cgroup: expected 3 fields but got 1" (see bsc#1199790, as it applies + to Factory/Tumbleweed too) + * 0004-fix-Container.cGroupPath-skip-empty-line-to-avoid-fa.patch + ------------------------------------------------------------------- Tue Apr 12 08:09:02 UTC 2022 - Richard Brown diff --git a/podman.spec b/podman.spec index f81234b..06d5518 100644 --- a/podman.spec +++ b/podman.spec @@ -36,6 +36,7 @@ Source4: README.SUSE.SLES Patch1: 0001-Relabel-relabel-links-instead-of-their-targets.patch Patch2: 0002-specgen-do-not-set-OOMScoreAdj-by-default.patch Patch3: 0001-Adjust-buildah-to-opencontainers-selinux-v1.10.1.patch +Patch4: 0004-fix-Container.cGroupPath-skip-empty-line-to-avoid-fa.patch BuildRequires: bash-completion BuildRequires: cni BuildRequires: device-mapper-devel