Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions docs/en/samples/cacheruntime/curvine_cache_runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
```
```
16 changes: 11 additions & 5 deletions docs/zh/samples/cacheruntime/curvine_cache_runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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 卸载清理逻辑

Expand Down Expand Up @@ -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
```
```
12 changes: 9 additions & 3 deletions test/gha-e2e/curvine/cacheruntimeclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions test/gha-e2e/curvine/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,14 @@
syslog "PV/PVC cleaned up successfully"
}

function check_dataset_cache_state() {

Check warning on line 377 in test/gha-e2e/curvine/test.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add an explicit return statement at the end of the function.

See more on https://sonarcloud.io/project/issues?id=fluid-cloudnative_fluid&issues=AZ-AMxz1nxEDSIvE7Oql&open=AZ-AMxz1nxEDSIvE7Oql&pullRequest=6130
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
}
Comment thread
xliuqq marked this conversation as resolved.

function main() {
syslog "[TESTCASE $testname STARTS AT $(date)]"
trap dump_env_and_clean_up EXIT
Expand All @@ -383,6 +391,9 @@
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
Expand Down Expand Up @@ -412,3 +423,5 @@
}

main


Loading