Skip to content

Strengthen release validation assertions and evidence - #178

Merged
overtrue merged 9 commits into
mainfrom
fix/release-validation-oracles
Nov 30, 2026
Merged

overtrue merged 9 commits into
mainfrom
fix/release-validation-oracles

Conversation

@loverustfs

@loverustfs loverustfs commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Check S3 errors, downloaded bytes, COPY metadata, exact key inventories, continuation and checksum-enabled responses. Use local fixtures and portable timestamps.
  • Require operation-specific authorization errors and preserve failures through cleanup. Check neighboring allowed operations and unchanged stored data.
  • Require true convergence predicates. Verify distinct logical site deployments, match the exact latest delete marker, and compare payloads before and after resync.
  • Run the fault matrix in strict mode. Require a passing terminal JSON result for every selected Heal case and report pre-selection blocks separately.
  • Report mixed GET and PUT percentiles. An optional per-round throughput and p99 budget gates measured results. The fleet wrapper verifies the supplied package digest, binaries and service processes before and after measurement.
  • Sample reads, writes and exact readback through the in-place upgrade window. The opt-in gate requires complete successful observations and verifies the running candidate binary against the pinned Debian package on each node.

Verification

  • 65 unit tests passed and one was skipped across S3, security, replication, fault-tolerance and WORM. The new performance budget and upgrade checks passed focused unit tests.
  • 13 Heal mutations covered missing, invalid, blocked, timed-out and duplicate terminal evidence.
  • Seventeen unique S3 case IDs passed on isolated RustFS 1.0.7. S3C-302 passed an independent exact-byte rerun after removing the BSD wc text comparison.
  • A live Warp 1.3.1 mixed 4 KiB round retained all GET and PUT latency percentiles. Reanalysis of that same raw output passed at measured limits and failed when the PUT p99 limit was tightened.
  • The install-window observer performed real S3 reads and write/readbacks against a stable loopback server. It retained a failed verdict after a client deadline. The extended regression suite had subprocess deadline failures on the test host.
  • Shell syntax, workflow parsing and workflow lint passed with existing private runner / temporary-disable diagnostics excluded.

Independent failure domains, a production-shaped performance budget, mixed-version upgrade and rollback need dedicated runs. No workflow enablement or dispatch is part of this PR.

Additional S3 verification on RustFS 1.0.7

The original S3C-305 fixture put the 1 MiB part last and described it as non-final. The revised case submits a genuinely undersized non-final part, checks the exact 400/EntityTooSmall error, and exercises small final and single-part positive controls with byte-exact GETs. The live service rejected the reversed part order with 400/InvalidPartOrder and passed both positive controls. Four fixture regressions cover request shape and verdict propagation.

An independent set of 58 unique release checks yielded 56 passes and two failures. It includes four Object Lock cases and 555 assertions across 19 strict encryption and KMS checks. The 404 NoSuchKey response carried matching request-ID headers but its XML omitted RequestId. The scanner-disabled Veeam capacity endpoint returned 503/ServiceUnavailable; its later authorization stage was not reached. This 58-case set excludes the 17 S3 cases above. S3C-305 is counted once.

Final local regression rerun

All 66 upgrade and performance fixture tests passed in 67.227 seconds at 1aa285f with their original subprocess deadlines. The local fixture used Python 3.13, boto3, the AWS CLI, GNU timeout and Bash 5.3. This supersedes the partial local run above.

The two failing release assertions were repeated on native RustFS ea4c226 on isolated volumes. The missing-object 404 carried the same request ID in the XML, both headers and the request completion log. With the scanner disabled, the authenticated Veeam capacity GET returned 200 on its first attempt and satisfied the capacity, ETag and LastModified assertions. The 75-case totals above describe 1.0.7.

@loverustfs
loverustfs marked this pull request as ready for review November 28, 2026 14:14

@overtrue overtrue left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review comments (based on the latest commit 1aa285fd8f):

