diff --git a/git-commit b/git-commit index 8ae37fcda1643f71f4444cff719a8b9bbaabc5e6..f11731b0538ba7cf9a30fd17184bea4a8e424aef 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -f00c21f87036fd8a6f453ae0ba294f2c7f70503e +7f4d3483bdf8c5ec6bfec21d2afd9621c3bdceee diff --git a/patch/0043-runc-fix-update-rt-runtime-us-and-rt-period-us-faile.patch b/patch/0043-runc-fix-update-rt-runtime-us-and-rt-period-us-faile.patch new file mode 100644 index 0000000000000000000000000000000000000000..4d52b133a2b03ac33652f775bc71bc9cbbea3841 --- /dev/null +++ b/patch/0043-runc-fix-update-rt-runtime-us-and-rt-period-us-faile.patch @@ -0,0 +1,48 @@ +From 744a90222c009d1cc42c7b3bc43723d6824f2f80 Mon Sep 17 00:00:00 2001 +From: zhongjiawei +Date: Fri, 20 Oct 2023 16:42:02 +0800 +Subject: [PATCH] runc:fix update rt-runtime-us and rt-period-us failed + +--- + libcontainer/cgroups/fs/cpu.go | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +diff --git a/libcontainer/cgroups/fs/cpu.go b/libcontainer/cgroups/fs/cpu.go +index 6c79f899..0b58781d 100644 +--- a/libcontainer/cgroups/fs/cpu.go ++++ b/libcontainer/cgroups/fs/cpu.go +@@ -35,16 +35,26 @@ func (s *CpuGroup) Apply(path string, r *configs.Resources, pid int) error { + } + + func (s *CpuGroup) SetRtSched(path string, r *configs.Resources) error { +- if r.CpuRtPeriod != 0 { +- if err := cgroups.WriteFile(path, "cpu.rt_period_us", strconv.FormatUint(r.CpuRtPeriod, 10)); err != nil { +- return err ++var err error ++ if r.CpuRtRuntime != 0 { ++ if err = cgroups.WriteFile(path, "cpu.rt_runtime_us", strconv.FormatInt(r.CpuRtRuntime, 10)); err != nil { ++ if r.CpuRtPeriod != 0 { ++ if err = cgroups.WriteFile(path, "cpu.rt_period_us", strconv.FormatUint(r.CpuRtPeriod, 10)); err != nil { ++ return err ++ } ++ } ++ if err = cgroups.WriteFile(path, "cpu.rt_runtime_us", strconv.FormatInt(r.CpuRtRuntime, 10)); err != nil { ++ return err ++ } ++ return nil + } + } +- if r.CpuRtRuntime != 0 { +- if err := cgroups.WriteFile(path, "cpu.rt_runtime_us", strconv.FormatInt(r.CpuRtRuntime, 10)); err != nil { ++ if r.CpuRtPeriod != 0 { ++ if err = cgroups.WriteFile(path, "cpu.rt_period_us", strconv.FormatUint(r.CpuRtPeriod, 10)); err != nil { + return err + } + } ++ + return nil + } + +-- +2.33.0 + diff --git a/runc.spec b/runc.spec index 6ff1f7d9cafed97b316c16bfacc1b639e931ec52..785d1fab8670b9af4a4a96f131d70e66600dccf6 100644 --- a/runc.spec +++ b/runc.spec @@ -3,7 +3,7 @@ Name: docker-runc Version: 1.1.3 -Release: 16 +Release: 18 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 +* Tue Oct 24 2023 zhongjiawei - 1.1.3-18 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix update rt-runtime-us and rt-period-us failed + * Thu Oct 12 2023 zhongjiawei - 1.1.3-17 - Type:bugfix - ID:NA diff --git a/series.conf b/series.conf index bdf875774ac7df052afbfcc94f7d78692f5ee504..9e37c314ff3f2df364d1765b0fa99cd7f0de7de7 100644 --- a/series.conf +++ b/series.conf @@ -40,3 +40,4 @@ patch/0039-runc-libct-fix-a-race-with-systemd-removal.patch patch/0040-runc-run-refuse-a-non-empty-cgroup.patch patch/0041-runc-libct-init-unify-init-fix-its-error-logic.patch patch/0042-runc-Handle-kmem.limit_in_bytes-removal.patch +patch/0043-runc-fix-update-rt-runtime-us-and-rt-period-us-faile.patch