diff --git a/git-commit b/git-commit index 7fe8b1f19fbd689ea62f63b7a4ce8a3d25300ea8..7a322b21b469f2faaf2dac7cfd0b0ac260f78d0c 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -800b2584e8ee3aca01174bcfc0931c0bfc509e8d +a8c0a5b09ea02b2003bd2e4940deef5142170dd2 diff --git a/patch/0149-runc-libct-init-unify-init-fix-its-error-logic.patch b/patch/0149-runc-libct-init-unify-init-fix-its-error-logic.patch new file mode 100644 index 0000000000000000000000000000000000000000..7c1558c73245266553615f6d4714aa7c4da8b733 --- /dev/null +++ b/patch/0149-runc-libct-init-unify-init-fix-its-error-logic.patch @@ -0,0 +1,45 @@ +From 66c89bd1455e259d7c7b4fd1d67664c762402e8c Mon Sep 17 00:00:00 2001 +From: Kir Kolyshkin +Date: Wed, 9 Aug 2023 12:04:26 +0900 +Subject: [PATCH] libct/init: unify init, fix its error logic + +Fix init error handling logic. + +The main issues at hand are: +- the "unable to convert _LIBCONTAINER_INITPIPE" error from + StartInitialization is never shown; +- errors from WriteSync and WriteJSON are never shown; + +Generally, our goals are: + - if there's any error, do our best to show it; + - but only show each error once; + +Signed-off-by: Kir Kolyshkin +--- + libcontainer/factory_linux.go | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/libcontainer/factory_linux.go b/libcontainer/factory_linux.go +index e4ef518..0b2aa74 100644 +--- a/libcontainer/factory_linux.go ++++ b/libcontainer/factory_linux.go +@@ -294,13 +294,14 @@ func (l *LinuxFactory) StartInitialization() (err error) { + // We have an error during the initialization of the container's init, + // send it back to the parent process in the form of an initError. + if werr := utils.WriteJSON(pipe, syncT{procError}); werr != nil { +- fmt.Fprintln(os.Stderr, err) ++ fmt.Fprintln(os.Stderr, werr) + return + } + if werr := utils.WriteJSON(pipe, newSystemError(err)); werr != nil { +- fmt.Fprintln(os.Stderr, err) ++ fmt.Fprintln(os.Stderr, werr) + return + } ++ err = nil + }() + defer func() { + if e := recover(); e != nil { +-- +2.33.0 + diff --git a/runc.spec b/runc.spec index 9162f8b6e2042c897a18b6436ec9500337658ff3..c4886aa5b760afb9b652fa97f1726e030526fa76 100644 --- a/runc.spec +++ b/runc.spec @@ -4,7 +4,7 @@ Name: docker-runc Version: 1.0.0.rc3 -Release: 312 +Release: 313 Summary: runc is a CLI tool for spawning and running containers according to the OCI specification. License: ASL 2.0 @@ -57,6 +57,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc %{_bindir}/runc %changelog +* Mon Sep 18 2023 zhongjiawei - 1.0.0.rc3-313 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix init error return logic + * Tue Aug 22 2023 zhongjiawei - 1.0.0.rc3-312 - Type:bugfix - CVE:NA diff --git a/series.conf b/series.conf index 97ab752821d62367636705b715672889d96f6745..4c3276aa070e42e3cb5c3916614dccb2f16a589a 100644 --- a/series.conf +++ b/series.conf @@ -148,4 +148,5 @@ patch/0001-add-loongarch-support-for-libcontainer.patch patch/0146-runc-enable-cpuset-preferred-by-proc-sys-kernel-sche.patch patch/0147-runc-ingore-error-when-force-deleting-a-non-exist-cont.patch patch/0148-runc-delete-invalid-cgroupinfo-logs.patch +patch/0149-runc-libct-init-unify-init-fix-its-error-logic.patch #end