From 44b868516806ee23ec1610b9da700c0198770818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= Date: Mon, 21 Oct 2024 20:19:52 +0800 Subject: [PATCH] combine ten similar submissions into one(0125-fix-clang-build-error.patch) and Upgrade from upstream --- 0117-add-nri-design-doc.patch | 502 ++++++++++++++++++ ...RI-add-nri-head-file-and-common-func.patch | 0 ...-plugin-cleanup-when-network-namespa.patch | 0 ...i-add-convert-and-utils-impl-for-nri.patch | 0 ...th-before-ns-mountpoint-verification.patch | 0 ...nri-impl-for-nri-plugin-and-adaption.patch | 0 0123-code-improve-for-codecheck.patch | 287 ++++++++++ ...ange-pull-registry-to-hub.oepkgs.net.patch | 137 +++++ 0125-fix-clang-build-error.patch | 216 ++++++++ ...-registry-to-prevent-missing-mirrors.patch | 25 + ...e-digest-ci-test-for-registry-change.patch | 47 ++ ...bugfix-for-ci-make-and-install-shell.patch | 26 + ...as-the-test-gid-to-prevent-conflicts.patch | 28 + ...-the-openeuler-mirror-registry-in-ci.patch | 224 ++++++++ ...alpine-image-source-to-isulad-alpine.patch | 25 + 0132-update-docs-design-README_zh.md.patch | 26 + ...e-image-name-isulad-ubuntu-to-ubuntu.patch | 34 ++ ...r-failed-errmsg-when-kill-and-delete.patch | 116 ++++ 0135-followlocation-only-not-with-head.patch | 28 + ...gn-detailed-Image-image_storage_driv.patch | 28 + ...ompilation-script-install_iSulad_on_.patch | 77 +++ ...ix-for-log-in-make_safedir_is_noexec.patch | 26 + ...aused-state-are-not-allowed-to-start.patch | 29 + 0140-remove-meaningless-code.patch | 38 ++ 0141-fix-unqualified-call-to-std-move.patch | 25 + iSulad.spec | 38 +- 26 files changed, 1976 insertions(+), 6 deletions(-) create mode 100644 0117-add-nri-design-doc.patch rename 0117-NRI-add-nri-head-file-and-common-func.patch => 0118-NRI-add-nri-head-file-and-common-func.patch (100%) rename 0118-skip-calling-cni-plugin-cleanup-when-network-namespa.patch => 0119-skip-calling-cni-plugin-cleanup-when-network-namespa.patch (100%) rename 0119-nri-add-convert-and-utils-impl-for-nri.patch => 0120-nri-add-convert-and-utils-impl-for-nri.patch (100%) rename 0120-get-realpath-before-ns-mountpoint-verification.patch => 0121-get-realpath-before-ns-mountpoint-verification.patch (100%) rename 0121-nri-impl-for-nri-plugin-and-adaption.patch => 0122-nri-impl-for-nri-plugin-and-adaption.patch (100%) create mode 100644 0123-code-improve-for-codecheck.patch create mode 100644 0124-change-pull-registry-to-hub.oepkgs.net.patch create mode 100644 0125-fix-clang-build-error.patch create mode 100644 0126-add-a-new-registry-to-prevent-missing-mirrors.patch create mode 100644 0127-change-image-digest-ci-test-for-registry-change.patch create mode 100644 0128-bugfix-for-ci-make-and-install-shell.patch create mode 100644 0129-do-not-use-1000-as-the-test-gid-to-prevent-conflicts.patch create mode 100644 0130-only-use-the-openeuler-mirror-registry-in-ci.patch create mode 100644 0131-modify-alpine-image-source-to-isulad-alpine.patch create mode 100644 0132-update-docs-design-README_zh.md.patch create mode 100644 0133-modify-the-image-name-isulad-ubuntu-to-ubuntu.patch create mode 100644 0134-ignore-chdir-failed-errmsg-when-kill-and-delete.patch create mode 100644 0135-followlocation-only-not-with-head.patch create mode 100644 0136-update-docs-design-detailed-Image-image_storage_driv.patch create mode 100644 0137-upgrade-isulad-compilation-script-install_iSulad_on_.patch create mode 100644 0138-bugfix-for-log-in-make_safedir_is_noexec.patch create mode 100644 0139-containers-in-paused-state-are-not-allowed-to-start.patch create mode 100644 0140-remove-meaningless-code.patch create mode 100644 0141-fix-unqualified-call-to-std-move.patch diff --git a/0117-add-nri-design-doc.patch b/0117-add-nri-design-doc.patch new file mode 100644 index 0000000..276caba --- /dev/null +++ b/0117-add-nri-design-doc.patch @@ -0,0 +1,502 @@ +From 0b55502b6e104df2cb34bbe176d3168456f0b024 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Wed, 6 Mar 2024 11:00:04 +0800 +Subject: [PATCH 117/149] add nri design doc + +Signed-off-by: zhongtao +--- + .../detailed/NRI/nri_CreateContainer.svg | 16 + + .../design/detailed/NRI/nri_RunPodSandbox.svg | 16 + + docs/design/detailed/NRI/nri_design.md | 382 ++++++++++++++++++ + docs/design/detailed/NRI/nri_detail.svg | 16 + + docs/design/detailed/NRI/nri_init.svg | 16 + + 5 files changed, 446 insertions(+) + create mode 100644 docs/design/detailed/NRI/nri_CreateContainer.svg + create mode 100644 docs/design/detailed/NRI/nri_RunPodSandbox.svg + create mode 100644 docs/design/detailed/NRI/nri_design.md + create mode 100644 docs/design/detailed/NRI/nri_detail.svg + create mode 100644 docs/design/detailed/NRI/nri_init.svg + +diff --git a/docs/design/detailed/NRI/nri_CreateContainer.svg b/docs/design/detailed/NRI/nri_CreateContainer.svg +new file mode 100644 +index 00000000..3c10bf93 +--- /dev/null ++++ b/docs/design/detailed/NRI/nri_CreateContainer.svg +@@ -0,0 +1,16 @@ ++ ++ ++ ++ ++ ++ ++ CRICreateContainerCRI moduleCRI sandbox and container infoNRI convertNRI sandbox and container infocall CreateContainer for all manager pluginpluginCreateContainerRequestnri pluginCreateContainerResponseNRI Adaptionupdate containerCRI sandbox and container infomerged adjust container inforesponsenri resultall plugin responsemerged adjust container infocreate excutorreq->adjustadjust container infoadjust oci spec +\ No newline at end of file +diff --git a/docs/design/detailed/NRI/nri_RunPodSandbox.svg b/docs/design/detailed/NRI/nri_RunPodSandbox.svg +new file mode 100644 +index 00000000..c7b96968 +--- /dev/null ++++ b/docs/design/detailed/NRI/nri_RunPodSandbox.svg +@@ -0,0 +1,16 @@ ++ ++ ++ ++ ++ ++ ++ CRIRunPodSandboxCRI moduleCRI sandbox infoNRI convertnri sandbox infoNRI Adaptioncall RUN_POD_SANDBOXStateChange for all manager pluginpluginnri pluginisula-rust-extensions-plugin clientCRI sandbox info +\ No newline at end of file +diff --git a/docs/design/detailed/NRI/nri_design.md b/docs/design/detailed/NRI/nri_design.md +new file mode 100644 +index 00000000..1f68df5d +--- /dev/null ++++ b/docs/design/detailed/NRI/nri_design.md +@@ -0,0 +1,382 @@ ++| Author | zhongtao | ++| ------ | --------------------- | ++| Date | 2024-07-21 | ++| Email | zhongtao17@huawei.com | ++# 方案目标 ++## NRI介绍 ++ ++[NRI](https://github.com/containerd/nri) (Node Resource Interface), 是用于控制节点资源的公共接口, 是CRI兼容的容器运行时插件扩展的通用框架。它为扩展插件提供了跟踪容器状态,并对其配置进行有限修改的基本机制。允许将用户某些自定的逻辑插入到OCI兼容的运行时中,此逻辑可以对容器进行受控更改,或在容器生命周期的某些时间点执行 OCI 范围之外的额外操作。例如,用于改进设备和其他容器资源的分配和管理。 ++ ++NRI 定义了插件的api:https://github.com/containerd/nri/blob/main/pkg/api/api.proto,目前支持的api 版本为0.6.1 ++ ++NRI 插件能够订阅Pod和容器生命周期事件: ++ ++### 订阅Pod生命周期事件 ++ ++NRI能够订阅Pod生命周期事件,包括: ++- creation ++- stopping ++- removal ++ ++相关的API如下: ++```go ++// 当有pod在节点上创建时,NRI插件将收到该事件 ++func (p *plugin) RunPodSandbox(pod *api.PodSandbox) error { ++ return nil ++} ++// 当有pod在节点上停止时,NRI插件将收到该事件 ++func (p *plugin) StopPodSandbox(pod *api.PodSandbox) error { ++ return nil ++} ++ ++// 当有pod在节点上移除时,NRI插件将收到该事件 ++func (p *plugin) RemovePodSandbox(pod *api.PodSandbox) error { ++ return nil ++} ++``` ++ ++### 订阅容器生命周期事件 ++ ++NRI能够订阅容器生命周期事件,包括: ++ ++- creation ( * ) ++- post-creation ++- starting ++- post-start ++- updating ( * ) ++- post-update ++- stopping ( * ) ++- removal ++ ++( * )后缀的表示可以根据插件的返回信息更新容器的oci spec。相关的API如下: ++ ++```go ++// 创建容器 ++func (p *plugin) CreateContainer(pod *api.PodSandbox, container *api.Container) (*api.ContainerAdjustment, []*api.ContainerUpdate, error) { ++ return nil, nil, nil ++} ++// 容器创建以后 ++func (p *plugin) PostCreateContainer(pod *api.PodSandbox, container *api.Container) error { ++  return nil ++} ++// 容器启动之前 ++func (p *plugin) StartContainer(pod *api.PodSandbox, container *api.Container) error { ++ return nil ++} ++// 容器启动之后 ++func (p *plugin) PostStartContainer(pod *api.PodSandbox, container *api.Container) error { ++ return nil ++} ++// 容器更新时 ++func (p *plugin) UpdateContainer(pod *api.PodSandbox, container *api.Container) ([]*api.ContainerUpdate, error) { ++ return nil, nil ++} ++// 容器更新后 ++func (p *plugin) PostUpdateContainer(pod *api.PodSandbox, container *api.Container) error { ++ return nil ++} ++// 容器停止时 ++func (p *plugin) StopContainer(pod *api.PodSandbox, container *api.Container) ([]*api.ContainerUpdate, error) { ++ return nil, nil ++} ++// 容器移除时 ++func (p *plugin) RemoveContainer(pod *api.PodSandbox, container *api.Container) error { ++ return nil ++} ++``` ++ ++### NRI插件可获得的信息 ++ ++```proto ++// Pod metadata that is considered relevant for a plugin. ++message PodSandbox { ++ string id = 1; ++ string name = 2; ++ string uid = 3; ++ string namespace = 4; ++ map labels = 5; ++ map annotations = 6; ++ string runtime_handler = 7; ++ LinuxPodSandbox linux = 8; ++ uint32 pid = 9; // for NRI v1 emulation ++} ++ ++// Container metadata that is considered relevant for a plugin. ++message Container { ++ string id = 1; ++ string pod_sandbox_id = 2; ++ string name = 3; ++ ContainerState state = 4; ++ map labels = 5; ++ map annotations = 6; ++ repeated string args = 7; ++ repeated string env = 8; ++ repeated Mount mounts = 9; ++ Hooks hooks = 10; ++ LinuxContainer linux = 11; ++ uint32 pid = 12; // for NRI v1 emulation ++ repeated POSIXRlimit rlimits = 13; ++} ++``` ++ ++### NRI 插件可更新资源 ++ ++#### 可更新的pod资源 ++ ++```proto ++// PodSandbox linux-specific metadata ++message LinuxPodSandbox { ++ LinuxResources pod_overhead = 1; ++ LinuxResources pod_resources = 2; ++ string cgroup_parent = 3; ++ string cgroups_path = 4; // for NRI v1 emulation ++ repeated LinuxNamespace namespaces = 5; // for NRI v1 emulation ++ LinuxResources resources = 6; // for NRI v1 emulation ++} ++ ++// Container (linux) resources. ++message LinuxResources { ++ LinuxMemory memory = 1; ++ LinuxCPU cpu = 2; ++ repeated HugepageLimit hugepage_limits = 3; ++ OptionalString blockio_class = 4; ++ OptionalString rdt_class = 5; ++ map unified = 6; ++ repeated LinuxDeviceCgroup devices = 7; // for NRI v1 emulation ++} ++ ++// Memory-related parts of (linux) resources. ++message LinuxMemory { ++ OptionalInt64 limit = 1; ++ OptionalInt64 reservation = 2; ++ OptionalInt64 swap = 3; ++ OptionalInt64 kernel = 4; ++ OptionalInt64 kernel_tcp = 5; ++ OptionalUInt64 swappiness = 6; ++ OptionalBool disable_oom_killer = 7; ++ OptionalBool use_hierarchy = 8; ++} ++ ++// CPU-related parts of (linux) resources. ++message LinuxCPU { ++ OptionalUInt64 shares = 1; ++ OptionalInt64 quota = 2; ++ OptionalUInt64 period = 3; ++ OptionalInt64 realtime_runtime = 4; ++ OptionalUInt64 realtime_period = 5; ++ string cpus = 6; ++ string mems = 7; ++} ++ ++// Container huge page limit. ++message HugepageLimit { ++ string page_size = 1; ++ uint64 limit = 2; ++} ++ ++// Container rlimits ++message POSIXRlimit { ++ string type = 1; ++ uint64 hard = 2; ++ uint64 soft = 3; ++} ++ ++// A linux namespace. ++message LinuxNamespace { ++ string type = 1; ++ string path = 2; ++} ++``` ++ ++#### 可更新的container资源 ++ ++```proto ++// Requested adjustments to a container being created. ++message ContainerAdjustment { ++ map annotations = 2; ++ repeated Mount mounts = 3; ++ repeated KeyValue env = 4; ++ Hooks hooks = 5; ++ LinuxContainerAdjustment linux = 6; ++ repeated POSIXRlimit rlimits = 7; ++} ++ ++// A container mount. ++message Mount { ++ string destination = 1; ++ string type = 2; ++ string source = 3; ++ repeated string options = 4; ++} ++ ++// Adjustments to (linux) resources. ++message LinuxContainerAdjustment { ++ repeated LinuxDevice devices = 1; ++ LinuxResources resources = 2; ++ string cgroups_path = 3; ++} ++ ++``` ++ ++## NRI 优势 ++NRI(Node Resource Interface), 是用于控制节点资源的公共接口, 是CRI兼容的容器运行时插件扩展的通用框架。它为扩展插件提供了跟踪容器状态,并对其配置进行有限修改的基本机制。 ++ ++在NRI规范之前,k8s场景下资源管理的流程与CRI管理流程是相互独立的,在管理面上的存在一些一致性的问题,NRI的推出则解决了这些问题: ++- NRI利用容器引擎来捕获生命周期,无需额外组件监控 ++- Pod资源管理流程与CRI原有流程归一化,减少管理及维护成本 ++- 在Pod管理流程中直接插入调度策略,不存在延迟 ++- Kubernetes获取的资源信息与底层信息保持一致 ++ ++简单来说,NRI的出现减少了管理维护成本,消除了调度延迟,规范了信息一致性 ++ ++## 需求目标 ++ ++实现iSulad对符合NRI 规范的nri插件的支持,使得对于iSulad管理的sandbox与容器,用户可以在不修改容器运行时源代码的情况下添加自定义逻辑,减少对容器资源的管理成本,且保证插件获取信息与容器引擎信息一致。 ++ ++# 总体设计 ++ ++```mermaid ++flowchart TD ++classDef background fill:#FFFFFF,stroke:#216,stroke-width:2px,color:#fff,stroke-dasharray:none; ++ ++classDef oldmodule fill:#DCDCDC,stroke:#216,stroke-width:2px,color:#fff,stroke-dasharray: none; ++ ++classDef newmodule fill:#a5d8ff,stroke:#216,stroke-width:2px,color:#fff,stroke-dasharray: 5 5; ++ ++classDef submodule fill:#87CEFA,stroke:#216,stroke-width:2px,color:#fff,stroke-dasharray: 5 5; ++ ++subgraph isulad ++ subgraph NRI ++ A[NRI Adaption] ++ B[NRI Helpers] ++ C[NRI plugin ops] ++ D[NRI Result] ++ E[Plugin] ++ end ++ ++ subgraph common ++ subgraph NRICommon ++ F[NRI Convert] ++ G[NRI Spec] ++ H[NRI utils] ++ end ++ end ++ ++ S[isulad init] --> A ++ A --> config ++ ICRI[CRI module] --> A ++ NRI --> NRICommon ++ A --> E ++ A --> B ++ A --> C ++ A --> D ++ I[executor] --> G ++ ICRI[CRI module] --> I ++ ++ config:::oldmodule ++ I:::oldmodule ++ S:::oldmodule ++ common:::oldmodule ++ ICRI:::oldmodule ++ NRI:::newmodule ++ NRICommon:::newmodule ++ A:::submodule ++ B:::submodule ++ C:::submodule ++ D:::submodule ++ E:::submodule ++ F:::submodule ++ G:::submodule ++ H:::submodule ++end ++isulad:::background ++OCRI[CRI API] --> ICRI ++E --> R ++R[isula-rust-extensions] --> P[nri plugin] ++P --> R ++``` ++模块简要介绍: ++1. NRI Adaption: (1)管理所有NRI插件;(2)与isula-rust-extension进行交互,调用isula-rust-extension的注册callback函数,告知isula-rust-extension接收到plugin注册与update请求时调用的函数 ++2. NRI Helpers: C++实现的nri帮助函数 ++3. NRI plugin ops: 提供转换后的adaption init函数以及提供需要注册到isula-rust-extension的callback函数 ++4. NRI Result:处理所有插件的adjust与update,得到一个合并后的结果,若插件修改冲突则报错 ++5. Plugin:定义plugin 类,用于定义plugin支持的相关操作以及存储的信息, 根据插件是否关注event来决定是否调用此plugin,需调用isula-rust-extension中plugin相关函数实现 ++6. NRI convert module:实现 CRI 结构体与 NRI结构体之间的转换、实现iSulad内部存储container的结构体与NRI结构体之间的转换 ++7. NRI Spec:实现nri修改oci spec的函数 ++8. NRI utils: 提供处理init与copy nri相关结构体的工具函数 ++ ++# 接口描述 ++ ++## 配置 ++```json ++# add support for NRI plugin. ++"nri-support": true, ++# Allow connections from externally launched NRI plugins. ++"disable_connections": true, ++# plugin_config_path is the directory to search for plugin-specific configuration. ++"plugin_config_path": "/etc/nri/conf.d" ++# plugin_path is the directory to search for plugins to launch on startup. ++"plugin_path": "/opt/nri/plugins" ++# plugin_registration_timeout is the timeout for a plugin to register after connection. ++"plugin_registration_timeout": "5s" ++# plugin_requst_timeout is the timeout for a plugin to handle an event/request. ++"plugin_request_timeout": "2s" ++# socket_path is the path of the NRI socket to create for plugins to connect to. ++"socket_path" = "/var/run/nri/nri.sock" ++``` ++# 详细设计 ++![nri_detail](./nri_detail.svg) ++ ++## 初始化流程 ++ ++![nri_init](./nri_init.svg) ++ ++## 响应RunPodSandbox事件流程 ++![nri_RunPodSandbox](./nri_RunPodSandbox.svg) ++ ++StopPodSandbox/RemovePodSandbox/PostCreateContainer/StartContainer/PostStartContainer/PostUpdateContainer/RemoveContainer 与RunPodSandbox处理流程相同,仅event种类变化 ++ ++## 响应CreateContainer事件流程 ++![nri_CreateContainer](./nri_CreateContainer.svg) ++ ++ ++ ++# 约束限制 ++## 接口参数限制 ++暂不支持修改以下参数: ++```proto ++// Container to evict(IOW unsolicitedly stop). ++ContainerEviction evict; ++ ++// ref:https://github.com/containerd/containerd/pull/5490 ++// - User defines blockio classes, for example: ThrottledIO and LowLatency. Class names are not restricted, and the number of classes is not limited. ++// iSulad not support ++OptionalString blockio_class; ++ ++// iSulad now not support the following hook types ++message Hooks { ++ repeated Hook create_runtime = 2; ++ repeated Hook create_container = 3; ++ repeated Hook start_container = 4; ++} ++``` ++tips: ++以下参数iSulad支持,containerd暂不支持 ++```proto ++// POSIX rlimits can be used control the resources a process can consume. ++POSIXRlimit rlimits ++``` ++ ++## 使用限制 ++1. 对于插件异常退出场景,iSulad目前仅在下次调用出错时打印日志( ++2. 对于external 注册的plugin,若iSulad退出,iSulad不对其进行强制kill,生命周期与iSulad无关。 ++ ++# 测试点 ++ ++1.对于订阅不同生命周期事件的nri插件支持 ++ ++2.稳定性:某个插件异常退出时,iSulad中插件的行为是否存在异常残留以及是否影响其他插件功能。 ++ ++3.稳定性:iSulad退出后,iSulad自己拉取的nri插件是否正常被kill退出。 ++ ++4.注册方式:测试iSulad启动时拉取注册nri插件与external 注册nri插件 +diff --git a/docs/design/detailed/NRI/nri_detail.svg b/docs/design/detailed/NRI/nri_detail.svg +new file mode 100644 +index 00000000..69c0d053 +--- /dev/null ++++ b/docs/design/detailed/NRI/nri_detail.svg +@@ -0,0 +1,16 @@ ++ ++ ++ ++ ++ ++ ++ CRICRI moduleNRI AdaptionNRI convertexcution moduleNRI structNRIpre-installed plugin AiSulad child process,exec by iSuladexternel plugin Nindependent process......client reqcalliSuladplugin isula-rust-extensionsRuntime ServicePlugin clinetcallRegisterPluginUpdateContainersupdate failed listresponsecalladjust oci specmanageNRI resultupdate containermerge all plugin result +\ No newline at end of file +diff --git a/docs/design/detailed/NRI/nri_init.svg b/docs/design/detailed/NRI/nri_init.svg +new file mode 100644 +index 00000000..f1628f65 +--- /dev/null ++++ b/docs/design/detailed/NRI/nri_init.svg +@@ -0,0 +1,16 @@ ++ ++ ++ ++ ++ ++ ++ pre_init_daemonmerge_json_confs_into_globalget config for nri plugin from deamon.jsonnri_adaption_initNRIAdaptation::GetInstance()->Initinit var from configmain.cisulad_config.hnri_plugin_ops.hm_support?falseyesreturntruestartPluginsortPluginsdiscoverPluginsfor pair in tmp_storeMapnewLaunchedPluginCreateSocketPairfork to exec pluginplugin->SetPid(pid);plugin->Startnri_adaption.hutil_scan_subdirswalk_plugin_dir_cbVerify plugin permissions for execParse plugin nameinit pluginNRIPlugin()Start(uint32_t timeout)WaitForReady()Connect()Configure()plugin.hcreatecallAddPluginByIndex()conf_get_nri_supportconf_get_nri_plugin_config_pathconf_get_nri_plugin_pathconf_get_nri_plugin_registration_timeoutconf_get_nri_plugin_requst_timeoutconf_get_socket_pathpluginrunruntime serviceregistryplugin clientcallinit nri adaption for nri pluginisula-rust-extensionsiSuladnri_runtime_service_initregister runtime service callbackif !disable_connectionsstartListenerexternal pluginnri_external_plugin_connectcall callback +\ No newline at end of file +-- +2.25.1 + diff --git a/0117-NRI-add-nri-head-file-and-common-func.patch b/0118-NRI-add-nri-head-file-and-common-func.patch similarity index 100% rename from 0117-NRI-add-nri-head-file-and-common-func.patch rename to 0118-NRI-add-nri-head-file-and-common-func.patch diff --git a/0118-skip-calling-cni-plugin-cleanup-when-network-namespa.patch b/0119-skip-calling-cni-plugin-cleanup-when-network-namespa.patch similarity index 100% rename from 0118-skip-calling-cni-plugin-cleanup-when-network-namespa.patch rename to 0119-skip-calling-cni-plugin-cleanup-when-network-namespa.patch diff --git a/0119-nri-add-convert-and-utils-impl-for-nri.patch b/0120-nri-add-convert-and-utils-impl-for-nri.patch similarity index 100% rename from 0119-nri-add-convert-and-utils-impl-for-nri.patch rename to 0120-nri-add-convert-and-utils-impl-for-nri.patch diff --git a/0120-get-realpath-before-ns-mountpoint-verification.patch b/0121-get-realpath-before-ns-mountpoint-verification.patch similarity index 100% rename from 0120-get-realpath-before-ns-mountpoint-verification.patch rename to 0121-get-realpath-before-ns-mountpoint-verification.patch diff --git a/0121-nri-impl-for-nri-plugin-and-adaption.patch b/0122-nri-impl-for-nri-plugin-and-adaption.patch similarity index 100% rename from 0121-nri-impl-for-nri-plugin-and-adaption.patch rename to 0122-nri-impl-for-nri-plugin-and-adaption.patch diff --git a/0123-code-improve-for-codecheck.patch b/0123-code-improve-for-codecheck.patch new file mode 100644 index 0000000..1801dff --- /dev/null +++ b/0123-code-improve-for-codecheck.patch @@ -0,0 +1,287 @@ +From 8e442712354a9d4f766d1f90b018fd1246cb9ef2 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Wed, 4 Sep 2024 16:26:59 +1400 +Subject: [PATCH 123/149] code improve for codecheck + +Signed-off-by: zhongtao +--- + src/daemon/common/sysinfo.h | 8 ++++---- + src/daemon/entry/cri/network_plugin.cc | 2 +- + src/daemon/mailbox/message_queue.h | 8 ++++---- + src/daemon/mailbox/message_subscriber.h | 8 ++++++++ + src/daemon/modules/runtime/shim/shim_rt_monitor.cc | 2 ++ + src/daemon/nri/nri_adaption.h | 1 - + src/daemon/sandbox/sandbox_manager.cc | 5 ++--- + src/utils/cutils/blocking_queue.h | 2 +- + src/utils/cutils/utils_aes.h | 2 +- + src/utils/cutils/utils_cap.h | 7 +++---- + src/utils/cutils/utils_fs.h | 2 +- + src/utils/cutils/utils_network.c | 2 ++ + src/utils/cutils/utils_string.h | 3 +-- + src/utils/tar/util_archive.h | 5 ++--- + src/utils/tar/util_gzip.h | 2 +- + 15 files changed, 33 insertions(+), 26 deletions(-) + +diff --git a/src/daemon/common/sysinfo.h b/src/daemon/common/sysinfo.h +index 6142487b..e6bb7f95 100644 +--- a/src/daemon/common/sysinfo.h ++++ b/src/daemon/common/sysinfo.h +@@ -15,16 +15,16 @@ + #ifndef DAEMON_COMMON_SYSINFO_H + #define DAEMON_COMMON_SYSINFO_H + +-#ifdef __cplusplus +-extern "C" { +-#endif +- + #include + #include + #include + + #include "cgroup.h" + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + typedef struct { + // Number of processors currently online (i.e., available). + int ncpus; +diff --git a/src/daemon/entry/cri/network_plugin.cc b/src/daemon/entry/cri/network_plugin.cc +index f8f9c7e6..439d0224 100644 +--- a/src/daemon/entry/cri/network_plugin.cc ++++ b/src/daemon/entry/cri/network_plugin.cc +@@ -198,7 +198,7 @@ void InitNetworkPlugin(std::vector> *plugins, std + + if (networkPluginName.empty()) { + DEBUG("network plugin name empty"); +- *result = std::shared_ptr(new (std::nothrow) NoopNetworkPlugin); ++ *result = std::make_shared(); + if (*result == nullptr) { + ERROR("Out of memory"); + return; +diff --git a/src/daemon/mailbox/message_queue.h b/src/daemon/mailbox/message_queue.h +index 7905840f..c9bbc9e2 100644 +--- a/src/daemon/mailbox/message_queue.h ++++ b/src/daemon/mailbox/message_queue.h +@@ -16,10 +16,6 @@ + #ifndef DAEMON_MESSAGE_MESSAGE_QUEUE_H + #define DAEMON_MESSAGE_MESSAGE_QUEUE_H + +-#ifdef __cplusplus +-extern "C" { +-#endif +- + #include + + #include "blocking_queue.h" +@@ -27,6 +23,10 @@ extern "C" { + #include "map.h" + #include "message_subscriber.h" + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + typedef struct message_queue { + blocking_queue *messages; + +diff --git a/src/daemon/mailbox/message_subscriber.h b/src/daemon/mailbox/message_subscriber.h +index de4574d9..2987b60d 100644 +--- a/src/daemon/mailbox/message_subscriber.h ++++ b/src/daemon/mailbox/message_subscriber.h +@@ -19,6 +19,10 @@ + #include "blocking_queue.h" + #include "mailbox_message.h" + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + typedef struct { + blocking_queue *queue; + } message_subscriber; +@@ -38,4 +42,8 @@ define_auto_cleanup_callback(message_subscriber_destroy, message_subscriber); + // define auto free macro for blocking queue + #define __isula_auto_subscriber auto_cleanup_tag(message_subscriber_destroy) + ++#ifdef __cplusplus ++} ++#endif ++ + #endif +diff --git a/src/daemon/modules/runtime/shim/shim_rt_monitor.cc b/src/daemon/modules/runtime/shim/shim_rt_monitor.cc +index 2547a206..97f5cd68 100644 +--- a/src/daemon/modules/runtime/shim/shim_rt_monitor.cc ++++ b/src/daemon/modules/runtime/shim/shim_rt_monitor.cc +@@ -30,6 +30,8 @@ + #include "utils.h" + #include "error.h" + ++// The shim v2 header file needs to be modified to ++// use extern "C" to wrap external functions. + extern "C" { + #include + } +diff --git a/src/daemon/nri/nri_adaption.h b/src/daemon/nri/nri_adaption.h +index 27a6d93e..6bd41941 100644 +--- a/src/daemon/nri/nri_adaption.h ++++ b/src/daemon/nri/nri_adaption.h +@@ -16,7 +16,6 @@ + #ifndef DAEMON_NRI_PLUGIN_NRI_ADAPTION_H + #define DAEMON_NRI_PLUGIN_NRI_ADAPTION_H + +-// #include "read_write_lock.h" + #include + #include + +diff --git a/src/daemon/sandbox/sandbox_manager.cc b/src/daemon/sandbox/sandbox_manager.cc +index cee444f4..4159993f 100644 +--- a/src/daemon/sandbox/sandbox_manager.cc ++++ b/src/daemon/sandbox/sandbox_manager.cc +@@ -109,8 +109,7 @@ auto SandboxManager::CreateSandbox(const std::string &name, RuntimeInfo &info, s + return nullptr; + } + +- sandbox = std::shared_ptr(new Sandbox(id, m_rootdir, m_statedir, name, info, netMode, netNsPath, +- sandboxConfig, image)); ++ sandbox = std::make_shared(id, m_rootdir, m_statedir, name, info, netMode, netNsPath, sandboxConfig, image); + if (sandbox == nullptr) { + ERROR("Failed to malloc for sandbox: %s", name.c_str()); + error.Errorf("Failed to malloc for sandbox: %s", name.c_str()); +@@ -452,7 +451,7 @@ auto SandboxManager::LoadSandbox(std::string &id) -> std::shared_ptr + return nullptr; + } + +- sandbox = std::shared_ptr(new Sandbox(id, m_rootdir, m_statedir)); ++ sandbox = std::make_shared(id, m_rootdir, m_statedir); + if (sandbox == nullptr) { + ERROR("Failed to malloc for sandboxes: %s", id.c_str()); + return nullptr; +diff --git a/src/utils/cutils/blocking_queue.h b/src/utils/cutils/blocking_queue.h +index 257779c3..e6931501 100644 +--- a/src/utils/cutils/blocking_queue.h ++++ b/src/utils/cutils/blocking_queue.h +@@ -26,7 +26,7 @@ + extern "C" { + #endif + +-#define BLOCKING_QUEUE_NO_TIMEOUT -1 ++#define BLOCKING_QUEUE_NO_TIMEOUT (-1) + + typedef struct blocking_node { + void *data; +diff --git a/src/utils/cutils/utils_aes.h b/src/utils/cutils/utils_aes.h +index bd2c2065..8ff6dad8 100644 +--- a/src/utils/cutils/utils_aes.h ++++ b/src/utils/cutils/utils_aes.h +@@ -26,7 +26,7 @@ extern "C" { + #define AES_256_CFB_KEY_LEN 32 + #define AES_256_CFB_IV_LEN 16 + +-int util_aes_key(const char *key_path, bool create, unsigned char *aeskey); ++int util_aes_key(const char *key_file, bool create, unsigned char *aeskey); + + // note: Input bytes is "IV+data", "bytes+AES_256_CFB_IV_LEN" is the real data to be encoded. + // The output length is the input "len" and add the '\0' after end of the length. +diff --git a/src/utils/cutils/utils_cap.h b/src/utils/cutils/utils_cap.h +index de63d070..c7e78ac2 100644 +--- a/src/utils/cutils/utils_cap.h ++++ b/src/utils/cutils/utils_cap.h +@@ -16,14 +16,13 @@ + #ifndef UTILS_CUTILS_UTILS_CAP_H + #define UTILS_CUTILS_UTILS_CAP_H + ++#include ++#include ++ + #ifdef __cplusplus + extern "C" { + #endif + +-#include +-#include +-#include +- + bool util_valid_cap(const char *cap); + + /** +diff --git a/src/utils/cutils/utils_fs.h b/src/utils/cutils/utils_fs.h +index c44fed8c..438af416 100644 +--- a/src/utils/cutils/utils_fs.h ++++ b/src/utils/cutils/utils_fs.h +@@ -34,7 +34,7 @@ bool util_detect_mounted(const char *path); + int util_ensure_mounted_as(const char *dst, const char *mntopts); + int util_mount_from(const char *base, const char *src, const char *dst, const char *mtype, const char *mntopts); + typedef int (*mount_info_call_back_t)(const char *, const char *); +-bool util_deal_with_mount_info(mount_info_call_back_t cb, const char *); ++bool util_deal_with_mount_info(mount_info_call_back_t cb, const char *pattern); + bool util_check_readonly_fs(const char *path); + #ifdef __cplusplus + } +diff --git a/src/utils/cutils/utils_network.c b/src/utils/cutils/utils_network.c +index bb6a2f87..be33ec87 100644 +--- a/src/utils/cutils/utils_network.c ++++ b/src/utils/cutils/utils_network.c +@@ -801,6 +801,8 @@ static bool is_invalid_char(char c) + return true; + case ' ': + return true; ++ default: ++ return false; + } + return false; + } +diff --git a/src/utils/cutils/utils_string.h b/src/utils/cutils/utils_string.h +index 0de2266c..d37343d5 100644 +--- a/src/utils/cutils/utils_string.h ++++ b/src/utils/cutils/utils_string.h +@@ -17,7 +17,6 @@ + #define UTILS_CUTILS_UTILS_STRING_H + #include + #include +-#include + #include + + #ifdef __cplusplus +@@ -48,7 +47,7 @@ char **util_string_split(const char *src_str, char _sep); + // note that every delimiter bytes is considered to be a single delimiter + char **util_string_split_multi(const char *src_str, char delim); + +-char **util_string_split_n(const char *src_str, char delim, size_t n); ++char **util_string_split_n(const char *src, char sep, size_t n); + + const char *util_str_skip_str(const char *str, const char *skip); + +diff --git a/src/utils/tar/util_archive.h b/src/utils/tar/util_archive.h +index 8f0ab2a4..98597d53 100644 +--- a/src/utils/tar/util_archive.h ++++ b/src/utils/tar/util_archive.h +@@ -53,9 +53,8 @@ int archive_chroot_tar(const char *path, const char *file, const char *root_dir, + + int archive_chroot_tar_stream(const char *chroot_dir, const char *tar_path, const char *src_base, + const char *dst_base, const char *root_dir, struct io_read_wrapper *content); +-int archive_chroot_untar_stream(const struct io_read_wrapper *content, const char *chroot_dir, +- const char *untar_dir, const char *src_base, const char *dst_base, +- const char *root_dir, char **errmsg); ++int archive_chroot_untar_stream(const struct io_read_wrapper *context, const char *chroot_dir, const char *untar_dir, ++ const char *src_base, const char *dst_base, const char *root_dir, char **errmsg); + + int archive_copy_oci_tar_split_and_ret_size(int src_fd, const char *dist_file, int64_t *ret_size); + +diff --git a/src/utils/tar/util_gzip.h b/src/utils/tar/util_gzip.h +index 7d881e92..7797c5f9 100644 +--- a/src/utils/tar/util_gzip.h ++++ b/src/utils/tar/util_gzip.h +@@ -26,7 +26,7 @@ extern "C" { + int util_gzip_z(const char *srcfile, const char *dstfile, const mode_t mode); + + // Decompress +-int util_gzip_d(const char *srcfile, const FILE *destfp); ++int util_gzip_d(const char *srcfile, const FILE *dstfp); + + /* + * compress file. +-- +2.25.1 + diff --git a/0124-change-pull-registry-to-hub.oepkgs.net.patch b/0124-change-pull-registry-to-hub.oepkgs.net.patch new file mode 100644 index 0000000..75c8ca6 --- /dev/null +++ b/0124-change-pull-registry-to-hub.oepkgs.net.patch @@ -0,0 +1,137 @@ +From d6f7f7d3e2d644d2208ccc35f1de225b54c452a7 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Fri, 6 Sep 2024 17:45:58 +0800 +Subject: [PATCH 124/149] 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/image_search.sh | 2 +- + CI/test_cases/image_cases/registry.sh | 22 +++++++++---------- + 5 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/CI/make-and-install.sh b/CI/make-and-install.sh +index 61281965..2c2a4241 100755 +--- a/CI/make-and-install.sh ++++ b/CI/make-and-install.sh +@@ -95,7 +95,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 +@@ -110,4 +110,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/image_search.sh b/CI/test_cases/image_cases/image_search.sh +index 4bf0e099..9ac680ce 100755 +--- a/CI/test_cases/image_cases/image_search.sh ++++ b/CI/test_cases/image_cases/image_search.sh +@@ -77,7 +77,7 @@ function test_image_search() + declare -i ans=0 + + # unable to pull image from docker.io without agent, skip this test +-# registry API v1 is not implemented in https://3laho3y3.mirror.aliyuncs.com and isula search cannot be tested ++# registry API v1 is not implemented in https://hub.oepkgs.net and isula search cannot be tested + # test_image_search || ((ans++)) + + show_result ${ans} "${curr_path}/${0}" +diff --git a/CI/test_cases/image_cases/registry.sh b/CI/test_cases/image_cases/registry.sh +index 7ea9a0c5..e56d99d3 100755 +--- a/CI/test_cases/image_cases/registry.sh ++++ b/CI/test_cases/image_cases/registry.sh +@@ -78,8 +78,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 +@@ -98,7 +98,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" +@@ -109,12 +109,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 +@@ -123,12 +123,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.25.1 + diff --git a/0125-fix-clang-build-error.patch b/0125-fix-clang-build-error.patch new file mode 100644 index 0000000..ca8f9f6 --- /dev/null +++ b/0125-fix-clang-build-error.patch @@ -0,0 +1,216 @@ +From d141d8bfc7a602b0f139bef42a1c73dc673687de Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= +Date: Mon, 21 Oct 2024 19:39:38 +0800 +Subject: [PATCH] fix-clang-build-error + +--- + src/daemon/common/cri/cri_helpers.cc | 4 ++-- + src/daemon/entry/cri/streams/stream_server.h | 4 ++-- + .../entry/cri/v1/v1_cri_container_manager_service.cc | 2 +- + .../entry/cri/v1/v1_cri_image_manager_service_impl.cc | 2 +- + .../entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc | 10 +++++----- + src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h | 2 +- + .../entry/cri/v1alpha/cri_container_manager_service.cc | 2 +- + .../cri/v1alpha/cri_pod_sandbox_manager_service.cc | 6 +++--- + src/daemon/sandbox/sandbox.cc | 2 +- + src/daemon/sandbox/sandbox_ops.cc | 2 +- + 10 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/src/daemon/common/cri/cri_helpers.cc b/src/daemon/common/cri/cri_helpers.cc +index 8117403c..a8cbd996 100644 +--- a/src/daemon/common/cri/cri_helpers.cc ++++ b/src/daemon/common/cri/cri_helpers.cc +@@ -525,8 +525,8 @@ void RemoveContainerLogSymlink(const std::string &containerID, Errors &error) + if (!path.empty()) { + // Only remove the symlink when container log path is specified. + if (util_path_remove(path.c_str()) != 0 && errno != ENOENT) { +- SYSERROR("Failed to remove container %s log symlink %s.", containerID.c_str(), path); +- error.Errorf("Failed to remove container %s log symlink %s.", containerID.c_str(), path); ++ SYSERROR("Failed to remove container %s log symlink %s.", containerID.c_str(), path.c_str()); ++ error.Errorf("Failed to remove container %s log symlink %s.", containerID.c_str(), path.c_str()); + } + } + } +diff --git a/src/daemon/entry/cri/streams/stream_server.h b/src/daemon/entry/cri/streams/stream_server.h +index 81aa9987..028dfc84 100644 +--- a/src/daemon/entry/cri/streams/stream_server.h ++++ b/src/daemon/entry/cri/streams/stream_server.h +@@ -17,6 +17,8 @@ + #include "errors.h" + #include "url.h" + ++url::URLDatum cri_stream_server_url(void); ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -27,8 +29,6 @@ void cri_stream_server_wait(void); + + void cri_stream_server_shutdown(void); + +-url::URLDatum cri_stream_server_url(void); +- + #ifdef __cplusplus + } + #endif +diff --git a/src/daemon/entry/cri/v1/v1_cri_container_manager_service.cc b/src/daemon/entry/cri/v1/v1_cri_container_manager_service.cc +index d3fdd76a..1e84d14c 100644 +--- a/src/daemon/entry/cri/v1/v1_cri_container_manager_service.cc ++++ b/src/daemon/entry/cri/v1/v1_cri_container_manager_service.cc +@@ -744,7 +744,7 @@ void ContainerManagerService::ListContainersToGRPC(container_list_response *resp + CRIHelpersV1::ContainerStatusToRuntime(Container_Status(response->containers[i]->status)); + container->set_state(state); + +- containers.push_back(move(container)); ++ containers.push_back(std::move(container)); + } + } + +diff --git a/src/daemon/entry/cri/v1/v1_cri_image_manager_service_impl.cc b/src/daemon/entry/cri/v1/v1_cri_image_manager_service_impl.cc +index 71918706..561a40d5 100644 +--- a/src/daemon/entry/cri/v1/v1_cri_image_manager_service_impl.cc ++++ b/src/daemon/entry/cri/v1/v1_cri_image_manager_service_impl.cc +@@ -149,7 +149,7 @@ void ImageManagerServiceImpl::list_images_to_grpc(im_list_response *response, + + imagetool_image_summary *element = list_images->images[i]; + conv_image_to_grpc(element, image); +- images.push_back(move(image)); ++ images.push_back(std::move(image)); + } + } + +diff --git a/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc b/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc +index b629b1c3..a5f98619 100644 +--- a/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc ++++ b/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc +@@ -536,7 +536,7 @@ auto PodSandboxManagerService::GetContainerListResponse(const std::string &readS + if (CRIHelpers::FiltersAddLabel(list_request->filters, CRIHelpers::Constants::SANDBOX_ID_LABEL_KEY, + readSandboxID) != 0) { + std::string tmp_errmsg = "Failed to add label in sandbox" + readSandboxID; +- ERROR(tmp_errmsg.c_str()); ++ ERROR("%s", tmp_errmsg.c_str()); + errors.push_back(tmp_errmsg); + return nullptr; + } +@@ -551,7 +551,7 @@ auto PodSandboxManagerService::GetContainerListResponse(const std::string &readS + } + if (ret != 0) { + if (list_response != nullptr && list_response->errmsg != nullptr) { +- ERROR(list_response->errmsg); ++ ERROR("%s", list_response->errmsg); + errors.push_back(list_response->errmsg); + } else { + ERROR("Failed to call list container callback"); +@@ -1218,7 +1218,7 @@ void PodSandboxManagerService::PodSandboxStatsToGRPC(const std::string &id, cons + return; + } + +- podStats = move(podStatsPtr); ++ podStats = std::move(podStatsPtr); + return; + } + +@@ -1227,7 +1227,7 @@ auto PodSandboxManagerService::PodSandboxStats(const std::string &podSandboxID, + Errors &error) -> std::unique_ptr + { + Errors tmpErr; +- cgroup_metrics_t cgroupMetrics { 0 }; ++ cgroup_metrics_t cgroupMetrics {{ 0 }}; + std::vector netMetrics; + std::map annotations; + std::unique_ptr podStats { nullptr }; +@@ -1368,7 +1368,7 @@ void PodSandboxManagerService::ListPodSandboxStats(const runtime::v1::PodSandbox + continue; + } + +- podsStats.push_back(move(podStats)); ++ podsStats.push_back(std::move(podStats)); + } + } + +diff --git a/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h b/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h +index 3d93c7bb..33539a32 100644 +--- a/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h ++++ b/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h +@@ -104,7 +104,7 @@ protected: + private: + std::string m_podSandboxImage; + std::shared_ptr m_pluginManager { nullptr }; +- bool m_enablePodEvents; ++ [[maybe_unused]] bool m_enablePodEvents; + }; + } // namespace CRIV1 + #endif // DAEMON_ENTRY_CRI_V1_CRI_RUNTIME_SERVICE_IMPL_H +diff --git a/src/daemon/entry/cri/v1alpha/cri_container_manager_service.cc b/src/daemon/entry/cri/v1alpha/cri_container_manager_service.cc +index dbefa143..97acecd9 100644 +--- a/src/daemon/entry/cri/v1alpha/cri_container_manager_service.cc ++++ b/src/daemon/entry/cri/v1alpha/cri_container_manager_service.cc +@@ -687,7 +687,7 @@ void ContainerManagerService::ListContainersToGRPC(container_list_response *resp + CRIHelpersV1Alpha::ContainerStatusToRuntime(Container_Status(response->containers[i]->status)); + container->set_state(state); + +- pods.push_back(move(container)); ++ pods.push_back(std::move(container)); + } + } + +diff --git a/src/daemon/entry/cri/v1alpha/cri_pod_sandbox_manager_service.cc b/src/daemon/entry/cri/v1alpha/cri_pod_sandbox_manager_service.cc +index 1c343cda..3c128645 100644 +--- a/src/daemon/entry/cri/v1alpha/cri_pod_sandbox_manager_service.cc ++++ b/src/daemon/entry/cri/v1alpha/cri_pod_sandbox_manager_service.cc +@@ -1573,7 +1573,7 @@ void PodSandboxManagerService::PodSandboxStatsToGRPC(const std::string &id, cons + return; + } + +- podStats = move(podStatsPtr); ++ podStats = std::move(podStatsPtr); + return; + } + +@@ -1583,7 +1583,7 @@ auto PodSandboxManagerService::PodSandboxStats(const std::string &podSandboxID, + { + Errors tmpErr; + container_inspect *inspectData { nullptr }; +- cgroup_metrics_t cgroupMetrics { 0 }; ++ cgroup_metrics_t cgroupMetrics {{ 0 }}; + std::vector netMetrics; + std::map annotations; + std::unique_ptr podStats { nullptr }; +@@ -1733,7 +1733,7 @@ void PodSandboxManagerService::ListPodSandboxStats(const runtime::v1alpha2::PodS + continue; + } + +- podsStats.push_back(move(podStats)); ++ podsStats.push_back(std::move(podStats)); + } + } + +diff --git a/src/daemon/sandbox/sandbox.cc b/src/daemon/sandbox/sandbox.cc +index d44abb99..dec082bc 100644 +--- a/src/daemon/sandbox/sandbox.cc ++++ b/src/daemon/sandbox/sandbox.cc +@@ -847,7 +847,7 @@ auto Sandbox::SaveState(Errors &error) -> bool + + nret = util_atomic_write_file(path.c_str(), stateJson.c_str(), stateJson.length(), CONFIG_FILE_MODE, false); + if (nret != 0) { +- SYSERROR("Failed to write file %s"); ++ SYSERROR("Failed to write file %s", path.c_str()); + error.Errorf("Failed to write file %s", path.c_str()); + return false; + } +diff --git a/src/daemon/sandbox/sandbox_ops.cc b/src/daemon/sandbox/sandbox_ops.cc +index b7fb40bf..22cfea95 100644 +--- a/src/daemon/sandbox/sandbox_ops.cc ++++ b/src/daemon/sandbox/sandbox_ops.cc +@@ -72,7 +72,7 @@ static int do_sandbox_prepare(const container_config_v2_common_config *config, + + params.containerId = config->id; + params.execId = (nullptr == exec_id) ? "" : exec_id; +- params.spec = std::move(std::unique_ptr(new std::string(oci_spec))); ++ params.spec = std::unique_ptr(new std::string(oci_spec)); + + if (generate_ctrl_rootfs(params, config) != 0) { + ERROR("Invalid rootfs"); +-- +2.25.1 + diff --git a/0126-add-a-new-registry-to-prevent-missing-mirrors.patch b/0126-add-a-new-registry-to-prevent-missing-mirrors.patch new file mode 100644 index 0000000..aba6256 --- /dev/null +++ b/0126-add-a-new-registry-to-prevent-missing-mirrors.patch @@ -0,0 +1,25 @@ +From a7a851f5be6c37665d948ec7587de062b6295bbe Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Sat, 7 Sep 2024 11:24:44 +0800 +Subject: [PATCH 133/149] add a new registry to prevent missing mirrors + +Signed-off-by: zhongtao +--- + CI/test_cases/container_cases/test_data/daemon.json | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CI/test_cases/container_cases/test_data/daemon.json b/CI/test_cases/container_cases/test_data/daemon.json +index 20b001c0..cf7e0b9d 100644 +--- a/CI/test_cases/container_cases/test_data/daemon.json ++++ b/CI/test_cases/container_cases/test_data/daemon.json +@@ -24,6 +24,7 @@ + "overlay2.override_kernel_check=true" + ], + "registry-mirrors": [ ++ "https://docker.chenby.cn", + "https://hub.oepkgs.net" + ], + "insecure-registries": [ +-- +2.25.1 + diff --git a/0127-change-image-digest-ci-test-for-registry-change.patch b/0127-change-image-digest-ci-test-for-registry-change.patch new file mode 100644 index 0000000..f7c388b --- /dev/null +++ b/0127-change-image-digest-ci-test-for-registry-change.patch @@ -0,0 +1,47 @@ +From be8e1822b771576ef2f225da90dc6f0551477c0e Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Sat, 7 Sep 2024 14:49:33 +0800 +Subject: [PATCH 134/149] change image digest ci test for registry change + +Signed-off-by: zhongtao +--- + CI/make-and-install.sh | 5 ++--- + CI/test_cases/image_cases/image_digest.sh | 2 +- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/CI/make-and-install.sh b/CI/make-and-install.sh +index 2c2a4241..599afcb9 100755 +--- a/CI/make-and-install.sh ++++ b/CI/make-and-install.sh +@@ -95,7 +95,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://hub.oepkgs.net\"" ${restbuilddir}/etc/isulad/daemon.json ++sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\",\\n \"https://docker.chenby.cn\"" ${builddir}/etc/isulad/daemon.json + + #build grpc version + cd $ISULAD_COPY_PATH +@@ -109,5 +109,4 @@ else + 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://hub.oepkgs.net\"" ${builddir}/etc/isulad/daemon.json ++sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\",\\n \"https://docker.chenby.cn\"" ${builddir}/etc/isulad/daemon.json +diff --git a/CI/test_cases/image_cases/image_digest.sh b/CI/test_cases/image_cases/image_digest.sh +index 20774e07..ec1cbaa5 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="ubuntu" + local image_digest="hub.oepkgs.net/library/busybox@sha256:6066ca124f8c2686b7ae71aa1d6583b28c6dc3df3bdc386f2c89b92162c597d9" + local test="pull && inspect && tag image with digest test => (${FUNCNAME[@]})" + +-- +2.25.1 + diff --git a/0128-bugfix-for-ci-make-and-install-shell.patch b/0128-bugfix-for-ci-make-and-install-shell.patch new file mode 100644 index 0000000..75d498d --- /dev/null +++ b/0128-bugfix-for-ci-make-and-install-shell.patch @@ -0,0 +1,26 @@ +From cc266a7c27cc40099f545b19d16fce49aee9a403 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Mon, 9 Sep 2024 10:51:43 +0800 +Subject: [PATCH 135/149] bugfix for ci make and install shell + +Signed-off-by: zhongtao +--- + CI/make-and-install.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CI/make-and-install.sh b/CI/make-and-install.sh +index 599afcb9..1498d700 100755 +--- a/CI/make-and-install.sh ++++ b/CI/make-and-install.sh +@@ -95,7 +95,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://hub.oepkgs.net\",\\n \"https://docker.chenby.cn\"" ${builddir}/etc/isulad/daemon.json ++sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\",\\n \"https://docker.chenby.cn\"" ${restbuilddir}/etc/isulad/daemon.json + + #build grpc version + cd $ISULAD_COPY_PATH +-- +2.25.1 + diff --git a/0129-do-not-use-1000-as-the-test-gid-to-prevent-conflicts.patch b/0129-do-not-use-1000-as-the-test-gid-to-prevent-conflicts.patch new file mode 100644 index 0000000..d6f0533 --- /dev/null +++ b/0129-do-not-use-1000-as-the-test-gid-to-prevent-conflicts.patch @@ -0,0 +1,28 @@ +From 10af937fc2e095bce2da902c20e1f6b5e6178387 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Mon, 9 Sep 2024 17:18:52 +0800 +Subject: [PATCH 136/149] do not use 1000 as the test gid to prevent conflicts + with existing gids in the image + +Signed-off-by: zhongtao +--- + CI/test_cases/container_cases/exec_additional_gids.sh | 3 ++- + 1 file changed, 2 insertions(+), 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 2edfd750..a62ab78c 100755 +--- a/CI/test_cases/container_cases/exec_additional_gids.sh ++++ b/CI/test_cases/container_cases/exec_additional_gids.sh +@@ -25,7 +25,8 @@ source ../helpers.sh + 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" +-- +2.25.1 + diff --git a/0130-only-use-the-openeuler-mirror-registry-in-ci.patch b/0130-only-use-the-openeuler-mirror-registry-in-ci.patch new file mode 100644 index 0000000..d7adc89 --- /dev/null +++ b/0130-only-use-the-openeuler-mirror-registry-in-ci.patch @@ -0,0 +1,224 @@ +From d77740f686c90861198498ac760f0bb8a5bcc593 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 10 Sep 2024 15:16:37 +0800 +Subject: [PATCH 139/149] only use the openeuler mirror registry in ci + +Signed-off-by: zhongtao +--- + CI/make-and-install.sh | 4 ++-- + CI/test_cases/container_cases/exec_additional_gids.sh | 3 ++- + CI/test_cases/container_cases/runc_exec.sh | 2 +- + CI/test_cases/image_cases/image_digest.sh | 2 +- + CI/test_cases/image_cases/image_load.sh | 8 +++++--- + 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 | 2 +- + CI/test_cases/manual_cases/oom_monitor.sh | 4 ++-- + CI/test_cases/manual_cases/security_selinux.sh | 6 +++--- + 10 files changed, 19 insertions(+), 16 deletions(-) + +diff --git a/CI/make-and-install.sh b/CI/make-and-install.sh +index 1498d700..09a68da6 100755 +--- a/CI/make-and-install.sh ++++ b/CI/make-and-install.sh +@@ -95,7 +95,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://hub.oepkgs.net\",\\n \"https://docker.chenby.cn\"" ${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 +@@ -109,4 +109,4 @@ else + fi + make -j $(nproc) + make install +-sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\",\\n \"https://docker.chenby.cn\"" ${builddir}/etc/isulad/daemon.json ++sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\"" ${builddir}/etc/isulad/daemon.json +\ No newline at end of file +diff --git a/CI/test_cases/container_cases/exec_additional_gids.sh b/CI/test_cases/container_cases/exec_additional_gids.sh +index a62ab78c..a5eaf652 100755 +--- a/CI/test_cases/container_cases/exec_additional_gids.sh ++++ b/CI/test_cases/container_cases/exec_additional_gids.sh +@@ -38,13 +38,14 @@ function additional_gids_test() + { + local ret=0 + local runtime=$1 ++ local ubuntu_image="isulad/ubuntu" + test="exec additional gids test => test_exec_additional_gids => $runtime" + + msg_info "${test} starting..." + + isula rm -f `isula ps -a -q` + +- isula run -tid --runtime $runtime -n $cont_name ubuntu bash ++ isula run -tid --runtime $runtime -n $cont_name ${ubuntu_image} bash + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to run container" && ((ret++)) + + isula exec $cont_name bash -c "groupadd --gid $USER_GID $USERNAME \ +diff --git a/CI/test_cases/container_cases/runc_exec.sh b/CI/test_cases/container_cases/runc_exec.sh +index aa7020ee..32553694 100755 +--- a/CI/test_cases/container_cases/runc_exec.sh ++++ b/CI/test_cases/container_cases/runc_exec.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 ec1cbaa5..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="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_load.sh b/CI/test_cases/image_cases/image_load.sh +index d50b3203..8a6c256a 100755 +--- a/CI/test_cases/image_cases/image_load.sh ++++ b/CI/test_cases/image_cases/image_load.sh +@@ -28,6 +28,7 @@ function test_image_load() + { + local ret=0 + local test="isula load image test => (${FUNCNAME[@]})" ++ local ubuntu_image="isulad/ubuntu" + + msg_info "${test} starting..." + +@@ -61,7 +62,7 @@ function test_image_load() + isula load -i $mult_image + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - load image failed: ${mult_image}" && ((ret++)) + +- ubuntu_id=`isula inspect -f '{{.image.id}}' ubuntu` ++ ubuntu_id=`isula inspect -f '{{.image.id}}' ${ubuntu_image}` + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - fail to inspect image: ubuntu" && ((ret++)) + + busybox_id=`isula inspect -f '{{.image.id}}' busybox` +@@ -83,11 +84,12 @@ function test_concurrent_load() + { + local ret=0 + local test="isula load image test => (${FUNCNAME[@]})" ++ local ubuntu_image="isulad/ubuntu" + + msg_info "${test} starting..." + + # clean exist image +- ubuntu_id=`isula inspect -f '{{.image.id}}' ubuntu` ++ ubuntu_id=`isula inspect -f '{{.image.id}}' ${ubuntu_image}` + busybox_id=`isula inspect -f '{{.image.id}}' busybox` + isula rmi $ubuntu_id $busybox_id + +@@ -105,7 +107,7 @@ function test_concurrent_load() + + tail -n 50 /var/lib/isulad/isulad.log + +- ubuntu_id=`isula inspect -f '{{.image.id}}' ubuntu` ++ ubuntu_id=`isula inspect -f '{{.image.id}}' ${ubuntu_image}` + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - fail to inspect image: ubuntu" && ((ret++)) + + top_layer_id=$(isula inspect -f '{{.image.top_layer}}' ${ubuntu_id}) +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 f340348d..6a55706c 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 +diff --git a/CI/test_cases/manual_cases/oom_monitor.sh b/CI/test_cases/manual_cases/oom_monitor.sh +index a1c2503d..8e991cc8 100755 +--- a/CI/test_cases/manual_cases/oom_monitor.sh ++++ b/CI/test_cases/manual_cases/oom_monitor.sh +@@ -26,7 +26,7 @@ test_data_path=$(realpath $curr_path/test_data) + function test_oom_monitor() + { + local ret=0 +- local ubuntu_image="ubuntu" ++ local ubuntu_image="isulad/ubuntu" + local test="container oom monitor test => (${FUNCNAME[@]})" + containername="oommonitor" + +@@ -35,7 +35,7 @@ function test_oom_monitor() + isula pull ${ubuntu_image} + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to pull image: ${ubuntu_image}" && return ${FAILURE} + +- isula images | grep ubuntu ++ isula images | grep ${ubuntu_image} + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - missing list image: ${ubuntu_image}" && ((ret++)) + + # use more than 10m memory limit, otherwise it might fail to run +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.25.1 + diff --git a/0131-modify-alpine-image-source-to-isulad-alpine.patch b/0131-modify-alpine-image-source-to-isulad-alpine.patch new file mode 100644 index 0000000..52f5380 --- /dev/null +++ b/0131-modify-alpine-image-source-to-isulad-alpine.patch @@ -0,0 +1,25 @@ +From c90dab4057f73614537b3765ee06173c55d4d39c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= +Date: Wed, 11 Sep 2024 10:34:48 +0800 +Subject: [PATCH 140/149] modify alpine image source to isulad/alpine + +--- + CI/test_cases/image_cases/integration_check.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CI/test_cases/image_cases/integration_check.sh b/CI/test_cases/image_cases/integration_check.sh +index 6a55706c..f5ae94e9 100755 +--- a/CI/test_cases/image_cases/integration_check.sh ++++ b/CI/test_cases/image_cases/integration_check.sh +@@ -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}') +-- +2.25.1 + diff --git a/0132-update-docs-design-README_zh.md.patch b/0132-update-docs-design-README_zh.md.patch new file mode 100644 index 0000000..cab3794 --- /dev/null +++ b/0132-update-docs-design-README_zh.md.patch @@ -0,0 +1,26 @@ +From a38db853128d0fe1c521829a4f2b17dc08f31aed Mon Sep 17 00:00:00 2001 +From: chen524 +Date: Wed, 11 Sep 2024 04:18:46 +0000 +Subject: [PATCH 141/149] update docs/design/README_zh.md. + +Signed-off-by: chen524 +--- + docs/design/README_zh.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/design/README_zh.md b/docs/design/README_zh.md +index 0f4cf13e..1a23207d 100644 +--- a/docs/design/README_zh.md ++++ b/docs/design/README_zh.md +@@ -37,7 +37,7 @@ + + - 查看 image store 模块的设计文档: [image_store_design](./detailed/Image/image_store_design_zh.md) 。 + +-- 查看 layer store 模块的设计文档 [layer_store_degisn](./detailed/Image/layer_store_degisn_zh.md) 。 ++- 查看 layer store 模块的设计文档: [layer_store_degisn](./detailed/Image/layer_store_degisn_zh.md) 。 + + - 查看 registry 模块的设计文档: [registry_degisn](./detailed/Image/registry_degisn_zh.md) 。 + +-- +2.25.1 + diff --git a/0133-modify-the-image-name-isulad-ubuntu-to-ubuntu.patch b/0133-modify-the-image-name-isulad-ubuntu-to-ubuntu.patch new file mode 100644 index 0000000..faee164 --- /dev/null +++ b/0133-modify-the-image-name-isulad-ubuntu-to-ubuntu.patch @@ -0,0 +1,34 @@ +From 18a8120dfa71b50879b562692013a308b9508224 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= +Date: Wed, 11 Sep 2024 17:03:08 +0800 +Subject: [PATCH 142/149] modify the image name: isulad/ubuntu to ubuntu + +--- + CI/test_cases/image_cases/image_load.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CI/test_cases/image_cases/image_load.sh b/CI/test_cases/image_cases/image_load.sh +index 8a6c256a..8a3fd7b3 100755 +--- a/CI/test_cases/image_cases/image_load.sh ++++ b/CI/test_cases/image_cases/image_load.sh +@@ -28,7 +28,7 @@ function test_image_load() + { + local ret=0 + local test="isula load image test => (${FUNCNAME[@]})" +- local ubuntu_image="isulad/ubuntu" ++ local ubuntu_image="ubuntu" + + msg_info "${test} starting..." + +@@ -84,7 +84,7 @@ function test_concurrent_load() + { + local ret=0 + local test="isula load image test => (${FUNCNAME[@]})" +- local ubuntu_image="isulad/ubuntu" ++ local ubuntu_image="ubuntu" + + msg_info "${test} starting..." + +-- +2.25.1 + diff --git a/0134-ignore-chdir-failed-errmsg-when-kill-and-delete.patch b/0134-ignore-chdir-failed-errmsg-when-kill-and-delete.patch new file mode 100644 index 0000000..cbd8381 --- /dev/null +++ b/0134-ignore-chdir-failed-errmsg-when-kill-and-delete.patch @@ -0,0 +1,116 @@ +From f3a8da522798e68a6ba5e8f00163c4a6d05a30d0 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Wed, 7 Aug 2024 23:44:12 +1400 +Subject: [PATCH 143/149] ignore chdir failed errmsg when kill and delete + +Signed-off-by: zhongtao +--- + .../modules/runtime/isula/isula_rt_ops.c | 44 ++++++++++++++----- + 1 file changed, 32 insertions(+), 12 deletions(-) + +diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c +index 62cff3cf..dc156154 100644 +--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c ++++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c +@@ -69,7 +69,7 @@ + #define RESOURCE_FNAME_FORMATS "%s/resources.json" + + // handle string from stderr output. +-typedef int(*handle_output_callback_t)(const char *output); ++typedef int(*handle_output_callback_t)(const char *output, const char *workdir); + typedef struct { + bool fg; + const char *id; +@@ -757,7 +757,7 @@ static int runtime_call_simple(const char *workdir, const char *runtime, const c + // we consider the runtime call simple succeeded, + // even if the process exit with failure. + if (stderr_msg != NULL && cb != NULL) { +- ret = cb(stderr_msg); ++ ret = cb(stderr_msg, workdir); + } + } + +@@ -768,17 +768,37 @@ static int runtime_call_simple(const char *workdir, const char *runtime, const c + + // oci runtime return -1 if the container 'does not exist' + // if output contains 'does not exist', means nothing to kill or delete, return 0 ++// util_exec_cmd return -1 if chdir failed ++// if output contains 'chdir %s failed', means state dir damaged, return 0 + // this will change the exit status of kill or delete command +-static int non_existent_output_check(const char *output) ++static int shielded_output_check(const char *output, const char *workdir) + { +- char *pattern = "does not exist"; ++ int nret = 0; ++ const char *nonexist_pattern = "does not exist"; ++ char chdir_pattern[PATH_MAX] = { 0 }; + +- if (output == NULL) { ++ if (output == NULL || workdir == NULL) { + return -1; + } + + // container not exist, kill or delete success, return 0 +- if (util_strings_contains_word(output, pattern)) { ++ if (util_strings_contains_word(output, nonexist_pattern)) { ++ return 0; ++ } ++ ++ if (sizeof(chdir_pattern) > PATH_MAX - strlen("chdir ") - strlen(" failed")) { ++ INFO("chdir_pattern is too long"); ++ return -1; ++ } ++ ++ nret = snprintf(chdir_pattern, sizeof(chdir_pattern), "chdir %s failed", workdir); ++ if (nret < 0 || (size_t)nret >= sizeof(chdir_pattern)) { ++ INFO("Failed to make full chdir_pattern"); ++ return -1; ++ } ++ ++ // if output contains 'chdir ${workdir} failed', means state dir damaged, return 0 ++ if (util_strings_contains_word(output, chdir_pattern)) { + return 0; + } + +@@ -786,15 +806,15 @@ static int non_existent_output_check(const char *output) + return -1; + } + +-// kill success or non_existent_output_check succeed return 0, DO_RETRY_CALL will break; ++// kill success or shielded_output_check succeed return 0, DO_RETRY_CALL will break; + // if kill failed, recheck on shim alive, if not alive, kill succeed, still return 0; + // else, return -1, DO_RETRY_CALL will call this again; + static int runtime_call_kill_and_check(const char *workdir, const char *runtime, const char *id) + { + int ret = -1; + +- // kill succeed, return 0; non_existent_output_check succeed, return 0; +- ret = runtime_call_simple(workdir, runtime, "kill", NULL, 0, id, non_existent_output_check); ++ // kill succeed, return 0; shielded_output_check succeed, return 0; ++ ret = runtime_call_simple(workdir, runtime, "kill", NULL, 0, id, shielded_output_check); + if (ret == 0) { + return 0; + } +@@ -814,8 +834,8 @@ static int runtime_call_delete_force(const char *workdir, const char *runtime, c + // if the container does not exist when force deleting it, + // runc will report an error and isulad does not need to retry the deletion again. + // related PR ID:d1a743674a98e23d348b29f52c43436356f56b79 +- // non_existent_output_check succeed, return 0; +- return runtime_call_simple(workdir, runtime, "delete", opts, 1, id, non_existent_output_check); ++ // shielded_output_check succeed, return 0; ++ return runtime_call_simple(workdir, runtime, "delete", opts, 1, id, shielded_output_check); + } + + #define ExitSignalOffset 128 +@@ -1825,7 +1845,7 @@ static int create_resources_json_file(const char *workdir, const shim_client_cgr + } + + // show std error msg, always return -1. +-static int show_stderr(const char *err) ++static int show_stderr(const char *err, const char *workdir) + { + isulad_set_error_message(err); + return -1; +-- +2.25.1 + diff --git a/0135-followlocation-only-not-with-head.patch b/0135-followlocation-only-not-with-head.patch new file mode 100644 index 0000000..2fd2bb0 --- /dev/null +++ b/0135-followlocation-only-not-with-head.patch @@ -0,0 +1,28 @@ +From f526268e2b78330dfe6b63eb5f6ece7417f4c06e Mon Sep 17 00:00:00 2001 +From: jikai +Date: Sat, 27 Apr 2024 14:38:58 +0800 +Subject: [PATCH 144/149] followlocation only not with head + +Signed-off-by: jikai +--- + src/utils/http/http.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/utils/http/http.c b/src/utils/http/http.c +index 8b74f773..c9bb5959 100644 +--- a/src/utils/http/http.c ++++ b/src/utils/http/http.c +@@ -495,7 +495,9 @@ int http_request(const char *url, struct http_get_options *options, long *respon + if (options->resume) { + curl_easy_setopt(curl_handle, CURLOPT_RESUME_FROM_LARGE, (curl_off_t)fsize); + } +- curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L); ++ if (options->with_head == 0) { ++ curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L); ++ } + curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile); + curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, fwrite_file); + } else { +-- +2.25.1 + diff --git a/0136-update-docs-design-detailed-Image-image_storage_driv.patch b/0136-update-docs-design-detailed-Image-image_storage_driv.patch new file mode 100644 index 0000000..7ee7b61 --- /dev/null +++ b/0136-update-docs-design-detailed-Image-image_storage_driv.patch @@ -0,0 +1,28 @@ +From 06dca49eacebb94a6d38de5042e3608bce0e366f Mon Sep 17 00:00:00 2001 +From: Beans +Date: Tue, 24 Sep 2024 03:15:14 +0000 +Subject: [PATCH 145/149] update + docs/design/detailed/Image/image_storage_driver_design_zh.md. This place is + spelled wrong. + +Signed-off-by: Beans +--- + docs/design/detailed/Image/image_storage_driver_design_zh.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/design/detailed/Image/image_storage_driver_design_zh.md b/docs/design/detailed/Image/image_storage_driver_design_zh.md +index ea82df14..9799fc31 100644 +--- a/docs/design/detailed/Image/image_storage_driver_design_zh.md ++++ b/docs/design/detailed/Image/image_storage_driver_design_zh.md +@@ -116,7 +116,7 @@ int graphdriver_cleanup(void) + + ## 3.1 Driver 初始化 + +-Driver 初始化初始化流程: ++Driver 初始化流程: + + ![driver_init](https://images.gitee.com/uploads/images/2020/0327/103821_1d31a134_5226885.png) + Overlay 模块初始化流程: +-- +2.25.1 + diff --git a/0137-upgrade-isulad-compilation-script-install_iSulad_on_.patch b/0137-upgrade-isulad-compilation-script-install_iSulad_on_.patch new file mode 100644 index 0000000..1ee2323 --- /dev/null +++ b/0137-upgrade-isulad-compilation-script-install_iSulad_on_.patch @@ -0,0 +1,77 @@ +From b9b6e5bd6984db8ab33ea1f7d8650113d8c21fd1 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Fri, 27 Sep 2024 17:26:03 +1400 +Subject: [PATCH 146/149] upgrade isulad compilation script + install_iSulad_on_Ubuntu_20_04_LTS + +Signed-off-by: zhongtao +--- + CI/dockerfiles/Dockerfile-ubuntu | 2 +- + .../install_iSulad_on_Ubuntu_20_04_LTS.sh | 26 +++++++++++++++---- + 2 files changed, 22 insertions(+), 6 deletions(-) + +diff --git a/CI/dockerfiles/Dockerfile-ubuntu b/CI/dockerfiles/Dockerfile-ubuntu +index 09a20eb5..6420173a 100644 +--- a/CI/dockerfiles/Dockerfile-ubuntu ++++ b/CI/dockerfiles/Dockerfile-ubuntu +@@ -83,8 +83,8 @@ RUN apt update -y && apt upgrade -y && \ + patch \ + tcpdump + ++RUN apt install -y ninja-build meson + RUN apt install -y libncurses-dev && apt autoremove -y +-RUN pip3 install meson ninja + + RUN echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> /etc/bashrc && \ + echo "export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:$LD_LIBRARY_PATH" >> /etc/bashrc && \ +diff --git a/docs/build_docs/guide/script/install_iSulad_on_Ubuntu_20_04_LTS.sh b/docs/build_docs/guide/script/install_iSulad_on_Ubuntu_20_04_LTS.sh +index f44bddb4..35995ff4 100755 +--- a/docs/build_docs/guide/script/install_iSulad_on_Ubuntu_20_04_LTS.sh ++++ b/docs/build_docs/guide/script/install_iSulad_on_Ubuntu_20_04_LTS.sh +@@ -7,10 +7,25 @@ set -e + export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH + export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH + echo "/usr/local/lib" >> /etc/ld.so.conf +-apt install -y g++ libprotobuf-dev protobuf-compiler protobuf-compiler-grpc libgrpc++-dev libgrpc-dev libtool automake autoconf cmake make pkg-config libyajl-dev zlib1g-dev libselinux1-dev libseccomp-dev libcap-dev libsystemd-dev git libarchive-dev libcurl4-gnutls-dev openssl libdevmapper-dev python3 libtar0 libtar-dev libwebsockets-dev ++ ++ ++if [ ! -e "/etc/timezone" ]; then ++ export TZ=Asia/Shanghai ++ ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ++fi ++ ++apt update -y && apt upgrade -y ++apt install -y g++ systemd libprotobuf-dev protobuf-compiler protobuf-compiler-grpc libgrpc++-dev libgrpc-dev libtool automake autoconf cmake make pkg-config libyajl-dev zlib1g-dev libselinux1-dev libseccomp-dev libcap-dev libsystemd-dev git libarchive-dev libcurl4-gnutls-dev openssl libdevmapper-dev python3 libtar0 libtar-dev libwebsockets-dev ++ ++apt install -y runc ++ ++apt install -y docbook2x ninja-build meson ++apt install -y libncurses-dev + + BUILD_DIR=/tmp/build_isulad + ++git config --global http.sslverify false ++ + rm -rf $BUILD_DIR + mkdir -p $BUILD_DIR + +@@ -18,11 +33,12 @@ mkdir -p $BUILD_DIR + cd $BUILD_DIR + git clone https://gitee.com/src-openeuler/lxc.git + cd lxc ++git config --global --add safe.directory $BUILD_DIR/lxc/lxc-5.0.2 + ./apply-patches +-cd lxc-4.0.3 +-./autogen.sh +-./configure +-make -j $(nproc) ++cd lxc-5.0.2 ++meson setup -Disulad=true \ ++ -Dprefix=/usr build ++meson compile -C build + make install + + # build lcr +-- +2.25.1 + diff --git a/0138-bugfix-for-log-in-make_safedir_is_noexec.patch b/0138-bugfix-for-log-in-make_safedir_is_noexec.patch new file mode 100644 index 0000000..3007930 --- /dev/null +++ b/0138-bugfix-for-log-in-make_safedir_is_noexec.patch @@ -0,0 +1,26 @@ +From d0bfea1f4858672345d1b885bfb9ee1f6072c396 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Sun, 29 Sep 2024 17:22:42 +1400 +Subject: [PATCH 147/149] bugfix for log in make_safedir_is_noexec + +Signed-off-by: zhongtao +--- + src/utils/tar/util_archive.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/utils/tar/util_archive.c b/src/utils/tar/util_archive.c +index 985e0f16..b946dd39 100644 +--- a/src/utils/tar/util_archive.c ++++ b/src/utils/tar/util_archive.c +@@ -219,7 +219,7 @@ static int make_safedir_is_noexec(const char *flock_path, const char *dstdir, ch + } + + if (realpath(isulad_tmpdir_env, cleanpath) == NULL) { +- ERROR("Failed to get real path for %s", isula_tmpdir); ++ SYSERROR("Failed to get real path for %s", isulad_tmpdir_env); + return -1; + } + +-- +2.25.1 + diff --git a/0139-containers-in-paused-state-are-not-allowed-to-start.patch b/0139-containers-in-paused-state-are-not-allowed-to-start.patch new file mode 100644 index 0000000..7e0e549 --- /dev/null +++ b/0139-containers-in-paused-state-are-not-allowed-to-start.patch @@ -0,0 +1,29 @@ +From 5721206da703bf827cd125feb8f9bf518f10f69c Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Mon, 14 Oct 2024 19:27:57 +0800 +Subject: [PATCH 148/149] containers in paused state are not allowed to start + +Signed-off-by: zhongtao +--- + src/daemon/executor/container_cb/execution.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/daemon/executor/container_cb/execution.c b/src/daemon/executor/container_cb/execution.c +index f924a208..2e54f085 100644 +--- a/src/daemon/executor/container_cb/execution.c ++++ b/src/daemon/executor/container_cb/execution.c +@@ -584,6 +584,11 @@ static int container_start_cb(const container_start_request *request, container_ + + if (container_is_running(cont->state)) { + INFO("Container is already running"); ++ if (container_is_paused(cont->state)) { ++ cc = ISULAD_ERR_EXEC; ++ ERROR("cannot start a paused container, try unpause instead"); ++ isulad_set_error_message("cannot start a paused container, try unpause instead"); ++ } + goto pack_response; + } + +-- +2.25.1 + diff --git a/0140-remove-meaningless-code.patch b/0140-remove-meaningless-code.patch new file mode 100644 index 0000000..136e541 --- /dev/null +++ b/0140-remove-meaningless-code.patch @@ -0,0 +1,38 @@ +From e7778ed261d2550ea6e2179b856d0ee22241b858 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Mon, 14 Oct 2024 20:42:58 +0800 +Subject: [PATCH 149/149] remove meaningless code + +Signed-off-by: zhongtao +--- + src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.cc | 1 - + src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.cc b/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.cc +index 56c89c1e..23b620c3 100644 +--- a/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.cc ++++ b/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.cc +@@ -24,7 +24,6 @@ CRIRuntimeServiceImpl::CRIRuntimeServiceImpl(const std::string &podSandboxImage, + , m_containerManager(new ContainerManagerService(cb)) + , m_podSandboxManager(new PodSandboxManagerService(podSandboxImage, cb, pluginManager, enablePodEvents)) + , m_runtimeManager(new RuntimeManagerService(cb, pluginManager)) +- , m_enablePodEvents(enablePodEvents) + { + } + +diff --git a/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h b/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h +index 33539a32..1d399a85 100644 +--- a/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h ++++ b/src/daemon/entry/cri/v1/v1_cri_runtime_service_impl.h +@@ -104,7 +104,6 @@ protected: + private: + std::string m_podSandboxImage; + std::shared_ptr m_pluginManager { nullptr }; +- [[maybe_unused]] bool m_enablePodEvents; + }; + } // namespace CRIV1 + #endif // DAEMON_ENTRY_CRI_V1_CRI_RUNTIME_SERVICE_IMPL_H +-- +2.25.1 + diff --git a/0141-fix-unqualified-call-to-std-move.patch b/0141-fix-unqualified-call-to-std-move.patch new file mode 100644 index 0000000..99cbc93 --- /dev/null +++ b/0141-fix-unqualified-call-to-std-move.patch @@ -0,0 +1,25 @@ +From f7e8abb13d1f1fd4b3c322853c91ef490da7141b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= +Date: Tue, 22 Oct 2024 15:57:55 +0800 +Subject: [PATCH] fix unqualified call to "std::move" + +--- + src/daemon/entry/cri/v1alpha/cri_image_manager_service_impl.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon/entry/cri/v1alpha/cri_image_manager_service_impl.cc b/src/daemon/entry/cri/v1alpha/cri_image_manager_service_impl.cc +index cf636428..a14dc626 100644 +--- a/src/daemon/entry/cri/v1alpha/cri_image_manager_service_impl.cc ++++ b/src/daemon/entry/cri/v1alpha/cri_image_manager_service_impl.cc +@@ -149,7 +149,7 @@ void ImageManagerServiceImpl::list_images_to_grpc(im_list_response *response, + + imagetool_image_summary *element = list_images->images[i]; + conv_image_to_grpc(element, image); +- images.push_back(move(image)); ++ images.push_back(std::move(image)); + } + } + +-- +2.25.1 + diff --git a/iSulad.spec b/iSulad.spec index 6db1f73..e62ad54 100644 --- a/iSulad.spec +++ b/iSulad.spec @@ -1,5 +1,5 @@ %global _version 2.1.5 -%global _release 11 +%global _release 12 %global is_systemd 1 %global enable_criv1 1 %global enable_cdi 1 @@ -132,11 +132,31 @@ Patch0113: 0113-move-shutdown-handle-after-init-module.patch Patch0114: 0114-bugfix-for-null-pointer-reference.patch Patch0115: 0115-bugfix-for-m_criService-shutdown.patch Patch0116: 0116-fix-bug-in-ci-test.patch -Patch0117: 0117-NRI-add-nri-head-file-and-common-func.patch -Patch0118: 0118-skip-calling-cni-plugin-cleanup-when-network-namespa.patch -Patch0119: 0119-nri-add-convert-and-utils-impl-for-nri.patch -Patch0120: 0120-get-realpath-before-ns-mountpoint-verification.patch -Patch0121: 0121-nri-impl-for-nri-plugin-and-adaption.patch +Patch0117: 0117-add-nri-design-doc.patch +Patch0118: 0118-NRI-add-nri-head-file-and-common-func.patch +Patch0119: 0119-skip-calling-cni-plugin-cleanup-when-network-namespa.patch +Patch0120: 0120-nri-add-convert-and-utils-impl-for-nri.patch +Patch0121: 0121-get-realpath-before-ns-mountpoint-verification.patch +Patch0122: 0122-nri-impl-for-nri-plugin-and-adaption.patch +Patch0123: 0123-code-improve-for-codecheck.patch +Patch0124: 0124-change-pull-registry-to-hub.oepkgs.net.patch +Patch0125: 0125-fix-clang-build-error.patch +Patch0126: 0126-add-a-new-registry-to-prevent-missing-mirrors.patch +Patch0127: 0127-change-image-digest-ci-test-for-registry-change.patch +Patch0128: 0128-bugfix-for-ci-make-and-install-shell.patch +Patch0129: 0129-do-not-use-1000-as-the-test-gid-to-prevent-conflicts.patch +Patch0130: 0130-only-use-the-openeuler-mirror-registry-in-ci.patch +Patch0131: 0131-modify-alpine-image-source-to-isulad-alpine.patch +Patch0132: 0132-update-docs-design-README_zh.md.patch +Patch0133: 0133-modify-the-image-name-isulad-ubuntu-to-ubuntu.patch +Patch0134: 0134-ignore-chdir-failed-errmsg-when-kill-and-delete.patch +Patch0135: 0135-followlocation-only-not-with-head.patch +Patch0136: 0136-update-docs-design-detailed-Image-image_storage_driv.patch +Patch0137: 0137-upgrade-isulad-compilation-script-install_iSulad_on_.patch +Patch0138: 0138-bugfix-for-log-in-make_safedir_is_noexec.patch +Patch0139: 0139-containers-in-paused-state-are-not-allowed-to-start.patch +Patch0140: 0140-remove-meaningless-code.patch +Patch0141: 0141-fix-unqualified-call-to-std-move.patch %ifarch x86_64 aarch64 Provides: libhttpclient.so()(64bit) @@ -393,6 +413,12 @@ fi %endif %changelog +* Mon Oct 21 2024 wujichao - 2.1.5-12 +- Type: update +- ID: NA +- SUG: NA +- DESC: combine ten similar submissions into one(0125-fix-clang-build-error.patch) and Upgrade from upstream + * Mon Aug 19 2024 zhongtao - 2.1.5-11 - Type: update - ID: NA -- Gitee