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
8 changes: 3 additions & 5 deletions .github/workflows/rustfs-fault-tolerance-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,13 @@ jobs:
- name: Run matrix sweep (topology x EC outage combinations)
timeout-minutes: 350
id: test
# No continue-on-error: an UNEXPECTED verdict (a probe that should
# fail by quorum math but passes, or vice versa) is the finding this
# sweep exists to surface, and the red run is the signal until matrix
# runs get backlog integration like the scenario suite has.
# Gate on every probe matching the quorum model, including known
# divergences. The report below still retains every verdict.
env:
MATRIX_EC: ${{ inputs.matrix_ec }}
run: |
set -euo pipefail
ARGS=(--matrix -y --package-url "${{ inputs.package_url || env.RUSTFS_NIGHTLY_PACKAGE_URL }}" --log-file "${LOG_FILE}" --results-file "${RESULTS_FILE}")
ARGS=(--matrix --strict -y --package-url "${{ inputs.package_url || env.RUSTFS_NIGHTLY_PACKAGE_URL }}" --log-file "${LOG_FILE}" --results-file "${RESULTS_FILE}")
if [ -n "${{ inputs.matrix_topo }}" ]; then
# Trailing value form: consumed as `--matrix-topo <topo> [ec]`.
ARGS+=(--matrix-topo "${{ inputs.matrix_topo }}")
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/rustfs-performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
description: 'Direct .deb URL (nightly/R2). Defaults to the latest nightly deb.'
required: false
type: string
package_sha256:
description: SHA-256 of the candidate Debian package (enables the configured performance budget)
required: false
type: string
test_method:
description: 'Benchmark method(s) to run (manual runs only; "all" = GET+PUT+MIXED)'
type: choice
Expand Down Expand Up @@ -111,6 +115,7 @@ jobs:
runs-on: pf-testing
timeout-minutes: 900
env:
RUSTFS_PACKAGE_SHA256: ${{ inputs.package_sha256 }}
RUSTFS_BENCH_SCRIPT: ${{ github.workspace }}/rustfs_performance_testing.sh
RUSTFS_WARP_METHODS: ${{ inputs.test_method }}
RUSTFS_WARP_SIZES: ${{ inputs.object_size }}
Expand Down Expand Up @@ -194,7 +199,15 @@ jobs:

