diff --git a/git-commit b/git-commit index ce61096a8ac1d51ea8f50af5a9dc04aee9150c35..3881050b7b02b3f6f35e56b0bf9dbf84800bff52 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -09a056364fa76117ea9b193cb4266265e5683db3 +ba8307fbddb39f7fefd19d8a74f5b99d9851f045 diff --git a/patch/0030-runc-Handle-kmem.limit_in_bytes-removal.patch b/patch/0030-runc-Handle-kmem.limit_in_bytes-removal.patch new file mode 100644 index 0000000000000000000000000000000000000000..30b9ea2f3acf465c5ad7c0e98521bf02de02143f --- /dev/null +++ b/patch/0030-runc-Handle-kmem.limit_in_bytes-removal.patch @@ -0,0 +1,41 @@ +From 23ec6c42c22a7bfd4494b15abc9c3303018dec85 Mon Sep 17 00:00:00 2001 +From: Jordan Rife +Date: Sat, 16 Sep 2023 18:10:00 +0000 +Subject: [PATCH] Handle kmem.limit_in_bytes removal + +kmem.limit_in_bytes has been removed in upstream linux and this patch +is queued to be backported to linux 6.1 stable: + +- https://lore.kernel.org/linux-mm/20230705134434.GA156754@cmpxchg.org/T/ +- https://www.spinics.net/lists/stable-commits/msg316619.html + +Without this change to libcontainerd, GetStats() will return an error +on the latest kernel(s). A downstream effect is that Kubernetes's +kubelet does not start up. This fix was tested by ensuring that it +unblocks kubelet startup when running on the latest kernel. + +Signed-off-by: Jordan Rife +--- + libcontainer/cgroups/fs/memory.go | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libcontainer/cgroups/fs/memory.go b/libcontainer/cgroups/fs/memory.go +index b7c75f94..a0e78074 100644 +--- a/libcontainer/cgroups/fs/memory.go ++++ b/libcontainer/cgroups/fs/memory.go +@@ -234,6 +234,12 @@ func getMemoryData(path, name string) (cgroups.MemoryData, error) { + memoryData.Failcnt = value + value, err = fscommon.GetCgroupParamUint(path, limit) + if err != nil { ++ if name == "kmem" && os.IsNotExist(err) { ++ // Ignore ENOENT as kmem.limit_in_bytes has ++ // been removed in newer kernels. ++ return memoryData, nil ++ } ++ + return cgroups.MemoryData{}, err + } + memoryData.Limit = value +-- +2.33.0 + diff --git a/runc.spec b/runc.spec index e728bf3e51adc73465c537b80fb57e2f3062a0f7..291b1b055687319404e2cfc55c7eac62ee4607ef 100644 --- a/runc.spec +++ b/runc.spec @@ -3,7 +3,7 @@ Name: docker-runc Version: 1.1.8 -Release: 5 +Release: 6 Summary: runc is a CLI tool for spawning and running containers according to the OCI specification. License: ASL 2.0 @@ -54,6 +54,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc %{_bindir}/runc %changelog +* Thu Oct 12 2023 zhongjiawei - 1.1.8-6 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:handle kmem.limit_in_bytes removal + * Mon Sep 18 2023 zhongjiawei - 1.1.8-5 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index a6e721f66643236e00044d5d9ad17fbb48e1fbdd..5a4b9131cf045fb03e73dfa42af36b796ba98a02 100644 --- a/series.conf +++ b/series.conf @@ -26,3 +26,4 @@ patch/0026-runc-Fixed-init-state-error-variable.patch patch/0027-runc-libct-fix-shared-pidns-detection.patch patch/0028-runc-nsenter-cloned_binary-remove-bindfd-logic-entirely.patch patch/0029-runc-libct-init-unify-init-fix-its-error-logic.patch +patch/0030-runc-Handle-kmem.limit_in_bytes-removal.patch