Turn a standby into volumes
POST/v1/standbys/:id/promote
Creates volumes in the standby's project from its applied_snap, boot disk first, ready to attach or boot from. They hold applied_point_id exactly, whatever state the standby is in: a standby that is updating or whose last update failed still promotes to the backup it last finished. No server is created. Each volume is cloned, registered with the block storage service and handed to the project through a delegation the caller's token grants; every volume is cloned in full in the background. Either every disk becomes a volume or none does. The identity service delegates only roles the caller holds in the standby's project itself: an admin role on the system or on another project does not count, so an operator account that promotes standbys needs a role, such as member, in every project whose standbys it promotes.
Any member of the project the token is scoped to.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 413
- 415
- 422
- 502
- 503
- default
OK
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.
restore_trust_refused: The token cannot grant the delegation, because none was carried or it was issued from an application credential.
Unauthorized.
unauthenticated: The token is missing, expired or not valid.
Forbidden.
restore_trust_refused: The caller holds no role on the standby's project to delegate. Grant the account a role in that project and promote again.
Not Found.
not_found: No standby with this id exists, or the token may not restore into its project.
Conflict.
standby_has_no_applied_snapshot: The standby has no applied_snap yet, so nothing it holds is known to be a whole backup.
conflict: The backup it holds no longer exists. Or the standby moved to a newer backup while it was being promoted; nothing was kept, and promoting again clones the newer one.
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.
recovery_delegation_missing: The volumes must end in the standby's project and the service can obtain no delegation to accept them there. Nothing was created.
Bad Gateway.
restore_trust_refused: The identity service refused the delegation.
service_unavailable: Cloning a disk, registering it as a volume or handing it to the project failed. Nothing the promote created is kept.
Service Unavailable.
service_unavailable: The service has no Ceph or block storage access to promote with, or signs in with an application credential, which cannot act on a delegation.
An error, as an RFC 7807 problem document.