Skip to content

[P2] Resync start/cancel report success for partial operation failures #51

Closed

Description

@Vonng

mcli admin replicate resync start/cancel returns exit code 0 for an HTTP 200 response containing operation failures. The cancel text formatter can additionally print canceled successfully while bucket-level cleanup failures are present.

Confirmed with actual CLI subprocesses against local Admin API fixtures on main at 18ea0a1ae04f69c7ae7c8f8b11329109ae7dcf71; also present in mcli 20261025. Suggested priority: P2. Automation cannot reliably distinguish complete success from a partially applied operation.

Both commands check the request error, print the response, then return nil: start, cancel. Their text formatters only consider the top-level errorDetail.

To reproduce, provide successful preflight responses for GET /minio/admin/v3/site-replication/info (enabled: true, peer deployment ID peer) and GET /minio/admin/v3/info (deploymentID: peer). Run mcli admin replicate resync cancel a b against those fixture aliases and return HTTP 200 from PUT /minio/admin/v3/site-replication/resync/op with:

{
  "op": "cancel",
  "id": "audit",
  "status": "Canceled",
  "buckets": [{
    "bucket": "failed-bucket",
    "status": "",
    "errorDetail": "unable to update replication target"
  }]
}

Observed:

Case Text output JSON output Exit
Partial cancel above Site resync with ID audit canceled successfully. Contains bucket error 0
Partial start: op=start, status=Ongoing, same bucket error, top-level errorDetail="partial failure in starting site resync" Only top-level error; no bucket detail Contains both errors 0
Start/cancel with no errors Normal success message Successful operation response 0

The partial-response fixtures match supported SILO paths: partial start returns a response with nil error, and cancel collects bucket cleanup errors without a top-level errorDetail. Bucket status may be empty; detecting only status == "Failed" will miss these failures.

Impact boundary: current SILO explicitly cancels workers and queued buckets despite configuration cleanup errors. The evidence does not show that replication continues or that cancellation completely failed. The CLI should report that cancellation occurred with incomplete cleanup, and identify affected buckets.

Treat response-level errors as part of the operation result, independently of transport success. Preserve structured response details, surface both top-level and per-bucket errors in human output, and return a nonzero exit code for a partial operation without printing an unconditional success message. A status query successfully reporting a failed task is a different contract and is outside this issue.

Regression acceptance:

  • Start and cancel, each in text and JSON, cover full success, top-level-only failure, bucket-only failure with empty bucket status, and mixed failures.
  • Partial operations retain all available bucket/error details and return nonzero.
  • HTTP/API request failures still produce useful errors and nonzero exit status.
  • Use a CLI subprocess for exit assertions; do not limit coverage to formatter unit tests.
  • Do not retry a partially applied mutation automatically as part of this repair.

Related: #52 covers the separate resync status-query lifecycle and output contract.

Activity

  1. added
    bug
    on Oct 26, 2026
  2. added a commit that references this issue on Nov 3, 2026
    24eb117
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions