add fork pid support for kernel 4.19
Signed-off-by: anatasluo <luolongjuna@gmail.com>
This commit is contained in:
parent
f2f79df786
commit
81599bcded
42
0001-add-use-fork-pid-support-for-kernel-4.19.patch
Normal file
42
0001-add-use-fork-pid-support-for-kernel-4.19.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 8b2ad8b12dbef786ae508d9b5f342a56b491cba6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: anatasluo <luolongjuna@gmail.com>
|
||||||
|
Date: Mon, 26 Jul 2021 03:33:16 +0000
|
||||||
|
Subject: [PATCH] add use fork pid support for kernel 4.19
|
||||||
|
|
||||||
|
Signed-off-by: anatasluo <luolongjuna@gmail.com>
|
||||||
|
---
|
||||||
|
config/nvwa-restore.yaml | 3 ++-
|
||||||
|
src/server.go | 5 +++++
|
||||||
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/config/nvwa-restore.yaml b/config/nvwa-restore.yaml
|
||||||
|
index 46201f9..ab97121 100644
|
||||||
|
--- a/config/nvwa-restore.yaml
|
||||||
|
+++ b/config/nvwa-restore.yaml
|
||||||
|
@@ -2,4 +2,5 @@ pids:
|
||||||
|
services:
|
||||||
|
restore_net: false
|
||||||
|
enable_quick_kexec: false
|
||||||
|
-enable_pin_memory: false
|
||||||
|
\ No newline at end of file
|
||||||
|
+enable_pin_memory: false
|
||||||
|
+enable_use_fork_pid: false
|
||||||
|
diff --git a/src/server.go b/src/server.go
|
||||||
|
index 3de06a5..a5872da 100644
|
||||||
|
--- a/src/server.go
|
||||||
|
+++ b/src/server.go
|
||||||
|
@@ -219,6 +219,11 @@ func getCriuExtPara() []string {
|
||||||
|
criuExtPara = append(criuExtPara, "--pin-memory")
|
||||||
|
}
|
||||||
|
|
||||||
|
+ enableFP := nvwaRestoreConfig.GetBool("enable_use_fork_pid")
|
||||||
|
+ if enableFP {
|
||||||
|
+ criuExtPara = append(criuExtPara, "--use-fork-pid")
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return criuExtPara
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
10
nvwa.spec
10
nvwa.spec
@ -1,12 +1,14 @@
|
|||||||
Name: nvwa
|
Name: nvwa
|
||||||
Version: 0.1
|
Version: 0.1
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: a tool used for openEuler kernel update
|
Summary: a tool used for openEuler kernel update
|
||||||
|
|
||||||
License: MulanPSL-2.0 and Apache-2.0 and MIT and MPL-2.0
|
License: MulanPSL-2.0 and Apache-2.0 and MIT and MPL-2.0
|
||||||
URL: https://gitee.com/openeuler/nvwa
|
URL: https://gitee.com/openeuler/nvwa
|
||||||
Source: %{name}-v%{version}.tar.gz
|
Source: %{name}-v%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch1: 0001-add-use-fork-pid-support-for-kernel-4.19.patch
|
||||||
|
|
||||||
BuildRequires: golang >= 1.13
|
BuildRequires: golang >= 1.13
|
||||||
Requires: kexec-tools criu
|
Requires: kexec-tools criu
|
||||||
Requires: systemd-units iptables-services iproute
|
Requires: systemd-units iptables-services iproute
|
||||||
@ -18,8 +20,7 @@ A tool used to automate the process of seamless update of the openEuler.
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-v%{version}
|
%autosetup -n %{name}-v%{version} -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -74,6 +75,9 @@ install -m 0644 %{_builddir}/%{name}-v%{version}/misc/%{name}-pre.service %{buil
|
|||||||
%{_bindir}/%{name}-pre.sh
|
%{_bindir}/%{name}-pre.sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon 26 Jul 2021 anatasluo <luolongjuna@gmail.com> - 0.1-4
|
||||||
|
- Add use fork pid support for kernel 4.19
|
||||||
|
|
||||||
* Fri 19 Mar 2021 snoweay <snoweay@163.com> - 0.1-3
|
* Fri 19 Mar 2021 snoweay <snoweay@163.com> - 0.1-3
|
||||||
- Add secure compile args.
|
- Add secure compile args.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user