diff --git a/run_with_sd/README.md b/run_with_sd/README.md new file mode 100644 index 0000000000000000000000000000000000000000..03b3b51c44d48a515da4867ac8629618c42a8c40 --- /dev/null +++ b/run_with_sd/README.md @@ -0,0 +1,8 @@ +# 兼容systemd模式运行问题 + +## 思路 + +## 适配 + +## 验证 + diff --git a/run_with_sd/patches/0001-fake-pid1-by-env.patch b/run_with_sd/patches/0001-fake-pid1-by-env.patch new file mode 100644 index 0000000000000000000000000000000000000000..7ac57432b592cdb664c63fbe87088ea3c9ae0fb8 --- /dev/null +++ b/run_with_sd/patches/0001-fake-pid1-by-env.patch @@ -0,0 +1,126 @@ +From 5d16d1b3ab9013d65906bbaef74164759577ab64 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Fri, 5 Nov 2021 10:44:49 +0800 +Subject: [PATCH] fake pid1 by env + +--- + src/basic/process-util.c | 52 ++++++++++++++++++++++++++++++++++++++-- + src/basic/process-util.h | 4 ++++ + src/core/execute.c | 6 ++++- + 3 files changed, 59 insertions(+), 3 deletions(-) + +diff --git a/src/basic/process-util.c b/src/basic/process-util.c +index 7d4301e..b33813d 100644 +--- a/src/basic/process-util.c ++++ b/src/basic/process-util.c +@@ -1147,7 +1147,7 @@ pid_t getpid_cached(void) { + case CACHED_PID_UNSET: { /* Not initialized yet, then do so now */ + pid_t new_pid; + +- new_pid = raw_getpid(); ++ new_pid = getpid(); + + if (!installed) { + /* __register_atfork() either returns 0 or -ENOMEM, in its glibc implementation. Since it's +@@ -1168,7 +1168,7 @@ pid_t getpid_cached(void) { + } + + case CACHED_PID_BUSY: /* Somebody else is currently initializing */ +- return raw_getpid(); ++ return getpid(); + + default: /* Properly initialized */ + return current_value; +@@ -1646,3 +1646,51 @@ static const char* const sched_policy_table[] = { + }; + + DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(sched_policy, int, INT_MAX); ++ ++static pid_t systemd_pid = CACHED_PID_UNSET; ++ ++pid_t getpid() ++{ ++ pid_t pid; ++ ++ pid = syscall(__NR_getpid); ++ if (systemd_pid == CACHED_PID_UNSET) { ++ const char *e = getenv("SYSTEMD_MAINPID"); ++ pid_t p; ++ ++ if (!e) goto out; ++ if (parse_pid(e, &p) < 0) { ++ goto out; ++ } ++ systemd_pid = p; ++ } ++ ++ if (pid == 1 || pid == systemd_pid) ++ return 1; ++out: ++ return pid; ++} ++ ++pid_t getppid() ++{ ++ static pid_t ppid; ++ ++ ppid = syscall(__NR_getppid); ++ if (ppid <= 1) return ppid; ++ ++ if (systemd_pid == CACHED_PID_UNSET) { ++ const char *e = getenv("SYSTEMD_MAINPID"); ++ pid_t p; ++ ++ if (!e) goto out; ++ if (parse_pid(e, &p) < 0) { ++ goto out; ++ } ++ systemd_pid = p; ++ } ++ ++ if (ppid == systemd_pid) ++ return 1; ++out: ++ return ppid; ++} +\ No newline at end of file +diff --git a/src/basic/process-util.h b/src/basic/process-util.h +index ddce7bd..b9293de 100644 +--- a/src/basic/process-util.h ++++ b/src/basic/process-util.h +@@ -202,3 +202,7 @@ int pidfd_get_pid(int fd, pid_t *ret); + int setpriority_closest(int priority); + + bool invoked_as(char *argv[], const char *token); ++ ++pid_t getpid(); ++ ++pid_t getppid(); +\ No newline at end of file +diff --git a/src/core/execute.c b/src/core/execute.c +index 35aea2f..9f46e28 100644 +--- a/src/core/execute.c ++++ b/src/core/execute.c +@@ -1795,7 +1795,7 @@ static int build_environment( + assert(p); + assert(ret); + +-#define N_ENV_VARS 17 ++#define N_ENV_VARS 18 + our_env = new0(char*, N_ENV_VARS + _EXEC_DIRECTORY_TYPE_MAX); + if (!our_env) + return -ENOMEM; +@@ -1956,6 +1956,10 @@ static int build_environment( + + our_env[n_env++] = x; + ++ if (asprintf(&x, "SYSTEMD_MAINPID=%s", getenv("SYSTEMD_MAINPID")) < 0) ++ return -ENOMEM; ++ our_env[n_env++] = x; ++ + our_env[n_env++] = NULL; + assert(n_env <= N_ENV_VARS + _EXEC_DIRECTORY_TYPE_MAX); + #undef N_ENV_VARS +-- +2.30.0 + diff --git a/run_with_sd/patches/0002-detect-virt.patch b/run_with_sd/patches/0002-detect-virt.patch new file mode 100644 index 0000000000000000000000000000000000000000..c27abb235eb29da22ec45056d0315dda74aad1cf --- /dev/null +++ b/run_with_sd/patches/0002-detect-virt.patch @@ -0,0 +1,25 @@ +From 14e3aa6f3d3cfaa14fbd0c2135c2096eaded9223 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 25 Oct 2021 17:18:44 +0800 +Subject: [PATCH] detect virt + +--- + src/basic/virt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/basic/virt.c b/src/basic/virt.c +index 335f59d..0ab45f1 100644 +--- a/src/basic/virt.c ++++ b/src/basic/virt.c +@@ -779,7 +779,7 @@ int running_in_chroot(void) { + if (getenv_bool("SYSTEMD_IGNORE_CHROOT") > 0) + return 0; + +- r = files_same("/proc/1/root", "/", 0); ++ r = files_same("/proc/self/root", "/", 0); + if (r < 0) + return r; + +-- +2.30.0 + diff --git a/run_with_sd/patches/0003-reap-child-by-systemd.patch b/run_with_sd/patches/0003-reap-child-by-systemd.patch new file mode 100644 index 0000000000000000000000000000000000000000..f299a5e723230a7f9fec4440a22f0ffd28a3299e --- /dev/null +++ b/run_with_sd/patches/0003-reap-child-by-systemd.patch @@ -0,0 +1,25 @@ +From 6b73a150d8e96356f31af3125680e435be7a8296 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 9 Nov 2021 16:17:11 +0800 +Subject: [PATCH] reap child by systemd + +--- + src/core/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/main.c b/src/core/main.c +index 0ddd629..d0b1af0 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -2147,7 +2147,7 @@ static int initialize_runtime( + } + } + +- if (!arg_system) ++// if (!arg_system) + /* Become reaper of our children */ + if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0) + log_warning_errno(errno, "Failed to make us a subreaper: %m"); +-- +2.30.0 + diff --git "a/run_with_sd/\345\205\274\345\256\271systemd\346\250\241\345\274\217\350\277\220\350\241\214\351\227\256\351\242\230.excalidraw" "b/run_with_sd/\345\205\274\345\256\271systemd\346\250\241\345\274\217\350\277\220\350\241\214\351\227\256\351\242\230.excalidraw" new file mode 100644 index 0000000000000000000000000000000000000000..8a41b3b3d7c9ffd21e546302298e00a2a6f68ab0 --- /dev/null +++ "b/run_with_sd/\345\205\274\345\256\271systemd\346\250\241\345\274\217\350\277\220\350\241\214\351\227\256\351\242\230.excalidraw" @@ -0,0 +1,1011 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "http://9.82.236.138:3000", + "elements": [ + { + "type": "ellipse", + "version": 74, + "versionNonce": 38717674, + "isDeleted": false, + "id": "uTEbnKHOYbZKVeYiWOeFd", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 299, + "y": -150, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 51.99999999999999, + "height": 43, + "seed": 2062082345, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [] + }, + { + "type": "text", + "version": 50, + "versionNonce": 1732017514, + "isDeleted": false, + "id": "zW1jFOjI_xpKXcZ9bvpzx", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 302, + "y": -141.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 46, + "height": 28, + "seed": 1713645001, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [ + "a-EQrqfTjL6S9S2UsxEo0" + ], + "fontSize": 20, + "fontFamily": 1, + "text": "start", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "middle" + }, + { + "type": "diamond", + "version": 76, + "versionNonce": 643645482, + "isDeleted": false, + "id": "E5LxKbZBFjBpVpVmGL9X4", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 297, + "y": -63, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 56, + "height": 67, + "seed": 2058186761, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [] + }, + { + "type": "text", + "version": 60, + "versionNonce": 1790373482, + "isDeleted": false, + "id": "qEM1FWO3B0RXMMbzwoEPX", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 312, + "y": -43.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 26, + "height": 28, + "seed": 1839317767, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [ + "kG5hcPagSAvToSCSTQ39Y", + "dWbSUdlb562foJQL_MzGM" + ], + "fontSize": 20, + "fontFamily": 1, + "text": "init", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "middle" + }, + { + "type": "arrow", + "version": 105, + "versionNonce": 384034358, + "isDeleted": false, + "id": "a-EQrqfTjL6S9S2UsxEo0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 324.62714972607796, + "y": -106, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 1, + "height": 44, + "seed": 206826823, + "groupIds": [], + "strokeSharpness": "round", + "boundElementIds": [], + "startBinding": { + "elementId": "zW1jFOjI_xpKXcZ9bvpzx", + "focus": 0.03694484605513624, + "gap": 7.5 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1, + 44 + ] + ] + }, + { + "type": "rectangle", + "version": 158, + "versionNonce": 879773302, + "isDeleted": false, + "id": "3rE6fVKtEOGFOvurK5M52", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 421, + "y": -44, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 164, + "height": 29, + "seed": 96422473, + "groupIds": [ + "D1sLu25lAA7LoexzscDXq" + ], + "strokeSharpness": "sharp", + "boundElementIds": [] + }, + { + "type": "text", + "version": 184, + "versionNonce": 2083118058, + "isDeleted": false, + "id": "eBXv9jT9s0f8Ci_QD4PWq", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 434.5, + "y": -41, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 146, + "height": 22, + "seed": 1530283209, + "groupIds": [ + "D1sLu25lAA7LoexzscDXq" + ], + "strokeSharpness": "sharp", + "boundElementIds": [ + "kG5hcPagSAvToSCSTQ39Y", + "PlnS5uOp2aAaGt4PxpZke", + "VN2djZPDyfLWzv-cKdRty", + "EQhGo_ep-K-2cXRpUWWQo", + "FNtLo1us3YGxObt7URBj-", + "dWbSUdlb562foJQL_MzGM" + ], + "fontSize": 20, + "fontFamily": 1, + "text": "兼容systemd模式", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "middle" + }, + { + "type": "rectangle", + "version": 100, + "versionNonce": 430044842, + "isDeleted": false, + "id": "YyNBSGJfsJ8oDptNpvd0y", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 286.5, + "y": 39, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 77.00000000000001, + "height": 38, + "seed": 710928679, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [ + "4cQxAlvUAGK4IqRRXRooh" + ] + }, + { + "type": "text", + "version": 78, + "versionNonce": 2058264810, + "isDeleted": false, + "id": "lPUfN3FV0ZcIkp1CQRkdY", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 289, + "y": 45, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 72, + "height": 28, + "seed": 543153511, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [ + "p-rHMq-P0DGxVhZFk_-Bo", + "gDerDQlwrOCVpM-xU1PMF", + "4cQxAlvUAGK4IqRRXRooh" + ], + "fontSize": 20, + "fontFamily": 1, + "text": "process1", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "middle" + }, + { + "type": "arrow", + "version": 76, + "versionNonce": 956059830, + "isDeleted": false, + "id": "p-rHMq-P0DGxVhZFk_-Bo", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 324.21407700590794, + "y": 2, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 3, + "height": 33, + "seed": 1708929481, + "groupIds": [], + "strokeSharpness": "round", + "boundElementIds": [], + "startBinding": null, + "endBinding": { + "elementId": "lPUfN3FV0ZcIkp1CQRkdY", + "focus": 0.11793865137801786, + "gap": 10 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 3, + 33 + ] + ] + }, + { + "type": "ellipse", + "version": 117, + "versionNonce": 202791798, + "isDeleted": false, + "id": "x_4mZrwo-daSK2kieRZsh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 305, + "y": 380, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 40, + "height": 26, + "seed": 1881853095, + "groupIds": [ + "aWKkGV4S1R4BtcjER6d1l" + ], + "strokeSharpness": "sharp", + "boundElementIds": [] + }, + { + "type": "text", + "version": 135, + "versionNonce": 2096028458, + "isDeleted": false, + "id": "y9f9x5bbsNNBOdA9JMKHA", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 309.5, + "y": 382, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 31, + "height": 28, + "seed": 675719817, + "groupIds": [ + "aWKkGV4S1R4BtcjER6d1l" + ], + "strokeSharpness": "sharp", + "boundElementIds": [ + "iyM_rVS6dxLaCcOkFQx0e" + ], + "fontSize": 20, + "fontFamily": 1, + "text": "end", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "middle" + }, + { + "type": "arrow", + "version": 637, + "versionNonce": 1121721142, + "isDeleted": false, + "id": "iyM_rVS6dxLaCcOkFQx0e", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 322.8665390153418, + "y": 326.3603038441093, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 3.683512053731306, + "height": 53.880080771275345, + "seed": 1080187977, + "groupIds": [], + "strokeSharpness": "round", + "boundElementIds": [], + "startBinding": { + "elementId": "rCGwaejCqWb3pnILfm2bD", + "focus": 0.06936186576557939, + "gap": 3.3603038441092963 + }, + "endBinding": { + "elementId": "y9f9x5bbsNNBOdA9JMKHA", + "focus": 0.15965483964853341, + "gap": 1.7596153846153584 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 3.683512053731306, + 53.880080771275345 + ] + ] + }, + { + "type": "rectangle", + "version": 72, + "versionNonce": 2105701878, + "isDeleted": false, + "id": "djmTpT4ak-jMxZy35aUuv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 267, + "y": 164, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 116, + "height": 43, + "seed": 786247975, + "groupIds": [ + "fDkcIWjv-E2bPa3bzrp9c" + ], + "strokeSharpness": "sharp", + "boundElementIds": [ + "9g3xvpX_NDJwUy8Bct6c_" + ] + }, + { + "type": "text", + "version": 68, + "versionNonce": 427681258, + "isDeleted": false, + "id": "AfuQYisvemn9aURG5MUhl", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 285, + "y": 174.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 80, + "height": 28, + "seed": 1881963847, + "groupIds": [ + "fDkcIWjv-E2bPa3bzrp9c" + ], + "strokeSharpness": "sharp", + "boundElementIds": [ + "gDerDQlwrOCVpM-xU1PMF", + "VN2djZPDyfLWzv-cKdRty", + "9g3xvpX_NDJwUy8Bct6c_" + ], + "fontSize": 20, + "fontFamily": 1, + "text": "监控保活", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "middle" + }, + { + "type": "rectangle", + "version": 95, + "versionNonce": 1297979562, + "isDeleted": false, + "id": "dNch5EfkPu9m_n6dee4L_", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 266, + "y": 272, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 118, + "height": 42, + "seed": 893816487, + "groupIds": [ + "fDkcIWjv-E2bPa3bzrp9c" + ], + "strokeSharpness": "sharp", + "boundElementIds": [ + "9g3xvpX_NDJwUy8Bct6c_" + ] + }, + { + "type": "text", + "version": 80, + "versionNonce": 816052714, + "isDeleted": false, + "id": "BjZtT6FRZLTzKmVt2GBqG", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 285, + "y": 279, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 80, + "height": 28, + "seed": 1617268551, + "groupIds": [ + "fDkcIWjv-E2bPa3bzrp9c" + ], + "strokeSharpness": "sharp", + "boundElementIds": [ + "iyM_rVS6dxLaCcOkFQx0e" + ], + "fontSize": 20, + "fontFamily": 1, + "text": "回收僵尸", + "baseline": 19, + "textAlign": "center", + "verticalAlign": "middle" + }, + { + "type": "arrow", + "version": 181, + "versionNonce": 841696694, + "isDeleted": false, + "id": "9g3xvpX_NDJwUy8Bct6c_", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 324.06023943863806, + "y": 210.91780852861703, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 2.097176561206652, + "height": 52.072466409206385, + "seed": 2057840743, + "groupIds": [ + "fDkcIWjv-E2bPa3bzrp9c" + ], + "strokeSharpness": "round", + "boundElementIds": [], + "startBinding": { + "elementId": "AfuQYisvemn9aURG5MUhl", + "focus": 0.04542518083218015, + "gap": 8.41780852861703 + }, + "endBinding": { + "elementId": "dNch5EfkPu9m_n6dee4L_", + "focus": 0.03953552491141529, + "gap": 9.009725062176585 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 2.097176561206652, + 52.072466409206385 + ] + ] + }, + { + "type": "rectangle", + "version": 244, + "versionNonce": 588959402, + "isDeleted": false, + "id": "rCGwaejCqWb3pnILfm2bD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 207, + "y": 140, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 236, + "height": 183.00000000000003, + "seed": 475861799, + "groupIds": [ + "fDkcIWjv-E2bPa3bzrp9c" + ], + "strokeSharpness": "sharp", + "boundElementIds": [ + "VN2djZPDyfLWzv-cKdRty", + "iyM_rVS6dxLaCcOkFQx0e", + "WTZt-UzP6fkvjOuXSOBmI", + "4cQxAlvUAGK4IqRRXRooh", + "EQhGo_ep-K-2cXRpUWWQo", + "FNtLo1us3YGxObt7URBj-" + ] + }, + { + "type": "text", + "version": 152, + "versionNonce": 1779107190, + "isDeleted": false, + "id": "hrKw0YxAPSxeZiY8rpre1", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 221, + "y": 227, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 80, + "height": 22, + "seed": 996417417, + "groupIds": [ + "fDkcIWjv-E2bPa3bzrp9c" + ], + "strokeSharpness": "sharp", + "boundElementIds": [], + "fontSize": 20, + "fontFamily": 1, + "text": "核心功能", + "baseline": 18, + "textAlign": "left", + "verticalAlign": "top" + }, + { + "type": "rectangle", + "version": 125, + "versionNonce": 1281029674, + "isDeleted": false, + "id": "BqxT0881TGQ77jPeZCUSx", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 532, + "y": 182.95999999999998, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 127.00000000000011, + "height": 66.04, + "seed": 1669376089, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [ + "WTZt-UzP6fkvjOuXSOBmI" + ] + }, + { + "type": "text", + "version": 94, + "versionNonce": 1469613994, + "isDeleted": false, + "id": "Dvu7qlB2mMgXIheTEWH5V", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 541.313333333334, + "y": 212.17, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 109.22, + "height": 18.626666666666672, + "seed": 436534967, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [ + "uo9lHCNyUb4M1IHhc2Y8C" + ], + "fontSize": 16.933333333333337, + "fontFamily": 1, + "text": "自恢复/自升级", + "baseline": 11.626666666666672, + "textAlign": "center", + "verticalAlign": "middle" + }, + { + "type": "arrow", + "version": 539, + "versionNonce": 982634550, + "isDeleted": false, + "id": "WTZt-UzP6fkvjOuXSOBmI", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 448.9338723404255, + "y": 219.65280926901727, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 75.81361702127651, + "height": 0.34152838335387514, + "seed": 1198999321, + "groupIds": [], + "strokeSharpness": "round", + "boundElementIds": [], + "startBinding": { + "elementId": "rCGwaejCqWb3pnILfm2bD", + "focus": -0.1347960605918656, + "gap": 5.933872340425523 + }, + "endBinding": { + "elementId": "BqxT0881TGQ77jPeZCUSx", + "focus": -0.13009845288326266, + "gap": 7.252510638297906 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 75.81361702127651, + 0.34152838335387514 + ] + ] + }, + { + "type": "arrow", + "version": 442, + "versionNonce": 1169668790, + "isDeleted": false, + "id": "4cQxAlvUAGK4IqRRXRooh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 325.62477427996714, + "y": 80.18782847655267, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0.1871620108377101, + "height": 47.35259705536221, + "seed": 1694070041, + "groupIds": [], + "strokeSharpness": "round", + "boundElementIds": [], + "startBinding": { + "elementId": "lPUfN3FV0ZcIkp1CQRkdY", + "focus": -0.019650893735342234, + "gap": 7.187828476552667 + }, + "endBinding": { + "elementId": "rCGwaejCqWb3pnILfm2bD", + "focus": 0.00022566547226877818, + "gap": 12.459574468085123 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.1871620108377101, + 47.35259705536221 + ] + ] + }, + { + "type": "arrow", + "version": 118, + "versionNonce": 1933903158, + "isDeleted": false, + "id": "dWbSUdlb562foJQL_MzGM", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "angle": 0, + "x": 346, + "y": -28.88054875803728, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 76, + "height": 2.4303042202309157, + "seed": 2037698998, + "groupIds": [], + "strokeSharpness": "round", + "boundElementIds": [], + "startBinding": { + "elementId": "qEM1FWO3B0RXMMbzwoEPX", + "focus": 0.08955387402286714, + "gap": 8 + }, + "endBinding": { + "elementId": "eBXv9jT9s0f8Ci_QD4PWq", + "focus": 0.3033472803347281, + "gap": 12.5 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 76, + -2.4303042202309157 + ] + ] + }, + { + "type": "arrow", + "version": 120, + "versionNonce": 417443766, + "isDeleted": false, + "id": "FNtLo1us3YGxObt7URBj-", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 526, + "y": -6.5, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 187, + "height": 129, + "seed": 478444150, + "groupIds": [], + "strokeSharpness": "round", + "boundElementIds": [], + "startBinding": { + "elementId": "eBXv9jT9s0f8Ci_QD4PWq", + "focus": -0.2627321749550629, + "gap": 12.5 + }, + "endBinding": { + "elementId": "rCGwaejCqWb3pnILfm2bD", + "focus": -0.9157598499061911, + "gap": 17.5 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -3, + 91 + ], + [ + -187, + 129 + ] + ] + }, + { + "type": "rectangle", + "version": 57, + "versionNonce": 718903926, + "isDeleted": false, + "id": "VLvIl3HTS8AUwRtunnp8X", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 618, + "y": -213.5, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 675, + "height": 373, + "seed": 2044325674, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [] + }, + { + "type": "text", + "version": 278, + "versionNonce": 1221127979, + "isDeleted": false, + "id": "vHqcOE1qojgUa_9sT1LQD", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 637.5, + "y": -191, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 637, + "height": 308, + "seed": 529004650, + "groupIds": [], + "strokeSharpness": "sharp", + "boundElementIds": [], + "fontSize": 20, + "fontFamily": 1, + "text": "兼容systemd模式存在问题:\n1、fake pid1 解决版本:通过环境变量,hack getpid,getppid 已完成\n2、selinux,重新刷新规则,待处理\n3、非1号进程运行,无法监控其他进程退出信号,方案验证\n4、解决两次拉起systemd问题,\n\n适配:\n1、var-lib-nfs-rpcpipfs.mount无法自动插入内核模块,已规避\n2、部分对1号进程特殊判断,如detect_virt,已完成\n3、dracut需要修改00systemd模块,将init打包到initrd,已完成\n", + "baseline": 299, + "textAlign": "left", + "verticalAlign": "top" + }, + { + "id": "KubJuyAJEtpeIiMD-twtZ", + "type": "rectangle", + "x": 688, + "y": 201.25, + "width": 600, + "height": 241, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1465805189, + "version": 41, + "versionNonce": 1704842501, + "isDeleted": false, + "boundElementIds": null + }, + { + "id": "WvviBx-a0C3rvHz579FC5", + "type": "text", + "x": 707, + "y": 202.75, + "width": 483, + "height": 140, + "angle": 0, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1192630213, + "version": 102, + "versionNonce": 1616546379, + "isDeleted": false, + "boundElementIds": null, + "text": "步骤:\n1、取systemd源码,应用适配补丁,rpmbuild编译并构建\n2、安装systemd rpm\n3、修改dracut中关于dracut/modules.d/00systemd,\n替换initrd中init", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 131 + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file