diff --git a/0214-skip-test-rely-on-docker.io.patch b/0214-skip-test-rely-on-docker.io.patch new file mode 100644 index 0000000000000000000000000000000000000000..e1e1f96019c9769b227708e037c3174f2705820b --- /dev/null +++ b/0214-skip-test-rely-on-docker.io.patch @@ -0,0 +1,57 @@ +From de06ee3e09f816bb17315289c696601af8fed4b8 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 11 Jun 2024 17:14:58 +0800 +Subject: [PATCH 214/226] skip test rely on docker.io + +Signed-off-by: zhongtao +--- + CI/test_cases/container_cases/test_data/daemon.json | 2 +- + CI/test_cases/image_cases/integration_check.sh | 2 +- + CI/test_cases/image_cases/registry.sh | 5 +++-- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/CI/test_cases/container_cases/test_data/daemon.json b/CI/test_cases/container_cases/test_data/daemon.json +index 2664c6b2..ab7d0360 100644 +--- a/CI/test_cases/container_cases/test_data/daemon.json ++++ b/CI/test_cases/container_cases/test_data/daemon.json +@@ -24,7 +24,7 @@ + "overlay2.override_kernel_check=true" + ], + "registry-mirrors": [ +- "docker.io" ++ "https://3laho3y3.mirror.aliyuncs.com" + ], + "insecure-registries": [ + ], +diff --git a/CI/test_cases/image_cases/integration_check.sh b/CI/test_cases/image_cases/integration_check.sh +index e43369e3..52468760 100755 +--- a/CI/test_cases/image_cases/integration_check.sh ++++ b/CI/test_cases/image_cases/integration_check.sh +@@ -27,7 +27,7 @@ image="busybox" + function test_image_info() + { + local ret=0 +- local uimage="docker.io/library/nats" ++ local uimage="nats" + local test="list && inspect image info test => (${FUNCNAME[@]})" + local lid + local cid +diff --git a/CI/test_cases/image_cases/registry.sh b/CI/test_cases/image_cases/registry.sh +index 9ef22377..3db3f2c1 100755 +--- a/CI/test_cases/image_cases/registry.sh ++++ b/CI/test_cases/image_cases/registry.sh +@@ -77,8 +77,9 @@ function isula_pull() + isula pull hub.c.163.com/public/centos:6.7-tools + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull hub.c.163.com/public/centos:6.7-tools failed" && ((ret++)) + +- isula pull docker.io/library/busybox:latest +- [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull docker.io/library/busybox:latest failed" && ((ret++)) ++ # Unable to pull image from docker.io without agent, skip this test ++ # isula pull docker.io/library/busybox:latest ++ # [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull docker.io/library/busybox:latest failed" && ((ret++)) + + isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox + fn_check_eq "$?" "0" "isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox" +-- +2.33.0 + diff --git a/0215-add-skip-test-rely-on-docker.io.patch b/0215-add-skip-test-rely-on-docker.io.patch new file mode 100644 index 0000000000000000000000000000000000000000..f83c41f0eacb0c6f01dac111ade6945c41b9c8aa --- /dev/null +++ b/0215-add-skip-test-rely-on-docker.io.patch @@ -0,0 +1,45 @@ +From d3268eae02d9277e5ff154434d1bbe7d81bc6d86 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Thu, 13 Jun 2024 09:30:06 +0800 +Subject: [PATCH 215/226] add skip test rely on docker.io + +Signed-off-by: zhongtao +--- + CI/test_cases/image_cases/image_digest.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CI/test_cases/image_cases/image_digest.sh b/CI/test_cases/image_cases/image_digest.sh +index e30f29f0..cc8b0e48 100755 +--- a/CI/test_cases/image_cases/image_digest.sh ++++ b/CI/test_cases/image_cases/image_digest.sh +@@ -25,14 +25,14 @@ source ../helpers.sh + function test_image_with_digest() + { + local ret=0 +- local image="busybox" +- local image2="ubuntu" +- local image_digest="busybox@sha256:5cd3db04b8be5773388576a83177aff4f40a03457a63855f4b9cbe30542b9a43" ++ local image="3laho3y3.mirror.aliyuncs.com/library/busybox" ++ local image2="3laho3y3.mirror.aliyuncs.com/library/ubuntu" ++ local image_digest="3laho3y3.mirror.aliyuncs.com/library/busybox@sha256:62ffc2ed7554e4c6d360bce40bbcf196573dd27c4ce080641a2c59867e732dee" + local test="pull && inspect && tag image with digest test => (${FUNCNAME[@]})" + + msg_info "${test} starting..." + +- isula pull docker.io/library/${image_digest} ++ isula pull ${image_digest} + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to pull image: ${image}" && return ${FAILURE} + + isula tag ${image_digest} ${image}:digest_test +@@ -71,7 +71,7 @@ function test_image_with_digest() + isula inspect -f '{{.image.repo_tags}}' ${image_digest} | grep "${image}:digest_test" + [[ $? -eq 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - image digest delete error: ${image_digest}" && ((ret++)) + +- isula pull docker.io/library/${image2}:latest ++ isula pull ${image2}:latest + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to pull image: ${image2}" && return ${FAILURE} + + digest=$(isula inspect "${image2}:latest" | grep "@sha256" | awk -F"\"" '{print $2}') +-- +2.33.0 + diff --git a/0216-bugfix-for-null-pointer-reference.patch b/0216-bugfix-for-null-pointer-reference.patch new file mode 100644 index 0000000000000000000000000000000000000000..1408e3d6ce304456b801a4dbef7ab3f6c1bd4d7f --- /dev/null +++ b/0216-bugfix-for-null-pointer-reference.patch @@ -0,0 +1,57 @@ +From f79686748aff486ddb17d6044854f899c86fb93e Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 18 Jun 2024 16:02:25 +0800 +Subject: [PATCH 216/226] bugfix for null pointer reference + +Signed-off-by: zhongtao +--- + src/daemon/entry/connect/grpc/grpc_service.cc | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/daemon/entry/connect/grpc/grpc_service.cc b/src/daemon/entry/connect/grpc/grpc_service.cc +index e37117ae..07309235 100644 +--- a/src/daemon/entry/connect/grpc/grpc_service.cc ++++ b/src/daemon/entry/connect/grpc/grpc_service.cc +@@ -94,14 +94,20 @@ public: + { + // Wait for the server to shutdown. Note that some other thread must be + // responsible for shutting down the server for this call to ever return. +- m_server->Wait(); ++ if (m_server != nullptr) { ++ m_server->Wait(); ++ } ++ + m_runtimeRuntimeService.Wait(); + } + + void Shutdown(void) + { +- m_server->Shutdown(); ++ if (m_server != nullptr) { ++ m_server->Shutdown(); ++ } + m_runtimeRuntimeService.Shutdown(); ++ + // Shutdown daemon, this operation should remove socket file. + for (const auto &address : m_socketPath) { + if (address.find(UNIX_SOCKET_PREFIX) == 0) { +@@ -241,10 +247,16 @@ int grpc_server_init(const struct service_arguments *args) + + void grpc_server_wait(void) + { ++ if (g_grpcserver == nullptr) { ++ return; ++ } + g_grpcserver->Wait(); + } + + void grpc_server_shutdown(void) + { ++ if (g_grpcserver == nullptr) { ++ return; ++ } + g_grpcserver->Shutdown(); + } +-- +2.33.0 + diff --git a/0217-move-shutdown-handle-after-init-module.patch b/0217-move-shutdown-handle-after-init-module.patch new file mode 100644 index 0000000000000000000000000000000000000000..1359ad680cdd6f8f0f52c00bd753de114747f091 --- /dev/null +++ b/0217-move-shutdown-handle-after-init-module.patch @@ -0,0 +1,43 @@ +From aeffc88c7cc0f776fadc7fe19b6db71fc99e763a Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Wed, 19 Jun 2024 10:17:02 +0800 +Subject: [PATCH 217/226] move shutdown handle after init module + +Signed-off-by: zhongtao +--- + src/cmd/isulad/main.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/cmd/isulad/main.c b/src/cmd/isulad/main.c +index 58319ad0..7c7421b4 100644 +--- a/src/cmd/isulad/main.c ++++ b/src/cmd/isulad/main.c +@@ -1648,11 +1648,6 @@ static int start_daemon_threads(char **msg) + { + int ret = -1; + +- if (new_shutdown_handler()) { +- *msg = "Create new shutdown handler thread failed"; +- goto out; +- } +- + if (events_module_init(msg) != 0) { + goto out; + } +@@ -1801,6 +1796,13 @@ int main(int argc, char **argv) + goto failure; + } + ++ // after all modules are initialized, enable the shutdown handler to ++ // prevent shutdown handler from cleaning up incompletely initialized modules. ++ if (new_shutdown_handler()) { ++ msg = "Create new shutdown handler thread failed"; ++ goto failure; ++ } ++ + #ifdef ENABLE_PLUGIN + if (start_plugin_manager()) { + msg = "Failed to init plugin_manager"; +-- +2.33.0 + diff --git a/0218-bugfix-for-file-param-verify.patch b/0218-bugfix-for-file-param-verify.patch new file mode 100644 index 0000000000000000000000000000000000000000..ffdd6b593f27f6423b2481c328ee1a9b324192a8 --- /dev/null +++ b/0218-bugfix-for-file-param-verify.patch @@ -0,0 +1,75 @@ +From e9f32090179a188464466d84904bc361cbb94ebc Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Fri, 14 Jun 2024 09:55:28 +0800 +Subject: [PATCH 218/226] bugfix for file param verify + +Signed-off-by: zhongtao +--- + src/cmd/isula/base/create.c | 19 +++++++++++++++++++ + src/cmd/isula/images/load.c | 6 ++++++ + 2 files changed, 25 insertions(+) + +diff --git a/src/cmd/isula/base/create.c b/src/cmd/isula/base/create.c +index 5756e6ad..865be4ed 100644 +--- a/src/cmd/isula/base/create.c ++++ b/src/cmd/isula/base/create.c +@@ -290,6 +290,12 @@ static int append_env_variables_to_conf(const char *env_file, isula_container_co + int ret = 0; + size_t file_size; + ++ if (util_dir_exists(env_file)) { ++ COMMAND_ERROR("Env file is a directory: %s", env_file); ++ ret = -1; ++ goto out; ++ } ++ + if (!util_file_exists(env_file)) { + COMMAND_ERROR("env file not exists: %s", env_file); + ret = -1; +@@ -425,6 +431,12 @@ static int append_labels_to_conf(const char *label_file, isula_container_config_ + int ret = 0; + size_t file_size; + ++ if (util_dir_exists(label_file)) { ++ COMMAND_ERROR("Label file is a directory: %s", label_file); ++ ret = -1; ++ goto out; ++ } ++ + if (!util_file_exists(label_file)) { + COMMAND_ERROR("label file not exists: %s", label_file); + ret = -1; +@@ -2135,6 +2147,13 @@ static int create_check_env_target_file(const struct client_arguments *args) + ret = -1; + goto out; + } ++ ++ if (util_dir_exists(env_path)) { ++ COMMAND_ERROR("Env target file is a directory: %s", env_path); ++ ret = -1; ++ goto out; ++ } ++ + if (!util_file_exists(env_path)) { + goto out; + } +diff --git a/src/cmd/isula/images/load.c b/src/cmd/isula/images/load.c +index 48422438..46e04310 100644 +--- a/src/cmd/isula/images/load.c ++++ b/src/cmd/isula/images/load.c +@@ -162,6 +162,12 @@ int cmd_load_main(int argc, const char **argv) + g_cmd_load_args.file = file; + } + ++ if (util_dir_exists(g_cmd_load_args.file)) { ++ COMMAND_ERROR("Load file is a directory: %s", g_cmd_load_args.file); ++ ret = -1; ++ exit(exit_code); ++ } ++ + if (!util_file_exists(g_cmd_load_args.file)) { + COMMAND_ERROR("File %s is not exist", g_cmd_load_args.file); + exit(exit_code); +-- +2.33.0 + diff --git a/0219-bugfix-of-background-execution-exec-error-command.patch b/0219-bugfix-of-background-execution-exec-error-command.patch new file mode 100644 index 0000000000000000000000000000000000000000..41e3cd8a8c87206f1ba1c0dd20d8beee17f31516 --- /dev/null +++ b/0219-bugfix-of-background-execution-exec-error-command.patch @@ -0,0 +1,33 @@ +From e4aa3e0a14cb428496af37d99f13543cc17a8236 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 23 Apr 2024 17:44:00 +1400 +Subject: [PATCH 219/226] bugfix of background execution exec error command + +Signed-off-by: zhongtao +--- + 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 949bce7a..5ccead58 100644 +--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c ++++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c +@@ -953,6 +953,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.33.0 + diff --git a/0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch b/0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch new file mode 100644 index 0000000000000000000000000000000000000000..655f3153cb404615a34e64016654f987d15288bf --- /dev/null +++ b/0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch @@ -0,0 +1,35 @@ +From 7d066787730856e883a0578c41d723a62c014274 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 23 Apr 2024 20:52:04 +0800 +Subject: [PATCH 220/226] bugfix for setting cpu-rt to a negative value when + env not supports cpu-rt + +Signed-off-by: zhongtao +--- + 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 2f2d3925..1869baea 100644 +--- a/src/daemon/modules/spec/verify.c ++++ b/src/daemon/modules/spec/verify.c +@@ -380,14 +380,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.33.0 + diff --git a/0221-fix-error-log-for-verify_cpu_realtime.patch b/0221-fix-error-log-for-verify_cpu_realtime.patch new file mode 100644 index 0000000000000000000000000000000000000000..9614972707d2d2d9e269d6da31d943009e5ea683 --- /dev/null +++ b/0221-fix-error-log-for-verify_cpu_realtime.patch @@ -0,0 +1,26 @@ +From 5b926bb3b73d2ec85fb7edbac01389076134980a Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 28 May 2024 17:23:45 +1400 +Subject: [PATCH 221/226] fix error log for verify_cpu_realtime + +Signed-off-by: zhongtao +--- + src/daemon/modules/spec/verify.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon/modules/spec/verify.c b/src/daemon/modules/spec/verify.c +index 1869baea..22a6a395 100644 +--- a/src/daemon/modules/spec/verify.c ++++ b/src/daemon/modules/spec/verify.c +@@ -389,7 +389,7 @@ static int verify_cpu_realtime(const sysinfo_t *sysinfo, int64_t realtime_period + + 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"); ++ isulad_set_error_message("Invalid --cpu-rt-runtime: Your kernel does not support cgroup rt runtime"); + ret = -1; + goto out; + } +-- +2.33.0 + diff --git a/0222-code-improve.patch b/0222-code-improve.patch new file mode 100644 index 0000000000000000000000000000000000000000..8d6237f1fb6f6d4a2e8a31a934e03851bf316c29 --- /dev/null +++ b/0222-code-improve.patch @@ -0,0 +1,68 @@ +From 0c547ede4927a01e11c115062d9f314cd66d7ce2 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Thu, 30 May 2024 21:30:43 +1400 +Subject: [PATCH 222/226] code improve + +Signed-off-by: zhongtao +--- + src/cmd/isula/volume/prune.c | 2 +- + src/cmd/options/opt_log.c | 2 +- + src/daemon/executor/container_cb/execution_information.c | 2 +- + src/daemon/modules/image/oci/registry_type.c | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/cmd/isula/volume/prune.c b/src/cmd/isula/volume/prune.c +index c8d632ed..3b5bfbf1 100644 +--- a/src/cmd/isula/volume/prune.c ++++ b/src/cmd/isula/volume/prune.c +@@ -79,7 +79,7 @@ out: + + int cmd_volume_prune_main(int argc, const char **argv) + { +- int i = 0; ++ size_t i = 0; + struct isula_libutils_log_config lconf = { 0 }; + int exit_code = 1; + command_t cmd; +diff --git a/src/cmd/options/opt_log.c b/src/cmd/options/opt_log.c +index b1abcfaf..8ffb9966 100644 +--- a/src/cmd/options/opt_log.c ++++ b/src/cmd/options/opt_log.c +@@ -67,7 +67,7 @@ static int log_opt_syslog_facility(const char *key, const char *value, char **pa + "authpriv", "ftp", "local0", "local1", "local2", + "local3", "local4", "local5", "local6", "local7" + }; +- int i; ++ size_t i; + size_t f_len = sizeof(facility_values) / sizeof(const char *); + + for (i = 0; i < f_len; i++) { +diff --git a/src/daemon/executor/container_cb/execution_information.c b/src/daemon/executor/container_cb/execution_information.c +index 6489797d..217741fa 100644 +--- a/src/daemon/executor/container_cb/execution_information.c ++++ b/src/daemon/executor/container_cb/execution_information.c +@@ -249,7 +249,7 @@ static int get_proxy_env(char **proxy, const char *type) + } + *col_pos = '\0'; + nret = snprintf(*proxy, proxy_len, "%s:%s%s", tmp_proxy, mask_str, at_pos); +- if (nret < 0 || nret >= proxy_len) { ++ if (nret < 0 || (size_t)nret >= proxy_len) { + ret = -1; + free(*proxy); + *proxy = NULL; +diff --git a/src/daemon/modules/image/oci/registry_type.c b/src/daemon/modules/image/oci/registry_type.c +index 4556617f..206c58b0 100644 +--- a/src/daemon/modules/image/oci/registry_type.c ++++ b/src/daemon/modules/image/oci/registry_type.c +@@ -62,7 +62,7 @@ void free_layer_blob(layer_blob *layer) + + void free_pull_desc(pull_descriptor *desc) + { +- int i = 0; ++ size_t i = 0; + + if (desc == NULL) { + return; +-- +2.33.0 + diff --git a/0223-fix-bug-in-ci-test.patch b/0223-fix-bug-in-ci-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..b9859db04fafa00e427691821a1af426dcc8bbaa --- /dev/null +++ b/0223-fix-bug-in-ci-test.patch @@ -0,0 +1,53 @@ +From a4d1281ccc40dfc51b313d69f800049e99510600 Mon Sep 17 00:00:00 2001 +From: jikai +Date: Tue, 9 Jul 2024 12:31:49 +0000 +Subject: [PATCH 223/226] fix bug in ci test + +Signed-off-by: jikai +--- + CI/test_cases/container_cases/run.sh | 5 ++--- + CI/test_cases/helpers.sh | 5 +++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CI/test_cases/container_cases/run.sh b/CI/test_cases/container_cases/run.sh +index 80485457..3f1607fa 100755 +--- a/CI/test_cases/container_cases/run.sh ++++ b/CI/test_cases/container_cases/run.sh +@@ -28,9 +28,8 @@ function do_test_t() + containername=test_basic_run + + tid=$(isula run --name $containername -td busybox) +- hostname=$(isula exec -it $containername hostname) +- clean_hostname=$(echo "$hostname" | sed 's/[\x01-\x1F\x7F]//g') +- fn_check_eq "${clean_hostname}" "${tid:0:12}" "default hostname is not id of container" ++ hostname=$(isula exec $containername hostname) ++ fn_check_eq "${hostname}" "${tid:0:12}" "default hostname is not id of container" + isula exec -it $containername env | grep HOSTNAME + fn_check_eq "$?" "0" "check HOSTNAME env failed" + isula stop -t 0 $tid +diff --git a/CI/test_cases/helpers.sh b/CI/test_cases/helpers.sh +index f7bb7c93..3ad024b9 100755 +--- a/CI/test_cases/helpers.sh ++++ b/CI/test_cases/helpers.sh +@@ -46,15 +46,16 @@ function cut_output_lines() { + return $retval + } + ++# use string compare to check the result + function fn_check_eq() { +- if [[ "$1" -ne "$2" ]];then ++ if [[ "x$1" != "x$2" ]];then + echo "$3" + TC_RET_T=$(($TC_RET_T+1)) + fi + } + + function fn_check_ne() { +- if [[ "$1" -eq "$2" ]];then ++ if [[ "x$1" = "x$2" ]];then + echo "$3" + TC_RET_T=$(($TC_RET_T+1)) + fi +-- +2.33.0 + diff --git a/0224-change-pull-registry-to-hub.oepkgs.net.patch b/0224-change-pull-registry-to-hub.oepkgs.net.patch new file mode 100644 index 0000000000000000000000000000000000000000..c1e076f61b75aaa39f83ea217fc456c6e5f5602c --- /dev/null +++ b/0224-change-pull-registry-to-hub.oepkgs.net.patch @@ -0,0 +1,123 @@ +From 118f068e0709c1975881d45c60615b68b9328a19 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Fri, 6 Sep 2024 17:45:58 +0800 +Subject: [PATCH 224/226] change pull registry to hub.oepkgs.net + +Signed-off-by: zhongtao +--- + CI/make-and-install.sh | 4 ++-- + .../container_cases/test_data/daemon.json | 2 +- + CI/test_cases/image_cases/image_digest.sh | 6 ++--- + CI/test_cases/image_cases/registry.sh | 22 +++++++++---------- + 4 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/CI/make-and-install.sh b/CI/make-and-install.sh +index 819f2752..73e6e3ff 100755 +--- a/CI/make-and-install.sh ++++ b/CI/make-and-install.sh +@@ -98,7 +98,7 @@ cmake -DLIB_INSTALL_DIR=${restbuilddir}/lib -DCMAKE_INSTALL_PREFIX=${restbuilddi + make -j $(nproc) + make install + sed -i 's/"log-driver": "stdout"/"log-driver": "file"/g' ${restbuilddir}/etc/isulad/daemon.json +-sed -i "/registry-mirrors/a\ \"https://3laho3y3.mirror.aliyuncs.com\"" ${restbuilddir}/etc/isulad/daemon.json ++sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\"" ${restbuilddir}/etc/isulad/daemon.json + + #build grpc version + cd $ISULAD_COPY_PATH +@@ -113,4 +113,4 @@ fi + make -j $(nproc) + make install + sed -i 's/"log-driver": "stdout"/"log-driver": "file"/g' ${builddir}/etc/isulad/daemon.json +-sed -i "/registry-mirrors/a\ \"https://3laho3y3.mirror.aliyuncs.com\"" ${builddir}/etc/isulad/daemon.json ++sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\"" ${builddir}/etc/isulad/daemon.json +diff --git a/CI/test_cases/container_cases/test_data/daemon.json b/CI/test_cases/container_cases/test_data/daemon.json +index ab7d0360..20b001c0 100644 +--- a/CI/test_cases/container_cases/test_data/daemon.json ++++ b/CI/test_cases/container_cases/test_data/daemon.json +@@ -24,7 +24,7 @@ + "overlay2.override_kernel_check=true" + ], + "registry-mirrors": [ +- "https://3laho3y3.mirror.aliyuncs.com" ++ "https://hub.oepkgs.net" + ], + "insecure-registries": [ + ], +diff --git a/CI/test_cases/image_cases/image_digest.sh b/CI/test_cases/image_cases/image_digest.sh +index cc8b0e48..20774e07 100755 +--- a/CI/test_cases/image_cases/image_digest.sh ++++ b/CI/test_cases/image_cases/image_digest.sh +@@ -25,9 +25,9 @@ source ../helpers.sh + function test_image_with_digest() + { + local ret=0 +- local image="3laho3y3.mirror.aliyuncs.com/library/busybox" +- local image2="3laho3y3.mirror.aliyuncs.com/library/ubuntu" +- local image_digest="3laho3y3.mirror.aliyuncs.com/library/busybox@sha256:62ffc2ed7554e4c6d360bce40bbcf196573dd27c4ce080641a2c59867e732dee" ++ local image="hub.oepkgs.net/library/busybox" ++ local image2="hub.oepkgs.net/library/ubuntu" ++ local image_digest="hub.oepkgs.net/library/busybox@sha256:6066ca124f8c2686b7ae71aa1d6583b28c6dc3df3bdc386f2c89b92162c597d9" + local test="pull && inspect && tag image with digest test => (${FUNCNAME[@]})" + + msg_info "${test} starting..." +diff --git a/CI/test_cases/image_cases/registry.sh b/CI/test_cases/image_cases/registry.sh +index 3db3f2c1..ad3276fe 100755 +--- a/CI/test_cases/image_cases/registry.sh ++++ b/CI/test_cases/image_cases/registry.sh +@@ -81,8 +81,8 @@ function isula_pull() + # isula pull docker.io/library/busybox:latest + # [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull docker.io/library/busybox:latest failed" && ((ret++)) + +- isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox +- fn_check_eq "$?" "0" "isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox" ++ isula pull hub.oepkgs.net/library/busybox ++ fn_check_eq "$?" "0" "isula pull hub.oepkgs.net/library/busybox" + + rm -f /etc/isulad/daemon.json.bak + cp /etc/isulad/daemon.json /etc/isulad/daemon.json.bak +@@ -101,7 +101,7 @@ function isula_pull() + cp /etc/isulad/daemon.json.bak /etc/isulad/daemon.json + rm -f /etc/isulad/daemon.json.bak + +- isula rmi 3laho3y3.mirror.aliyuncs.com/library/busybox ++ isula rmi hub.oepkgs.net/library/busybox + + check_valgrind_log + fn_check_eq "$?" "0" "stop isulad with check valgrind" +@@ -112,12 +112,12 @@ function isula_pull() + + function isula_login() + { +- isula login -u test -p test 3laho3y3.mirror.aliyuncs.com +- fn_check_eq "$?" "0" "isula login -u test -p test 3laho3y3.mirror.aliyuncs.com" ++ isula login -u isulaci -p iSula123 hub.oepkgs.net ++ fn_check_eq "$?" "0" "isula login -u isulaci -p iSula123 hub.oepkgs.net" + + # double login for memory leak check +- isula login -u test -p test 3laho3y3.mirror.aliyuncs.com +- fn_check_eq "$?" "0" "isula login -u test -p test 3laho3y3.mirror.aliyuncs.com" ++ isula login -u isulaci -p iSula123 hub.oepkgs.net ++ fn_check_eq "$?" "0" "isula login -u isulaci -p iSula123 hub.oepkgs.net" + + # use username/password to pull busybox for memmory leak check + isula pull busybox +@@ -126,12 +126,12 @@ function isula_login() + + function isula_logout() + { +- isula logout 3laho3y3.mirror.aliyuncs.com +- fn_check_eq "$?" "0" "isula logout 3laho3y3.mirror.aliyuncs.com" ++ isula logout hub.oepkgs.net ++ fn_check_eq "$?" "0" "isula logout hub.oepkgs.net" + + # double logout for memory leak check +- isula logout 3laho3y3.mirror.aliyuncs.com +- fn_check_eq "$?" "0" "isula logout 3laho3y3.mirror.aliyuncs.com" ++ isula logout hub.oepkgs.net ++ fn_check_eq "$?" "0" "isula logout hub.oepkgs.net" + } + + function do_test_t() +-- +2.33.0 + diff --git a/0225-Synchronize-changes-from-the-master-branch-to-the-st.patch b/0225-Synchronize-changes-from-the-master-branch-to-the-st.patch new file mode 100644 index 0000000000000000000000000000000000000000..97557adce45350d40966c42783c0611c23b9a85d --- /dev/null +++ b/0225-Synchronize-changes-from-the-master-branch-to-the-st.patch @@ -0,0 +1,138 @@ +From a26602e9bf7fb8de4f0ed0b4b706fdfeebf706bb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= +Date: Wed, 18 Sep 2024 10:39:43 +0800 +Subject: [PATCH 225/226] Synchronize changes from the master branch to the + stable branch. + +--- + CI/test_cases/container_cases/exec_additional_gids.sh | 3 ++- + CI/test_cases/container_cases/exec_runc.sh | 2 +- + CI/test_cases/image_cases/image_digest.sh | 2 +- + CI/test_cases/image_cases/image_tag.sh | 2 +- + CI/test_cases/image_cases/images_list.sh | 2 +- + CI/test_cases/image_cases/integration_check.sh | 4 ++-- + CI/test_cases/manual_cases/security_selinux.sh | 6 +++--- + 7 files changed, 11 insertions(+), 10 deletions(-) + +diff --git a/CI/test_cases/container_cases/exec_additional_gids.sh b/CI/test_cases/container_cases/exec_additional_gids.sh +index f24678d3..82297902 100755 +--- a/CI/test_cases/container_cases/exec_additional_gids.sh ++++ b/CI/test_cases/container_cases/exec_additional_gids.sh +@@ -26,7 +26,8 @@ test="exec additional gids test => test_exec_additional_gids" + test_log=$(mktemp /tmp/additional_gids_test_XXX) + + USERNAME="user" +-USER_UID="1000" ++# Do not use 1000 as the test gid because "ubuntu:x:1000:" already exists in the ubuntu image ++USER_UID="1002" + USER_GID="$USER_UID" + ADDITIONAL_GID="1001" + ADDITIONAL_GROUP="additional" +diff --git a/CI/test_cases/container_cases/exec_runc.sh b/CI/test_cases/container_cases/exec_runc.sh +index f963724e..16dfaef6 100755 +--- a/CI/test_cases/container_cases/exec_runc.sh ++++ b/CI/test_cases/container_cases/exec_runc.sh +@@ -26,7 +26,7 @@ test="exec_runc_test => (${FUNCNAME[@]})" + function exec_runc_test() + { + local ret=0 +- local image="ubuntu" ++ local image="isulad/ubuntu" + local container_name="test_busybox" + + isula pull ${image} +diff --git a/CI/test_cases/image_cases/image_digest.sh b/CI/test_cases/image_cases/image_digest.sh +index 20774e07..5036239a 100755 +--- a/CI/test_cases/image_cases/image_digest.sh ++++ b/CI/test_cases/image_cases/image_digest.sh +@@ -26,7 +26,7 @@ function test_image_with_digest() + { + local ret=0 + local image="hub.oepkgs.net/library/busybox" +- local image2="hub.oepkgs.net/library/ubuntu" ++ local image2="isulad/ubuntu" + local image_digest="hub.oepkgs.net/library/busybox@sha256:6066ca124f8c2686b7ae71aa1d6583b28c6dc3df3bdc386f2c89b92162c597d9" + local test="pull && inspect && tag image with digest test => (${FUNCNAME[@]})" + +diff --git a/CI/test_cases/image_cases/image_tag.sh b/CI/test_cases/image_cases/image_tag.sh +index 551d8249..0b8dd3e8 100755 +--- a/CI/test_cases/image_cases/image_tag.sh ++++ b/CI/test_cases/image_cases/image_tag.sh +@@ -23,7 +23,7 @@ declare -r curr_path=$(dirname $(readlink -f "$0")) + source ../helpers.sh + + image_busybox="busybox" +-image_hello="hello-world" ++image_hello="isulad/hello-world" + + function test_tag_image() + { +diff --git a/CI/test_cases/image_cases/images_list.sh b/CI/test_cases/image_cases/images_list.sh +index 56cde5b6..a192a75c 100755 +--- a/CI/test_cases/image_cases/images_list.sh ++++ b/CI/test_cases/image_cases/images_list.sh +@@ -25,7 +25,7 @@ source ../helpers.sh + function test_image_list() + { + local ret=0 +- local image="hello-world" ++ local image="isulad/hello-world" + local image_busybox="busybox" + local INVALID_IMAGE="k~k" + local test="list images info test => (${FUNCNAME[@]})" +diff --git a/CI/test_cases/image_cases/integration_check.sh b/CI/test_cases/image_cases/integration_check.sh +index 52468760..463da17f 100755 +--- a/CI/test_cases/image_cases/integration_check.sh ++++ b/CI/test_cases/image_cases/integration_check.sh +@@ -27,7 +27,7 @@ image="busybox" + function test_image_info() + { + local ret=0 +- local uimage="nats" ++ local uimage="isulad/nats" + local test="list && inspect image info test => (${FUNCNAME[@]})" + local lid + local cid +@@ -55,7 +55,7 @@ function test_image_info() + ucid=$(isula create ${uimage}) + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - create container failed" && ((ret++)) + +- isula run -tid --name checker alpine ++ isula run -tid --name checker isulad/alpine + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - run container failed" && ((ret++)) + + tmp_fname=$(echo -n "/var/run/isulad/storage" | sha256sum | awk '{print $1}') +diff --git a/CI/test_cases/manual_cases/security_selinux.sh b/CI/test_cases/manual_cases/security_selinux.sh +index c558befe..cf94c809 100755 +--- a/CI/test_cases/manual_cases/security_selinux.sh ++++ b/CI/test_cases/manual_cases/security_selinux.sh +@@ -87,7 +87,7 @@ function daemon_disable_selinux() + function test_isulad_selinux_file_label() + { + local ret=0 +- local image="centos" ++ local image="isulad/centos" + local test="isulad selinux file label test => (${FUNCNAME[@]})" + + msg_info "${test} starting..." +@@ -144,7 +144,7 @@ function test_isulad_selinux_file_label() + function test_isulad_selinux_process_label() + { + local ret=0 +- local image="centos" ++ local image="isulad/centos" + local test="isulad selinux process label test => (${FUNCNAME[@]})" + + msg_info "${test} starting..." +@@ -172,7 +172,7 @@ function test_isulad_selinux_process_label() + function test_isulad_selinux_mount_mode() + { + local ret=0 +- local image="centos" ++ local image="isulad/centos" + local test="isulad selinux mount mode test => (${FUNCNAME[@]})" + + msg_info "${test} starting..." +-- +2.33.0 + diff --git a/0226-fix-synchronize-changes-from-the-master-branch-to-th.patch b/0226-fix-synchronize-changes-from-the-master-branch-to-th.patch new file mode 100644 index 0000000000000000000000000000000000000000..8c5e8b7a9c4802470cce7582ec4d66c18d66a3f4 --- /dev/null +++ b/0226-fix-synchronize-changes-from-the-master-branch-to-th.patch @@ -0,0 +1,26 @@ +From d5b3144d8552be9eda266ab412c6fefcefcadb66 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= +Date: Thu, 19 Sep 2024 10:05:31 +0800 +Subject: [PATCH 226/226] fix :synchronize changes from the master branch to + the stable branch. + +--- + CI/test_cases/container_cases/exec_additional_gids.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CI/test_cases/container_cases/exec_additional_gids.sh b/CI/test_cases/container_cases/exec_additional_gids.sh +index 82297902..56afbfce 100755 +--- a/CI/test_cases/container_cases/exec_additional_gids.sh ++++ b/CI/test_cases/container_cases/exec_additional_gids.sh +@@ -41,7 +41,7 @@ function additional_gids_test() + + isula rm -f `isula ps -a -q` + +- isula run -tid -n $cont_name ubuntu bash ++ isula run -tid -n $cont_name isulad/ubuntu bash + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to run container" && ((ret++)) + + isula exec $cont_name bash -c "groupadd --gid $USER_GID $USERNAME \ +-- +2.33.0 + diff --git a/iSulad.spec b/iSulad.spec index d08c5b31eaf8f257a50df1da7cd720e295b41e9a..d8c7188221e26dcecc9682ad4a459ff776aa74d9 100644 --- a/iSulad.spec +++ b/iSulad.spec @@ -1,5 +1,5 @@ %global _version 2.0.18 -%global _release 18 +%global _release 19 %global is_systemd 1 %global enable_shimv2 1 %global is_embedded 1 @@ -226,6 +226,19 @@ Patch0210: 0210-allow-env-variable-has-an-empty-value.patch Patch0211: 0211-bugfix-for-hostname-env-set-only-once.patch Patch0212: 0212-fix-bug-for-invalid-env-write.patch Patch0213: 0213-change-fork-process-exit-mode.patch +Patch0214: 0214-skip-test-rely-on-docker.io.patch +Patch0215: 0215-add-skip-test-rely-on-docker.io.patch +Patch0216: 0216-bugfix-for-null-pointer-reference.patch +Patch0217: 0217-move-shutdown-handle-after-init-module.patch +Patch0218: 0218-bugfix-for-file-param-verify.patch +Patch0219: 0219-bugfix-of-background-execution-exec-error-command.patch +Patch0220: 0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch +Patch0221: 0221-fix-error-log-for-verify_cpu_realtime.patch +Patch0222: 0222-code-improve.patch +Patch0223: 0223-fix-bug-in-ci-test.patch +Patch0224: 0224-change-pull-registry-to-hub.oepkgs.net.patch +Patch0225: 0225-Synchronize-changes-from-the-master-branch-to-the-st.patch +Patch0226: 0226-fix-synchronize-changes-from-the-master-branch-to-th.patch %ifarch x86_64 aarch64 Provides: libhttpclient.so()(64bit) @@ -470,6 +483,12 @@ fi %endif %changelog +* Fri Oct 18 2024 wujichao - 2.0.18-19 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: upgrade from upstream + * Tue Jun 11 2024 zhongtao - 2.0.18-18 - Type: bugfix - ID: NA