Test a protection group
POST/v1/protection-groups/:id/test
Proves that the group could be recovered here, in the region that holds its standby copy, without touching the group, its project or the workload at home. Under a test policy, the run builds an isolated network in the policy's operator project and proves it has no way out: no router, gateway or name servers, and, from a jump host inside it, none of the policy's isolation canaries reachable. It then restores copies of the members from their newest backups adopted here, or clones their standbys, onto that network, boots them tier by tier in boot order, and checks each tier's health from the jump host before the next. The time from admission to the last member healthy is the run's measured.rto_seconds, which the group's measured protection reports. The result is recorded in the repository for the group's home to read, and everything the test built is torn down; what it built also expires at the policy's max_duration even if the run is gone. The group is testing while the run is active and returns to the state it was in when it ends; its custody never changes.
With dry_run=true the request answers 200 with the plan the run would follow and starts nothing. Otherwise it answers 202 with the admitted run; follow it at GET /v1/protection-groups/{id}/runs/{run_id}. Everything that would refuse the run is checked before it is admitted, and again by the run itself before it acts. A refusal about members names each in fields as members.<instance id>. A registration with a test cadence is also tested on its own when a test falls due.
A test of a group at its home and of the hot rung are refused in this release.
Any member of the project the token is scoped to.
Request
Responses
- 200
- 202
- 400
- 401
- 403
- 404
- 409
- 413
- 415
- 422
- 503
- default
OK.
With dry_run=true, the plan the run would follow. Nothing was started.
Accepted
Bad Request.
invalid_request: The body is not a single JSON object, names a field this operation does not take, or gives a value of the wrong type.
Unauthorized.
unauthenticated: The token is missing, expired or not valid.
Forbidden.
forbidden: The token may not test this group.
Not Found.
not_found: No group with this id exists in the token's project.
group_document_not_found: The group's repository no longer shows the document its home writes.
Conflict.
group_busy: A run is acting on the group.
custody_not_standby: This region does not hold the group's standby copy, because its custody here is active or released.
split_brain_risk: The group is in split_brain_risk, which only a resync or an acknowledgement clears.
Request Entity Too Large.
body_too_large: The body is larger than the service accepts.
Unsupported Media Type.
unsupported_media_type: The body is not sent as application/json.
Unprocessable Entity.
validation_failed: bubble_policy_id is not a UUID.
bubble_policy_required: Neither the request nor the group's registration names a test policy, or the one named does not exist.
bubble_policy_has_no_project: The test policy names no operator project to build in.
bubble_policy_invalid: The test policy cannot build an isolated network as it stands, such as one with no address range or no maximum duration.
check_not_permitted: A member's health check type is not among the test policy's permitted_checks.
no_probe_origin: Members declare health checks or the policy names isolation canaries, and there is nothing to run them from: the policy is strict with no jump host, or neither the policy nor this service names a jump host image.
bubble_project_unreachable: The service cannot act in the test policy's project. An operator grants it a role there.
group_has_no_policy: The group names no protection policy.
policy_has_no_recovery: The group's policy states no recovery section.
member_not_mirrored: For a hot group, a member's disk is not a mirrored volume here.
image_not_found_by_global_id: For a hot group, no image here carries a member's disk's mirror global id.
member_never_synced: No standby holds a member of a warm group yet, or a mirrored image of a hot group holds no complete mirror snapshot to clone; one still syncing is never cloned.
member_has_no_recoverable_state: No backup of a member has been adopted here, or the group has no member.
domain_key_missing: A member's backups are encrypted under a dedup domain whose key this cloud lacks.
member_not_ready: A member's readiness reports something else that refuses a recovery, such as binding_missing; fields gives it as <issue code>: <detail>.
standby_has_no_applied_snapshot: A member's standby holds no snapshot taken when an update finished.
partial_coverage_unaccepted: A member's newest backup does not hold every disk of the server, and the group's registration does not accept partial_coverage.
Service Unavailable.
dr_not_enabled: Disaster recovery is not enabled here. Or the group is at its home, which this release does not test. Or this cloud lacks something a test needs, which the detail names.
An error, as an RFC 7807 problem document.