The latest commit fixes the previously failing test_sensitive_diagnostics.py, the validation-migration-review.json summary, and the S3C-305 multipart validation. All 9 CI checks are now passing. However, several real defects and operational edge cases remain in the script implementation. I recommend fixing them before merging:

  1. Dual-stack host resolution will always fail (rustfs_performance_test.sh record_performance_candidate):
    • address="$(getent ahosts "${target%:9000}" | awk '$2 == "STREAM" {print $1}' | sort -u)" returns both IPv4 and IPv6 addresses. Whenever the host has dual-stack resolution, the subsequent [[ "${address}" =~ ^[0-9.]+$ ]] check will necessarily fail. Prefer getent ahostsv4, and also add need_cmd getent cmp.
  2. Repository-level variable RUSTFS_WARP_BUDGET_JSON conflicts with the optional package_sha256 (.github/workflows/rustfs-performance-test.yml + rustfs_performance_test.sh step5_benchmark):
    • Whenever the persistent repository variable vars.RUSTFS_WARP_BUDGET_JSON is set, every run exports WARP_BUDGET_FILE. step5_benchmark then requires a 64-character PACKAGE_SHA256 whenever WARP_BUDGET_FILE is present, which will cause all scheduled or nightly runs that do not manually pass package_sha256 to fail.
  3. Remote script paths are unescaped, and service state checks are insufficient (scripts/lib/package_candidate.sh):
    • printf 'pkg="%s"\n' "${package}" interpolates the path into a double-quoted remote script. Use printf 'pkg=%q\n' "${package}" instead so special characters are not interpreted by the remote shell.
    • Checking only that systemctl show --property=MainPID --value rustfs is a positive integer does not rule out activating/deactivating. Also verify ActiveState=active.
  4. Security test assertion and error-code extraction edge cases (rustfs-security-test.sh):
    • case_iam_105_readonly_boundary() calls assert_aws_ok after rm_bucket "${bucket}", which checks the leftover global AWS_CODE from the previous aws_run, not the exit status of rm_bucket itself.
    • aws_error_code() anchors at the start of the line with ^An error occurred ... and does not pipe to | head -1. Prefixed AWS CLI errors (e.g. fatal error: An error occurred (...)) or multi-line errors can miss the match or fail exact comparison.
  5. Minor issues in the upgrade script and regression tests:
    • In stop_upgrade_observation() in rustfs-upgrade-test.sh, write [ -n "${UPGRADE_PROBE_PID:-}" ] so it remains compatible when the script is sourced under set -u. main() added need_cmd cmp but is missing need_cmd timeout.
    • In test_site101() in rustfs-replication-test.sh, keep the original (.sites | length == 2) so a 3-site setup with an empty deploymentID does not pass incorrectly.
    • In the raw string r"""...""" in test_rustfs_upgrade.py, printf '%064d -\\n' should be \n.

@overtrue overtrue left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on commit 147107c. All five items from the previous review have been addressed and verified:

  1. Performance host resolution & budget gating (rustfs_performance_test.sh, .github/workflows/rustfs-performance-test.yml, test_rustfs_performance_testing.py): record_performance_candidate now uses getent ahostsv4, step5_benchmark checks need_cmd getent and need_cmd cmp, run_remote logs to stderr, and the workflow only enables RUSTFS_WARP_BUDGET_FILE when a candidate package SHA-256 is supplied. The unit test now sources rustfs_performance_test.sh directly and covers dual-stack getent ahosts vs ahostsv4.
  2. Remote package verification (scripts/lib/package_candidate.sh, test_rustfs_upgrade.py): verify_running_package_candidate now safely shell-escapes pkg and expected via %q, checks sha256sum < "$pkg", and enforces ActiveState == active alongside MainPID. Regression tests cover special characters in filenames plus activating/deactivating states, and fix the \n escape in the raw test harness.
  3. Security assertions & error parsing (rustfs-security-test.sh, test_rustfs_security.py): case_iam_105_readonly_boundary now invokes aws_run s3api delete-bucket before assert_aws_ok, and aws_error_code matches prefixed/multi-line An error occurred (...) when calling output cleanly.
  4. Upgrade & replication scripts (rustfs-upgrade-test.sh, rustfs-replication-test.sh, test_rustfs_replication.py): stop_upgrade_observation uses ${UPGRADE_PROBE_PID:-}, main() checks both need_cmd cmp and need_cmd timeout, and test_site101 preserves (.sites | length == 2) with regression coverage for 3-site / duplicate IDs.

All 9 CI checks are green and mergeStateStatus is CLEAN.

@overtrue
overtrue merged commit 9568f66 into main Nov 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants