mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-05 11:37:44 +01:00
Pinner wired to real retention: - NewPinner calls vol.SetV2RetentionFloor(p.MinWALRetentionFloor) - Flusher.RetentionFloorFn() / SetRetentionFloorFn() exposed - SetV2RetentionFloor chains with existing shipper retention floor - Holds actually prevent WAL reclaim (not just tracked state) Executor uses real WAL scan: - BlockVol.ScanWALEntries(fromLSN, callback) wraps wal.ScanFrom with real fd, walOffset, checkpointLSN - Executor.StreamWALEntries uses ScanWALEntries (not stub) - Reads real WAL entries, tracks highest LSN scanned CommittedLSN mapping: - Explicitly documented as interim V1 model (committed = checkpointed) - Will diverge when V2 distributed commit separates from local flush Carry-forward: - TransferSnapshot/TransferFullBase/TruncateWAL: stubs (need extent I/O) - Control intent from confirmed failover: deferred Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
182 lines
4.3 KiB
YAML
182 lines
4.3 KiB
YAML
name: p0-validation
|
|
timeout: 5m
|
|
|
|
env:
|
|
master_url: "http://192.168.1.184:9433"
|
|
volume_name: p0-test
|
|
vol_size: "2147483648"
|
|
|
|
topology:
|
|
nodes:
|
|
m01:
|
|
host: 192.168.1.181
|
|
user: testdev
|
|
key: "/opt/work/testdev_key"
|
|
m02:
|
|
host: 192.168.1.184
|
|
user: testdev
|
|
key: "/opt/work/testdev_key"
|
|
|
|
phases:
|
|
# P0-1: Auto cleanup on both nodes
|
|
- name: cleanup
|
|
actions:
|
|
- action: pre_run_cleanup
|
|
node: m01
|
|
kill_patterns: "weed,postgres"
|
|
unmount: "/mnt/sw-bench"
|
|
nvme_disconnect: "true"
|
|
iscsi_logout_prefix: "iqn.2024-01.com.seaweedfs"
|
|
|
|
- action: pre_run_cleanup
|
|
node: m02
|
|
kill_patterns: "weed"
|
|
|
|
# Start cluster
|
|
- name: cluster
|
|
actions:
|
|
- action: exec
|
|
node: m02
|
|
cmd: "rm -rf /tmp/p0-master /tmp/p0-vs1 && mkdir -p /tmp/p0-master /tmp/p0-vs1/blocks"
|
|
root: "true"
|
|
|
|
- action: start_weed_master
|
|
node: m02
|
|
port: "9433"
|
|
dir: /tmp/p0-master
|
|
save_as: master_pid
|
|
|
|
- action: sleep
|
|
duration: 3s
|
|
|
|
- action: start_weed_volume
|
|
node: m02
|
|
port: "18480"
|
|
master: "localhost:9433"
|
|
dir: /tmp/p0-vs1
|
|
extra_args: "-block.dir=/tmp/p0-vs1/blocks -block.listen=:3295 -block.nvme.enable=true -block.nvme.listen=10.0.0.3:4430 -ip=192.168.1.184"
|
|
save_as: vs1_pid
|
|
|
|
- action: sleep
|
|
duration: 3s
|
|
|
|
- action: wait_cluster_ready
|
|
node: m02
|
|
master_url: "{{ master_url }}"
|
|
|
|
- action: wait_block_servers
|
|
count: "1"
|
|
|
|
- name: create
|
|
actions:
|
|
- action: create_block_volume
|
|
name: "{{ volume_name }}"
|
|
size_bytes: "{{ vol_size }}"
|
|
replica_factor: "1"
|
|
durability_mode: best_effort
|
|
|
|
- action: sleep
|
|
duration: 2s
|
|
|
|
# P0-1: benchmark_report (self-describing header)
|
|
- name: report
|
|
actions:
|
|
- action: benchmark_report
|
|
volume_name: "{{ volume_name }}"
|
|
protocol: nvme-tcp
|
|
client_node: m01
|
|
|
|
# P0-2: nvme_connect_direct with device discovery
|
|
- name: connect
|
|
actions:
|
|
- action: nvme_connect_direct
|
|
node: m01
|
|
target_addr: "10.0.0.3"
|
|
target_port: "4430"
|
|
nqn: "nqn.2024-01.com.seaweedfs:vol.{{ volume_name }}"
|
|
expected_size: "2G"
|
|
save_as: device
|
|
|
|
- action: print
|
|
msg: "Device: {{ device }}"
|
|
|
|
# P0-4: exec with root compound commands (sudo sh -c wrapping)
|
|
- name: mkfs-mount
|
|
actions:
|
|
- action: exec
|
|
node: m01
|
|
cmd: "mkfs.ext4 -F -E nodiscard {{ device }} && mkdir -p /mnt/sw-bench && mount -o nodiscard {{ device }} /mnt/sw-bench && echo MOUNTED"
|
|
root: "true"
|
|
save_as: mount_result
|
|
|
|
- action: assert_contains
|
|
actual: "{{ mount_result }}"
|
|
expected: "MOUNTED"
|
|
|
|
# P0-1: benchmark_preflight (validate mount + device)
|
|
- name: preflight
|
|
actions:
|
|
- action: benchmark_preflight
|
|
node: m01
|
|
volume_name: "{{ volume_name }}"
|
|
mount_path: /mnt/sw-bench
|
|
device: "{{ device }}"
|
|
|
|
# P0-3: fio with time_based (already fixed in action)
|
|
- name: fio
|
|
actions:
|
|
- action: fio_json
|
|
node: m01
|
|
device: "{{ device }}"
|
|
rw: randwrite
|
|
bs: 4k
|
|
iodepth: "32"
|
|
runtime: "10"
|
|
save_as: fio_result
|
|
|
|
- action: fio_parse
|
|
json_var: fio_result
|
|
metric: iops
|
|
direction: write
|
|
save_as: write_iops
|
|
|
|
- action: print
|
|
msg: "Write IOPS: {{ write_iops }}"
|
|
|
|
- action: assert_greater
|
|
actual: "{{ write_iops }}"
|
|
threshold: "1000"
|
|
|
|
# P0-1: benchmark_postcheck
|
|
- name: postcheck
|
|
actions:
|
|
- action: benchmark_postcheck
|
|
node: m01
|
|
volume_name: "{{ volume_name }}"
|
|
mount_path: /mnt/sw-bench
|
|
device: "{{ device }}"
|
|
save_as: postcheck
|
|
|
|
- action: print
|
|
msg: "Postcheck: {{ postcheck }}"
|
|
|
|
# Cleanup
|
|
- name: teardown
|
|
always: true
|
|
actions:
|
|
- action: pre_run_cleanup
|
|
node: m01
|
|
kill_patterns: "postgres"
|
|
unmount: "/mnt/sw-bench"
|
|
nvme_disconnect: "true"
|
|
|
|
- action: stop_weed
|
|
node: m02
|
|
pid: "{{ vs1_pid }}"
|
|
ignore_error: true
|
|
|
|
- action: stop_weed
|
|
node: m02
|
|
pid: "{{ master_pid }}"
|
|
ignore_error: true
|