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
This commit is contained in:
Dominique Leuenberger 2022-05-26 16:43:53 +00:00 committed by Git OBS Bridge
parent 453893c430
commit 6489f8f8af
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From a079b84539fc6120c12ee656f0224303845b3206 Mon Sep 17 00:00:00 2001
From: ttyS3 <ttys3.rust@gmail.com>
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 <ttys3.rust@gmail.com>
[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

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon May 23 11:48:34 UTC 2022 - Dario Faggioli <dfaggioli@suse.com>
- 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 <rbrown@suse.com>

View File

@ -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