From 094b0ffec989de94498d428911be34c1bd285054 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Thu, 19 May 2022 09:06:20 +0100 Subject: [PATCH] Use mntns-compat-mode as a temporary fix for runc Signed-off-by: Radostin Stoyanov --- config-always-use-mntns-compat-mode.patch | 31 +++++++++++++++++++++++ criu.spec | 12 +++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 config-always-use-mntns-compat-mode.patch diff --git a/config-always-use-mntns-compat-mode.patch b/config-always-use-mntns-compat-mode.patch new file mode 100644 index 0000000..60b99cd --- /dev/null +++ b/config-always-use-mntns-compat-mode.patch @@ -0,0 +1,31 @@ +From 9086891f2e524f9630ee474b87e8b1530ff03c7a Mon Sep 17 00:00:00 2001 +From: Radostin Stoyanov +Date: Thu, 19 May 2022 08:45:46 +0100 +Subject: [PATCH] config: Always use mntns-compat-mode + +Signed-off-by: Radostin Stoyanov +--- + criu/config.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/criu/config.c b/criu/config.c +index 14a11f9c3..f4a7f57c3 100644 +--- a/criu/config.c ++++ b/criu/config.c +@@ -1105,10 +1105,9 @@ int check_options(void) + } + #endif + +- if (opts.mntns_compat_mode && opts.mode != CR_RESTORE) { +- pr_err("Option --mntns-compat-mode is only valid on restore\n"); +- return 1; +- } else if (!opts.mntns_compat_mode && opts.mode == CR_RESTORE) { ++ // FIXME: Always use mntns-compat-mode until we have a proper fix for ++ // https://github.com/opencontainers/runc/pull/3442 ++ if (opts.mode == CR_RESTORE) { + if (check_mount_v2()) { + pr_debug("Mount engine fallback to --mntns-compat-mode mode\n"); + opts.mntns_compat_mode = true; +-- +2.35.3 + diff --git a/criu.spec b/criu.spec index 31413ad..7a6645a 100644 --- a/criu.spec +++ b/criu.spec @@ -17,12 +17,16 @@ Name: criu Version: 3.17 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tool for Checkpoint/Restore in User-space License: GPLv2 URL: http://criu.org/ Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz +# FIXME: Always use mntns-compat-mode until we have a proper fix for +# https://github.com/opencontainers/runc/pull/3442 +Patch98: config-always-use-mntns-compat-mode.patch + # Add protobuf-c as a dependency. # We use this patch because the protobuf-c package name # in RPM and DEB is different. @@ -121,6 +125,7 @@ This script can help to workaround the so called "PID mismatch" problem. %prep %setup -q +%patch98 -p1 %patch99 -p1 %if 0%{?rhel} && 0%{?rhel} <= 7 @@ -209,9 +214,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a %doc %{_mandir}/man1/criu-ns.1* %changelog +* Thu May 19 2022 Radostin Stoyanov - 3.17-2 +- Use mntns-compat-mode as a temporary fix for runc + * Fri May 6 2022 Radostin Stoyanov - 3.17-1 - Update to release version 3.17 -- Don not install compel and amdgpu_plugin man pages +- Do not install compel and amdgpu_plugin man pages * Tue Apr 5 2022 Radostin Stoyanov - 3.16.1-12 - Update rseq patches