!688 [sync] PR-687: bugfix of background execution exec error command and setting negative cpu-rt issue
From: @openeuler-sync-bot Reviewed-by: @taotao-sauce Signed-off-by: @taotao-sauce
This commit is contained in:
commit
42ba17f967
33
0074-bugfix-of-background-execution-exec-error-command.patch
Normal file
33
0074-bugfix-of-background-execution-exec-error-command.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 2c86e55d98b0d62c534ff5810c1eb1d327d6425a Mon Sep 17 00:00:00 2001
|
||||
From: zhongtao <zhongtao17@huawei.com>
|
||||
Date: Tue, 23 Apr 2024 17:44:00 +1400
|
||||
Subject: [PATCH 74/75] bugfix of background execution exec error command
|
||||
|
||||
Signed-off-by: zhongtao <zhongtao17@huawei.com>
|
||||
---
|
||||
src/daemon/modules/runtime/isula/isula_rt_ops.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c
|
||||
index 47a14b1d..854752ea 100644
|
||||
--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c
|
||||
+++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c
|
||||
@@ -1099,6 +1099,15 @@ static int get_container_process_pid(const char *workdir)
|
||||
util_usleep_nointerupt(100000);
|
||||
continue;
|
||||
}
|
||||
+ // If isulad does not read the container process pid, but isulad-shim reads the pid,
|
||||
+ // and the container process exits, isulad-shim exits accordingly.
|
||||
+ // At this time, exec should return true, because the container process has been created successfully
|
||||
+ // and exec is successful, just because The process executes too fast causing isulad to not be read correctly
|
||||
+ file_read_int(fname, &pid);
|
||||
+ if (pid != 0) {
|
||||
+ DEBUG("Process exit and isulad-shim exit");
|
||||
+ return pid;
|
||||
+ }
|
||||
ERROR("failed read pid from dead shim %s", workdir);
|
||||
return -1;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
From bd18051dade97d4f75346cb67beea551a38ca13e Mon Sep 17 00:00:00 2001
|
||||
From: zhongtao <zhongtao17@huawei.com>
|
||||
Date: Tue, 23 Apr 2024 20:52:04 +0800
|
||||
Subject: [PATCH 75/75] bugfix for setting cpu-rt to a negative value when env
|
||||
not supports cpu-rt
|
||||
|
||||
Signed-off-by: zhongtao <zhongtao17@huawei.com>
|
||||
---
|
||||
src/daemon/modules/spec/verify.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/modules/spec/verify.c b/src/daemon/modules/spec/verify.c
|
||||
index 617b7f23..57e16ef9 100644
|
||||
--- a/src/daemon/modules/spec/verify.c
|
||||
+++ b/src/daemon/modules/spec/verify.c
|
||||
@@ -381,14 +381,14 @@ static int verify_cpu_realtime(const sysinfo_t *sysinfo, int64_t realtime_period
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
- if (realtime_period > 0 && !(sysinfo->cgcpuinfo.cpu_rt_period)) {
|
||||
+ if (realtime_period != 0 && !(sysinfo->cgcpuinfo.cpu_rt_period)) {
|
||||
ERROR("Invalid --cpu-rt-period: Your kernel does not support cgroup rt period");
|
||||
isulad_set_error_message("Invalid --cpu-rt-period: Your kernel does not support cgroup rt period");
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (realtime_runtime > 0 && !(sysinfo->cgcpuinfo.cpu_rt_runtime)) {
|
||||
+ if (realtime_runtime != 0 && !(sysinfo->cgcpuinfo.cpu_rt_runtime)) {
|
||||
ERROR("Invalid --cpu-rt-runtime: Your kernel does not support cgroup rt runtime");
|
||||
isulad_set_error_message("Invalid --cpu-rt-period: Your kernel does not support cgroup rt runtime");
|
||||
ret = -1;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
10
iSulad.spec
10
iSulad.spec
@ -1,5 +1,5 @@
|
||||
%global _version 2.1.5
|
||||
%global _release 6
|
||||
%global _release 7
|
||||
%global is_systemd 1
|
||||
%global enable_criv1 1
|
||||
%global enable_cdi 1
|
||||
@ -89,6 +89,8 @@ Patch0070: 0070-isolate-sandboxer-code-by-using-macro.patch
|
||||
Patch0071: 0071-Remove-sandboxer-ut-if-sandboxer-is-not-enabled.patch
|
||||
Patch0072: 0072-cdi-design-doc.patch
|
||||
Patch0073: 0073-bugfix-cdi-version-check.patch
|
||||
Patch0074: 0074-bugfix-of-background-execution-exec-error-command.patch
|
||||
Patch0075: 0075-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch
|
||||
|
||||
%ifarch x86_64 aarch64
|
||||
Provides: libhttpclient.so()(64bit)
|
||||
@ -345,6 +347,12 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Apr 25 2024 zhongtao <zhongtao17@huawei.com> - 2.1.5-7
|
||||
- Type: update
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: bugfix of background execution exec error command and setting negative cpu-rt issue
|
||||
|
||||
* Sat Apr 20 2024 liuxu <liuxu156@huawei.com> - 2.1.5-6
|
||||
- Type: update
|
||||
- ID: NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user