diff --git a/docs/en/samples/cacheruntime/curvine_cache_runtime.md b/docs/en/samples/cacheruntime/curvine_cache_runtime.md index 8d699c579c5..f5f27f66c29 100644 --- a/docs/en/samples/cacheruntime/curvine_cache_runtime.md +++ b/docs/en/samples/cacheruntime/curvine_cache_runtime.md @@ -217,12 +217,18 @@ topology: - -c - /app/curvine/mountUfs.sh timeout: 120 + reportSummary: + command: + - bash + - -c + - /app/curvine/reportSummary.sh + timeout: 30 template: spec: restartPolicy: Always containers: - name: master - image: curvine/curvine-fluid:latest + image: curvine/curvine:0.3.6-alpha command: - /entrypoint.sh args: @@ -248,7 +254,7 @@ topology: restartPolicy: Always containers: - name: worker - image: curvine/curvine-fluid:latest + image: curvine/curvine:0.3.6-alpha command: - /entrypoint.sh args: @@ -272,7 +278,7 @@ topology: restartPolicy: Always containers: - name: client - image: curvine/curvine-fluid:latest + image: curvine/curvine:0.3.6-alpha command: - /entrypoint.sh args: @@ -304,7 +310,7 @@ $ kubectl create -f cacheruntimeclass.yaml Key sections: - **`fileSystemType`**: Identifies this as a Curvine filesystem (`curvinefs`) - **`dataOperationSpecs`**: Defines how DataLoad operations execute — generates config, then uses the `cv` CLI to preload data from the UFS into Curvine -- **`topology.master`**: Curvine master node with headless service, readiness probe on RPC port 8995, and a MountUFS script +- **`topology.master`**: Curvine master node with headless service, readiness probe on RPC port 8995, a MountUFS script, and a reportSummary script (for generating cache summary reports) - **`topology.worker`**: Curvine worker nodes with readiness probe on port 8997 - **`topology.client`**: FUSE client DaemonSet running in privileged mode, with graceful pre-stop unmount cleanup @@ -583,4 +589,4 @@ $ kubectl delete -f cacheruntime.yaml $ kubectl delete -f cacheruntimeclass.yaml $ kubectl delete -f minio.yaml $ kubectl delete -f minio_create_bucket.yaml -``` +``` \ No newline at end of file diff --git a/docs/zh/samples/cacheruntime/curvine_cache_runtime.md b/docs/zh/samples/cacheruntime/curvine_cache_runtime.md index aecdf47104b..93e5f03b6a9 100644 --- a/docs/zh/samples/cacheruntime/curvine_cache_runtime.md +++ b/docs/zh/samples/cacheruntime/curvine_cache_runtime.md @@ -217,12 +217,18 @@ topology: - -c - /app/curvine/mountUfs.sh timeout: 120 + reportSummary: + command: + - bash + - -c + - /app/curvine/reportSummary.sh + timeout: 30 template: spec: restartPolicy: Always containers: - name: master - image: curvine/curvine-fluid:latest + image: curvine/curvine:0.3.6-alpha command: - /entrypoint.sh args: @@ -248,7 +254,7 @@ topology: restartPolicy: Always containers: - name: worker - image: curvine/curvine-fluid:latest + image: curvine/curvine:0.3.6-alpha command: - /entrypoint.sh args: @@ -272,7 +278,7 @@ topology: restartPolicy: Always containers: - name: client - image: curvine/curvine-fluid:latest + image: curvine/curvine:0.3.6-alpha command: - /entrypoint.sh args: @@ -304,7 +310,7 @@ $ kubectl create -f cacheruntimeclass.yaml 关键部分说明: - **`fileSystemType`**: 标识此为 Curvine 文件系统(`curvinefs`) - **`dataOperationSpecs`**: 定义 DataLoad 操作的执行方式——生成配置文件,然后使用 `cv` CLI 从 UFS 预热数据到 Curvine -- **`topology.master`**: Curvine master 节点,包含 Headless Service、8995 端口的就绪探针和 MountUFS 脚本 +- **`topology.master`**: Curvine master 节点,包含 Headless Service、8995 端口的就绪探针、MountUFS 脚本和 reportSummary 脚本(用于生成缓存摘要报告) - **`topology.worker`**: Curvine worker 节点,包含 8997 端口的就绪探针 - **`topology.client`**: FUSE 客户端 DaemonSet,以特权模式运行,包含优雅的 pre-stop 卸载清理逻辑 @@ -583,4 +589,4 @@ $ kubectl delete -f cacheruntime.yaml $ kubectl delete -f cacheruntimeclass.yaml $ kubectl delete -f minio.yaml $ kubectl delete -f minio_create_bucket.yaml -``` +``` \ No newline at end of file diff --git a/test/gha-e2e/curvine/cacheruntimeclass.yaml b/test/gha-e2e/curvine/cacheruntimeclass.yaml index 98b0fcf6840..432bf772006 100644 --- a/test/gha-e2e/curvine/cacheruntimeclass.yaml +++ b/test/gha-e2e/curvine/cacheruntimeclass.yaml @@ -44,12 +44,18 @@ topology: - -c - /app/curvine/mountUfs.sh timeout: 120 + reportSummary: + command: + - bash + - -c + - /app/curvine/reportSummary.sh + timeout: 30 template: spec: restartPolicy: Always containers: - name: master - image: curvine/curvine:v0.3.5-alpha + image: curvine/curvine:v0.3.6-alpha command: - /entrypoint.sh args: @@ -75,7 +81,7 @@ topology: restartPolicy: Always containers: - name: worker - image: curvine/curvine:v0.3.5-alpha + image: curvine/curvine:v0.3.6-alpha command: - /entrypoint.sh args: @@ -99,7 +105,7 @@ topology: restartPolicy: Always containers: - name: client - image: curvine/curvine:v0.3.5-alpha + image: curvine/curvine:v0.3.6-alpha command: - /entrypoint.sh args: diff --git a/test/gha-e2e/curvine/test.sh b/test/gha-e2e/curvine/test.sh index ba54bd338b7..e797f13b9aa 100644 --- a/test/gha-e2e/curvine/test.sh +++ b/test/gha-e2e/curvine/test.sh @@ -374,6 +374,14 @@ function wait_runtime_deleted() { syslog "PV/PVC cleaned up successfully" } +function check_dataset_cache_state() { + local cache_capacity + cache_capacity=$(kubectl get dataset ${dataset_name} -o jsonpath='{.status.cacheStates.cacheCapacity}' 2>/dev/null) + if [[ -z "$cache_capacity" ]]; then + panic "cache_capacity is empty, report summary failed." + fi +} + function main() { syslog "[TESTCASE $testname STARTS AT $(date)]" trap dump_env_and_clean_up EXIT @@ -383,6 +391,9 @@ function main() { create_reference_dataset wait_reference_dataset_bound wait_cache_worker_ready + + check_dataset_cache_state + create_job test/gha-e2e/curvine/write_job.yaml $write_job_name wait_job_completed $write_job_name create_dataload @@ -412,3 +423,5 @@ function main() { } main + +