- name: Run benchmark (GET/PUT/MIXED)
id: benchmark
env:
PERFORMANCE_BUDGET_JSON: ${{ vars.RUSTFS_WARP_BUDGET_JSON }}
run: |
if [ -n "${PERFORMANCE_BUDGET_JSON}" ] && [ -n "${RUSTFS_PACKAGE_SHA256:-${PACKAGE_SHA256:-}}" ]; then
export RUSTFS_WARP_BUDGET_FILE="${FUNCTIONAL_ARTIFACTS_DIR}/performance-budget.json"
printf '%s\n' "${PERFORMANCE_BUDGET_JSON}" > "${RUSTFS_WARP_BUDGET_FILE}"
elif [ -n "${PERFORMANCE_BUDGET_JSON}" ]; then
echo "::notice::Collecting metrics without a budget because no candidate package SHA-256 was supplied."
fi
./rustfs_performance_test.sh \
--step 5 -y \
--log-file "${LOG_FILE}"
Expand Down Expand Up @@ -321,6 +334,8 @@ jobs:
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/report.md
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/suite.log
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/version.txt
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/performance-budget*.json
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/candidate-*.tsv
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/master.log
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/summary.md
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/summary.tsv
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/rustfs-upgrade-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ on:
description: 'NEW .deb URL. Overrides to_version / nightly default.'
required: false
type: string
to_sha256:
description: SHA-256 of the candidate Debian package
required: false
type: string
require_upgrade_availability:
description: Require successful sampled I/O and verify each running candidate
type: boolean
default: false
topology:
description: 'Topology to run (all = SNSD, SNMD, MNMD)'
type: choice
Expand Down Expand Up @@ -164,6 +172,8 @@ jobs:
# Collect reports and backlog evidence before the final suite verdict.
continue-on-error: true
env:
INPUT_TO_SHA256: ${{ inputs.to_sha256 }}
REQUIRE_UPGRADE_AVAILABILITY: ${{ inputs.require_upgrade_availability }}
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
run: |
set -euo pipefail
Expand All @@ -175,6 +185,12 @@ jobs:
TOPOLOGY='${{ inputs.topology }}'
BACKENDS='${{ inputs.backends }}'
ARGS=(-y --log-file "${LOG_FILE}" --artifacts-dir "${FUNCTIONAL_ARTIFACTS_DIR}/upgrade")
if [ -n "${INPUT_TO_SHA256}" ]; then
ARGS+=(--sha256-to "${INPUT_TO_SHA256}")
fi
if [ "${REQUIRE_UPGRADE_AVAILABILITY}" = true ]; then
ARGS+=(--require-upgrade-availability)
fi
if [ "${TOPOLOGY}" = "all" ] || [ -z "${TOPOLOGY}" ] || [ "${TOPOLOGY}" = "null" ]; then
ARGS+=(--all-topologies)
else
Expand Down Expand Up @@ -285,6 +301,11 @@ jobs:
cat "${MATRIX_TABLE}"
echo ""
fi
echo "## Sampled install-window I/O"
echo '~~~text'
grep -E '^\[UPG-AVAILABILITY\]' "${LOG_FILE}" || echo "No install-window observations recorded."
echo '~~~'
echo ""
if [ -s "${CASE_TABLE}" ]; then
cat "${CASE_TABLE}"
echo ""
Expand Down
58 changes: 31 additions & 27 deletions .github/workflows/rustfs-validation-heal-sweep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,29 +361,23 @@ jobs:
"${AUTO_TESTING_SHA}" "${HEAL_ROOT}/run" \
< /dev/null \
> "${HEAL_ROOT}/results/${CASE_ID//\//_}.log" 2>&1 || rc=$?
# The case verdict is authoritative from the result JSON: drivers
# may self-report BLOCKED (diagnostic gates) with a nonzero exit;
# only FAIL / INFRA_ERROR / TIMEOUT keep the sweep red.
# Terminal verdict lives at run/<case>/cases/<case>.json
# (run_validation_case.sh passes --validation-artifacts-dir
# run/<case>; the heal runner appends cases/<case>.json).
# Keep the runner's terminal receipt even when the runner fails.
VERDICT=""
RESULT_JSON="${HEAL_ROOT}/run/${CASE_ID}/cases/${CASE_ID}.json"
if [ -f "${RESULT_JSON}" ]; then
VERDICT="$(jq -r '.verdict // empty' "${RESULT_JSON}" 2>/dev/null || true)"
VERDICT="$(jq -er --arg case_id "${CASE_ID}" '
select(.schema_version == 1 and .case_id == $case_id)
| .verdict | strings
' "${RESULT_JSON}" 2>/dev/null || true)"
cp "${RESULT_JSON}" "${HEAL_ROOT}/results/${CASE_ID//\//_}.result.json" 2>/dev/null || true
fi
# The terminal verdict is authoritative when present; otherwise
# trust the runner exit code (rc=0 with no verdict was recorded
# as FAIL before this fix — smoke run 41748362310).
STATUS="FAIL"
if [ "${VERDICT}" = "PASS" ] || { [ -z "${VERDICT}" ] && [ "${rc}" -eq 0 ]; }; then
STATUS="PASS"
elif [ "${VERDICT}" = "BLOCKED" ]; then
STATUS="BLOCKED"
elif [ "${rc}" -eq 124 ]; then
STATUS="TIMEOUT"
fi
case "${rc}:${VERDICT}" in
124:*) STATUS=TIMEOUT ;;
0:PASS) STATUS=PASS ;;
*:BLOCKED) STATUS=BLOCKED ;;
*:FAIL) STATUS=FAIL ;;
*) STATUS=INFRA_ERROR ;;
esac
printf '%s\t%s\n' "${CASE_ID}" "${STATUS}" >> "${HEAL_ROOT}/results.txt"
echo "case ${CASE_ID}: ${STATUS} (rc=${rc} verdict=${VERDICT:-none})"
if [ -f "${HEAL_ROOT}/run/report.md" ]; then
Expand Down Expand Up @@ -428,6 +422,10 @@ jobs:
rows.append((case_id, module_of.get(case_id, "heal"), status))
passed = sum(1 for _, _, s in rows if s == "PASS")
failed = sum(1 for _, _, s in rows if s == "FAIL")
infra_errors = sum(1 for _, _, s in rows if s == "INFRA_ERROR")
selected = (root / "heal-cases.txt").read_text().split()
reported = {case_id for case_id, _, _ in rows}
missing = [case_id for case_id in selected if case_id not in reported]
timed_out = sum(1 for _, _, s in rows if s == "TIMEOUT")
blocked = (root / "blocked-cases.txt").read_text().split()
pinned = (root / "pinned-cases.txt").read_text().split()
Expand Down Expand Up @@ -470,14 +468,19 @@ jobs:
report += [f"- {c}: BLOCKED" for c in pinned]
report += [
"", "## Totals", "",
f"- Total: {len(rows)}",
f"- Selected: {len(selected)}",
f"- Reported: {len(rows)}",
f"- Missing: {len(missing)}",
f"- PASS: {passed}",
f"- FAIL: {failed}",
f"- INFRA_ERROR: {infra_errors}",
f"- TIMEOUT: {timed_out}",
f"- BLOCKED: {len(blocked) + len(pinned) + sum(1 for _, _, s in rows if s == 'BLOCKED')}", "",
"Failing cases keep this workflow red only as a report; the sweep artifact",
"retains every case log and per-case report for diagnosis.", "",
f"- BLOCKED among selected: {sum(1 for _, _, s in rows if s == 'BLOCKED')}",
f"- BLOCKED before selection: {len(blocked) + len(pinned)}", "",
"Every selected case must pass. The sweep artifact retains case logs and per-case reports.", "",
]
if missing:
report += ["## Missing case results", "", *[f"- {c}" for c in missing], ""]
(root / "report.md").write_text("\n".join(report))
(root / "cases.md").write_text("\n".join(f"| {c} | {m} | {s} |" for c, m, s in rows) + "\n")
PY
Expand Down Expand Up @@ -567,8 +570,9 @@ jobs:
HEAL_ROOT: ${{ runner.temp }}/validation-heal
run: |
set -euo pipefail
if grep -qE $'\t(FAIL|TIMEOUT)$' "${HEAL_ROOT}/results.txt"; then
echo "validation heal sweep has failing or timed-out cases:"
grep -E $'\t(FAIL|TIMEOUT)$' "${HEAL_ROOT}/results.txt"
exit 1
fi
test -s "${HEAL_ROOT}/heal-cases.txt"
cut -f1 "${HEAL_ROOT}/results.txt" | diff -u "${HEAL_ROOT}/heal-cases.txt" -
awk -F '\t' '
NF != 2 || $2 != "PASS" { print "selected heal case did not pass: " $0; invalid = 1 }
END { exit invalid }
' "${HEAL_ROOT}/results.txt"
4 changes: 3 additions & 1 deletion .github/workflows/s3-script-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- test_rustfs_s3_usage.py
- test_rustfs_s3_signing.py
- test_rustfs_s3_regressions.py
- test_rustfs_s3c305.py
- scripts/s3_bulk_delete_regressions.py
- scripts/s3_bulk_delete_keys.py
- scripts/performance_s3.py
Expand Down Expand Up @@ -40,6 +41,7 @@ on:
- test_rustfs_s3_usage.py
- test_rustfs_s3_signing.py
- test_rustfs_s3_regressions.py
- test_rustfs_s3c305.py
- scripts/s3_bulk_delete_regressions.py
- scripts/s3_bulk_delete_keys.py
- scripts/performance_s3.py
Expand Down Expand Up @@ -81,7 +83,7 @@ jobs:
- name: Install independent SigV4 verifier
run: python3 -m pip install botocore==1.43.19 'boto3>=1.43.19,<1.43.20'
- name: Test S3 cases and signatures without a cluster
run: python3 -B -m unittest test_rustfs_s3_usage.py test_rustfs_s3_signing.py test_rustfs_s3_regressions.py test_rustfs_worm_object_lock.py test_s3_bulk_delete_regressions.py test_s3_bulk_delete_keys.py test_s3_bulk_delete_observations.py test_sse_contract_cases.py
run: python3 -B -m unittest test_rustfs_s3_usage.py test_rustfs_s3_signing.py test_rustfs_s3_regressions.py test_rustfs_s3c305.py test_rustfs_worm_object_lock.py test_s3_bulk_delete_regressions.py test_s3_bulk_delete_keys.py test_s3_bulk_delete_observations.py test_sse_contract_cases.py
- name: Test standalone S3 probe oracles
run: python3 -B -m unittest test_heal_timeout_followup.py test_mrf_long_root_refresh.py test_scanner_prefix_usage_invalidation.py test_s3_request_id_parity.py test_s3_upload_part_timeout.py test_s3_veeam_sosapi_capacity.py
- name: Test validation S3 round trip without a cluster
Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,33 @@ per-key failures, request ids, GET results and residue before/after cleanup.
Cleanup runs in `finally`; an incomplete cleanup aborts the remaining cases.
The caller must hold the environment's test lock throughout this probe.

