nvwa/0007-add-support-for-nginx-service-dump-restore.patch
anatasluo a39bbe377c add support for nginx service dump/restore
1. add --skip-in-flight and --enable-external-masters options

For nginx service, it has a mount point in /run/user
which was used by pam_systemd to store non-essential
runtime files or objects(check more info in pam_systemd manpage).

To support dumpping such a mount point, criu needs enable
--enable-external-masters.

For in flight connections, we simply drop it.

2. restore pid file after restore from systemd

When I use systemd to restore nginx service,
I find that systemd will check pid file and it will
timeout since no value can be found in pid file.

To slove this problem, nvwa will supply this value
for systemd.

Signed-off-by: anatasluo <luolongjuna@gmail.com>
2021-08-06 21:37:54 +08:00

34 lines
1023 B
Diff

From a01224e1cd57813e29ceab256b8acaa906f4e387 Mon Sep 17 00:00:00 2001
From: anatasluo <luolongjuna@gmail.com>
Date: Tue, 27 Jul 2021 08:03:19 +0000
Subject: [PATCH] add support for nginx service dump/restore
For nginx service, it has a mount point in /run/user
which was used by pam_systemd to store non-essential
runtime files or objects(check more info in pam_systemd manpage).
To support dumpping such a mount point, criu needs enable
--enable-external-masters.
Signed-off-by: anatasluo <luolongjuna@gmail.com>
---
src/server.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/server.go b/src/server.go
index 3de06a5..6b5d2c2 100644
--- a/src/server.go
+++ b/src/server.go
@@ -212,7 +212,7 @@ func loadCmdline() (string, error) {
}
func getCriuExtPara() []string {
- criuExtPara := []string{"--shell-job"}
+ criuExtPara := []string{"--shell-job", "--enable-external-masters", "--skip-in-flight"}
enablePM := nvwaRestoreConfig.GetBool("enable_pin_memory")
if enablePM {
--
2.31.1