代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/iSulad 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 8e11a1eea62cb8061f1613379ff83bd9a721fa50 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Wed, 31 Jan 2024 18:10:46 +0800
Subject: [PATCH 31/43] cgroup v2 does not support isulad setting cpu_rt
options
Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
src/cmd/isulad/isulad_commands.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/src/cmd/isulad/isulad_commands.c b/src/cmd/isulad/isulad_commands.c
index 5fb55689..619e36d1 100644
--- a/src/cmd/isulad/isulad_commands.c
+++ b/src/cmd/isulad/isulad_commands.c
@@ -34,6 +34,7 @@
#include "utils_verify.h"
#include "opt_ulimit.h"
#include "opt_log.h"
+#include "sysinfo.h"
const char isulad_desc[] = "GLOBAL OPTIONS:";
const char isulad_usage[] = "[global options]";
@@ -411,6 +412,33 @@ out:
return ret;
}
+static int check_args_cpu_rt(const struct service_arguments *args)
+{
+ int ret = 0;
+ __isula_auto_sysinfo_t sysinfo_t *sysinfo = NULL;
+
+ sysinfo = get_sys_info(true);
+ if (sysinfo == NULL) {
+ COMMAND_ERROR("Failed to get system info");
+ ERROR("Failed to get system info");
+ return -1;
+ }
+
+ if (!(sysinfo->cgcpuinfo.cpu_rt_period) && args->json_confs->cpu_rt_period != 0) {
+ COMMAND_ERROR("Invalid --cpu-rt-period: Your kernel does not support cgroup rt period");
+ ERROR("Invalid --cpu-rt-period: Your kernel does not support cgroup rt period");
+ return -1;
+ }
+
+ if (!(sysinfo->cgcpuinfo.cpu_rt_runtime) && args->json_confs->cpu_rt_runtime != 0) {
+ COMMAND_ERROR("Invalid --cpu-rt-runtime: Your kernel does not support cgroup rt runtime");
+ ERROR("Invalid --cpu-rt-runtime: Your kernel does not support cgroup rt runtime");
+ return -1;
+ }
+
+ return ret;
+}
+
int check_args(struct service_arguments *args)
{
int ret = 0;
@@ -471,6 +499,10 @@ int check_args(struct service_arguments *args)
goto out;
}
+ if (check_args_cpu_rt(args) != 0) {
+ ret = -1;
+ goto out;
+ }
out:
return ret;
}
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。