Set `WARP_BUDGET_FILE` to compare measured throughput and p99 latency against
limits approved for a candidate workload. Supply an entry for each selected
`method/size`. Each entry requires `min_obj_per_s` and the relevant
`max_get_p99_ms` or `max_put_p99_ms`. Mixed rounds require both p99 limits.
Mixed output includes separate GET and PUT p50, p90 and p99. A missing or
exceeded budget fails the affected run. The runner retains the supplied budget
with its artifacts and reuses it for `--parse-only`. An invocation without a
budget reports execution and captures metrics. Run the fleet wrapper
`rustfs_performance_test.sh` with `RUSTFS_WARP_BUDGET_FILE` and a package
SHA-256 to verify the direct Warp targets and running services before and
after measurement. When a dispatch input or chain manifest supplies the package
SHA-256, the performance workflow applies the `RUSTFS_WARP_BUDGET_JSON`
repository variable and retains both candidate receipts. Runs without a
package SHA-256 report metrics only.

### In-place upgrade observation

`rustfs-upgrade-test.sh` records sampled baseline reads and write/readbacks
during package installation and service restart in `upgrade-observations.tsv`.
Use `--require-upgrade-availability --sha256-to <digest>` to require successful
samples and compare the binary of each running service with its verified
candidate package. The strict check requires at least two complete samples. Set
`RUSTFS_UPGRADE_PROBE_TIMEOUT_SECONDS` to adjust the per-request deadline
(default 15 seconds).
A pass covers sampled I/O during this installation. Mixed-version compatibility,
uninterrupted availability between samples and rollback need dedicated runs.

## UploadPart client-read timeout

Run the `upload-part-client-read-timeout` case with `python3 scripts/s3_upload_part_timeout.py --rustfs-bin /absolute/path/to/rustfs` with Python 3 and `boto3>=1.36,<2`. The runner starts one RustFS process on loopback with a temporary volume and a two-second request-body idle timeout. A signed UploadPart sends a prefix and keeps the connection open until the server answers HTTP 400 with S3 code `RequestTimeout`. A complete HTTP request carrying fewer S3 bytes than declared must return HTTP 400 with `IncompleteBody`. ListParts checks that the timeout left the slot empty and the short overwrite preserved the retry's ETag and size. Completing the upload and reading the object verifies the retry bytes.
Expand Down
Loading