REST API
Resources, methods, request/response bodies, and status codes
This page is the complete API reference for Trilio Site Recovery for OpenStack. The service exposes a versioned REST API on port 8788, registered in the Keystone service catalogue under the protector service type. All requests require a valid Keystone token; access is enforced by oslo.policy roles (dr_operator and dr_site_admin). This reference covers every resource collection, the exact request and response shapes, action keys accepted by the /action endpoints, and the error codes the service returns.
Before using the API directly, ensure the following are in place:
- Trilio Site Recovery for OpenStack deployed and registered in Keystone (service type
protector, port 8788) - A valid Keystone token with at least the
memberanddr_operatorroles on the target project; site-scoped operations additionally requiredr_site_admin - Both Keystone roles (
dr_operator,dr_site_admin) created on both sites before any DR operation is attempted — trust creation fails if a named role is absent - Network connectivity from the API client to port 8788 (protector API), port 5000 (Keystone), port 8774 (Nova), and port 8776 (Cinder) on both sites
- The
python3-triliositerecoverypackage installed if you are using theopenstack drCLI rather than raw HTTP - Tenant mappings configured between sites when the two OpenStack deployments have independent Keystones (without a mapping the engine assumes the same project UUID on the peer, which will fail for independent clouds)
Base URL
Discover the endpoint from the Keystone service catalogue:
openstack catalog show protector
The public endpoint is of the form http://<host>:8788/v1. All paths in this reference are relative to that base and include the {tenant_id} path segment, which must be your project UUID.
The API is served by the protector-api service. Installation depends on your deployment model.
Juju (Charmed OpenStack)
# Deploy from Charmhub
juju deploy trilio-site-recovery-for-openstack --channel latest/stable
# Install the CLI on any client node
apt-get install python3-triliositerecovery
After the charm settles, run the database migration and register the service:
juju run trilio-site-recovery-for-openstack/leader db-sync
juju run trilio-site-recovery-for-openstack/leader register-service
Kolla-Ansible
# From the Kolla deployment directory
bash deploy/kolla/install.sh
The script deploys the protector_api and protector_engine containers using the protector:latest image and waits for the API to become ready before returning.
Red Hat OpenStack Services on OpenShift (RHOSO18)
# Run the installer script — do not apply manifests individually
bash deploy/openshift/scripts/install.sh
The installer applies all twelve manifests in dependency order (namespace → serviceaccount → configmap → secret → init jobs → service → deployments) and gates each init job on completion before proceeding. The deployments are named trilio-site-recovery-api and trilio-site-recovery-engine in the trilio-site-recovery namespace.
apt (manual / bare-metal)
# Add the Trilio repository
echo 'deb [trusted=yes] https://apt.fury.io/trilio-os-site-recovery-master/ /' \
> /etc/apt/sources.list.d/trilio-site-recovery.list
apt-get update
# Install service and CLI packages
apt-get install trilio-site-recovery python3-triliositerecovery
# Run the database migration
protector-manage db sync
The service reads /etc/protector/protector.conf (oslo.config INI format). The sections and options most relevant to API behaviour are listed below.
[api]
| Option | Type | Default | Purpose |
|---|---|---|---|
bind_host | string | 0.0.0.0 | Address the API process listens on |
bind_port | integer | 8788 | TCP port for the REST API |
workers | integer | 4 | Number of WSGI worker processes |
[DEFAULT]
| Option | Type | Default | Purpose |
|---|---|---|---|
local_site | string | (unset) | Required. Name of the DR site this instance belongs to. The service will not participate in any DR operation until this matches a registered site name. After a 1.0.20+ charm upgrade the unit enters BLOCKED until local_site (and, when Pure Storage is configured, pure-primary-site-name and pure-secondary-site-name) are set. |
host | string | localhost | Identifies this node to oslo.messaging |
use_mock_storage | boolean | false | Use the in-memory mock driver instead of a physical array |
use_mock_cinder | boolean | false | Stub out Cinder calls (evaluation only) |
[database]
| Option | Type | Default | Purpose |
|---|---|---|---|
connection | string | (unset) | SQLAlchemy connection URI for the protector database |
[engine]
| Option | Type | Default | Purpose |
|---|---|---|---|
topic | string | protector-engine | RabbitMQ topic the engine consumes |
cross_site_timeout | integer | 30 | Seconds to wait for a cross-site HTTP call before giving up |
auto_create_security_groups | boolean | false | Create missing security groups on the recovery site during failover; when false, missing groups are reported but do not abort the operation |
recovery_point_interval_minutes | integer | 0 | Interval between automatic recovery point snapshots (0 = disabled) |
recovery_point_max_count | integer | 20 | Maximum recovery points retained per protection group |
recovery_point_ttl_hours | integer | 24 | How long a recovery point is kept before automatic expiry |
[keystone_authtoken]
| Option | Type | Default | Purpose |
|---|---|---|---|
auth_url | string | (unset) | Keystone endpoint for token validation |
www_authenticate_uri | string | (unset) | Public Keystone URI returned in WWW-Authenticate headers |
[service_credentials]
| Option | Type | Default | Purpose |
|---|---|---|---|
default_trust_roles | string | member,dr_operator | Roles delegated by every per-tenant Keystone trust. Every role listed must exist in Keystone before the first DR operation. Omitting member removes Nova/Cinder access from the trust and fails at the first volume or instance call during failover. The default is correct for most deployments — omit this option from your config rather than repeating the default. |
cafile | string | (unset) | CA bundle for TLS verification of cross-site calls |
insecure | boolean | false | Disable TLS certificate verification (not recommended for production) |
[pure_storage] (required only when storage_driver = pure)
| Option | Type | Default | Purpose |
|---|---|---|---|
primary_management_ip | string | (unset) | Management IP of the primary FlashArray |
primary_api_token | string | (unset) | API token for the primary array |
secondary_management_ip | string | (unset) | Management IP of the secondary FlashArray |
secondary_api_token | string | (unset) | API token for the secondary array |
primary_site_name | string | (unset) | OpenStack site name whose workloads use the primary array. Must match the name of the registered DR site at primary_management_ip. The driver resolves which array to contact by comparing this name against the protection group's primary_site_id; a mismatch causes the engine to read replication state from the wrong array. |
secondary_site_name | string | (unset) | OpenStack site name whose workloads use the secondary array. |
verify_ssl | boolean | false | Verify TLS certificates when calling the FlashArray REST API |
default_rpo_seconds | integer | 900 | Target recovery point objective for ActiveDR replication |
snapshot_interval_seconds | integer | 300 | Interval between async replication snapshots |
additional_arrays | list | (empty) | Section names (e.g. array-pair-2) for additional array pairs; each named section [pure_array:<name>] carries its own management IPs, API tokens, site names, and cinder_backend_names |
[storage]
| Option | Type | Default | Purpose |
|---|---|---|---|
storage_driver | string | mock | Storage backend: mock, pure, drbd (development only), or a full class path such as protector.engine.storage.drivers.pure_driver.PureStorageDriver |
To set an option the charm does not model directly, use config-flags:
juju config trilio-site-recovery-for-openstack \
config-flags="engine:cross_site_timeout=60"
Do not name a key the charm already renders in its template — that appends a duplicate [section] block and causes a DuplicateSectionError.
All requests must carry a Keystone token in the X-Auth-Token header. The {tenant_id} path segment is your project UUID.
TOKEN=$(openstack token issue -f value -c id)
TENANT=$(openstack project show myproject -f value -c id)
BASE="http://<protector-host>:8788/v1/${TENANT}"
Authentication and service discovery
The service registers itself under the protector service type in the Keystone catalogue (the Juju charm additionally registers disaster-recovery). Discover the endpoint:
openstack catalog show protector
Sites
Sites represent the two OpenStack deployments participating in DR. Site registration and management require the dr_site_admin role.
List sites
curl -s -H "X-Auth-Token: $TOKEN" "$BASE/sites" | python3 -m json.tool
Register a site
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"site": {
"name": "site-b",
"auth_url": "https://keystone-b.example.com:5000",
"region_name": "RegionTwo",
"service_username": "protector",
"service_password": "<password>",
"service_project_name": "service"
}
}' "$BASE/sites"
Sites have no site_type field — a site's role (primary or secondary) is per protection group, not per site, and flips on failover.
Get the local site (the site this protector instance is running on)
curl -s -H "X-Auth-Token: $TOKEN" "$BASE/sites/local"
Add ?service_roles=false to skip the live Keystone role check if you only need to identify the local site.
Delete a site (refuses with 409 while protection groups reference it)
curl -s -X DELETE -H "X-Auth-Token: $TOKEN" "$BASE/sites/<site-id>"
# Force delete (leaves protection group references behind — read the warning)
curl -s -X DELETE -H "X-Auth-Token: $TOKEN" "$BASE/sites/<site-id>?force=true"
Protection groups
A protection group is a named set of VMs whose volumes are replicated together as a crash-consistent unit.
Create a protection group (volume_type_id is required for async replication, not required for active_dr)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"protection_group": {
"name": "pg-prod",
"primary_site_id": "<site-a-uuid>",
"secondary_site_id": "<site-b-uuid>",
"replication_type": "async",
"volume_type_id": "<replicated-vol-type-uuid>"
}
}' "$BASE/protection-groups"
The API returns HTTP 202; the engine completes the creation asynchronously. Poll GET /v1/{tenant_id}/protection-groups/{id} until status is no longer creating.
List protection groups (optional ?all_projects=true for admin cross-tenant view)
curl -s -H "X-Auth-Token: $TOKEN" "$BASE/protection-groups"
Add a VM to a protection group
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"member": {
"instance_id": "<nova-instance-uuid>",
"boot_order": 1
}
}' "$BASE/protection-groups/<pg-id>/members"
LUKS-encrypted volumes are rejected at this step (InvalidInput). Use array-side encryption (Pure data-at-rest) instead.
Remove a member (asynchronous; member enters removing status)
curl -s -X DELETE -H "X-Auth-Token: $TOKEN" \
"$BASE/protection-groups/<pg-id>/members/<member-id>"
DR actions
All DR operations are submitted to POST /v1/{tenant_id}/protection-groups/{pg_id}/action. The top-level key in the request body selects the operation.
Valid action keys: failover, failback, failback_plan, test_failover, test_cleanup, reconcile
Keys beginning with _ are internal engine markers and are stripped from any client request body.
Failover
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"failover": {
"failover_type": "planned",
"network_mapping": {
"<primary-net-uuid>": "<secondary-net-uuid>"
},
"flavor_mapping": {
"<primary-flavor-uuid>": "<secondary-flavor-uuid>"
},
"vm_creation_params": {
"availability_zone": "nova-az-dr"
}
}
}' "$BASE/protection-groups/<pg-id>/action"
Network and flavor mapping values use the resource UUID (or name) as the key and target UUID (or name) as the value — not a src:dst string. The separator in CLI flags is =; at the API level you pass a JSON object.
Failed-over instances are created as <original-name>-failover.
Failback
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"failback": {
"failback_type": "planned"
}
}' "$BASE/protection-groups/<pg-id>/action"
Failback waits up to 120 seconds per volume for Nova to release the Cinder attachment before unmanaging the volume. Instances restored to the primary site are created as <original-name>-restored.
Get the failback plan (read-only, returns HTTP 200, does not start an operation)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{"failback_plan": {}}' "$BASE/protection-groups/<pg-id>/action"
Test failover
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"test_failover": {
"network_mapping": {
"<primary-net-uuid>": "<isolated-test-net-uuid>"
},
"vm_creation_params": {
"availability_zone": "nova-az-test"
}
}
}' "$BASE/protection-groups/<pg-id>/action"
Either network_mapping or auto_network is required for test failover.
Clean up test failover
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{"test_cleanup": {}}' "$BASE/protection-groups/<pg-id>/action"
Reconcile (repairs a protection group left inconsistent by an interrupted failover or failback; works when the primary site is unreachable)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{"reconcile": {}}' "$BASE/protection-groups/<pg-id>/action"
Reconcile returns HTTP 200 (not 202) with the reconcile result synchronously. Each reconcile is recorded in dr_operations with operation_type=reconcile.
Site-level failover
Site-level failover affects all protection groups associated with a site. Requires dr_site_admin.
Via the site action endpoint (accepts only failover or failback as the top-level key)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"failover": {
"failover_type": "unplanned"
}
}' "$BASE/sites/<site-id>/action"
Via the simplified big-red-button endpoint (targets the site this instance is running on)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{"failover_type": "unplanned"}' "$BASE/site-failover"
Operations
Every DR action creates an operation record. Operations are scoped to the caller's project — another tenant's operations appear as not found.
List operations
curl -s -H "X-Auth-Token: $TOKEN" \
"$BASE/operations?operation_type=failover&status=completed"
Filter parameters: status, operation_type, pg_id (or protection_group_id).
Show an operation
The response includes progress (integer 0–100), source_site and target_site (site names, falling back to IDs), instances_created, volumes_managed, floating_ips_allocated, warnings, and errors. There is no estimated completion time — the service does not compute one.
curl -s -H "X-Auth-Token: $TOKEN" "$BASE/operations/<operation-id>"
Resource mappings
Mappings tell the engine which network, flavor, or floating IP pool on the recovery site corresponds to each resource on the primary site.
Accepted resource_type values: network, flavor, floating_ip_pool, floating_ip. Submitting subnet or security_group returns HTTP 400 (Unsupported resource type).
Create a mapping
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"mapping": {
"resource_type": "network",
"primary_resource_id": "<primary-net-uuid>",
"secondary_resource_id": "<secondary-net-uuid>"
}
}' "$BASE/protection-groups/<pg-id>/mappings"
Auto-map (the engine attempts to match resources by name)
curl -s -X POST -H "X-Auth-Token: $TOKEN" \
"$BASE/protection-groups/<pg-id>/mappings/auto"
Prepare floating IP mappings (allocates a DR floating IP for each unmapped address)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{"dr_network": "<external-net-uuid>", "dry_run": false}' \
"$BASE/protection-groups/<pg-id>/mappings/floating-ips/prepare"
Replication health and recovery points
Check replication health
curl -s -H "X-Auth-Token: $TOKEN" \
"$BASE/protection-groups/<pg-id>/replication-health"
Add ?probe=true to ask the recovery site whether the group's networks, security groups, and flavors resolve there in the project it recovers into. This is a resource-resolution check against the recovery site's Neutron and Nova — not a storage or replication-lag check. It is slower than the plain call because it contacts the other site.
List recovery points
curl -s -H "X-Auth-Token: $TOKEN" \
"$BASE/protection-groups/<pg-id>/recovery-points?limit=10"
Tenant mappings
Tenant mappings translate project IDs between independent Keystone deployments. Without a mapping the engine assumes the same project UUID on both sites, which is correct only for federated or shared Keystones. For independent clouds, an absent mapping causes cross-site operations to fail on the first call that requires project scoping.
Create a tenant mapping (also creates the reverse mapping on the remote site)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"tenant_mapping": {
"local_tenant_id": "<local-project-uuid>",
"remote_site_id": "<remote-site-uuid>",
"remote_tenant_id": "<remote-project-uuid>"
}
}' "$BASE/tenant-mappings"
If the remote site cannot be reached during creation, the mapping is created locally with status pending_sync and a warning field in the response explaining what to do next.
Observability
The service does not emit oslo.messaging notifications. Monitor DR state by polling:
GET /v1/{tenant_id}/protection-groups/{id}/replication-health(optionally with?probe=true)GET /v1/{tenant_id}/replication-audit(site-admin; shows replication not covered by any protection group)GET /v1/{tenant_id}/protection-groups/{id}/recovery-pointsGET /v1/{tenant_id}/operationsandGET /v1/{tenant_id}/operations/{id}
Usage reports (admin only)
# Current snapshot
curl -s -H "X-Auth-Token: $TOKEN" "$BASE/usage/summary"
# Monthly report as JSON
curl -s -H "X-Auth-Token: $TOKEN" \
"$BASE/usage/report?period=monthly&format=json"
# Explicit date range as PDF
curl -s -H "X-Auth-Token: $TOKEN" \
"$BASE/usage/report?start_date=2026-01-01&end_date=2026-03-31&format=pdf" \
-o report.pdf
Example 1 — Register two sites and create a protection group
# 1. Register the remote site (dr_site_admin required)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"site": {
"name": "site-b",
"auth_url": "https://keystone-b.example.com:5000",
"service_username": "protector",
"service_password": "s3cr3t",
"service_project_name": "service"
}
}' "$BASE/sites"
# 2. Identify the local site
curl -s -H "X-Auth-Token: $TOKEN" "$BASE/sites/local"
# 3. Create a protection group (async replication requires volume_type_id)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"protection_group": {
"name": "pg-prod",
"primary_site_id": "<site-a-uuid>",
"secondary_site_id": "<site-b-uuid>",
"replication_type": "async",
"volume_type_id": "<replicated-volume-type-uuid>"
}
}' "$BASE/protection-groups"
Example 2 — Add a member and trigger a metadata sync
# Add a VM to the group
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"member": {
"instance_id": "<nova-instance-uuid>",
"boot_order": 1
}
}' "$BASE/protection-groups/<pg-id>/members"
# Trigger a metadata sync to the secondary site
curl -s -X POST -H "X-Auth-Token: $TOKEN" \
"$BASE/protection-groups/<pg-id>/sync-metadata"
Example 3 — Validate a member before adding it
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"member": {
"instance_id": "<nova-instance-uuid>"
}
}' "$BASE/protection-groups/<pg-id>/members/validate"
The response includes valid: true/false, any errors, warnings, and details such as volume count and backend name. HTTP 200 is returned for both valid and invalid results — the validation result is informational, not an error.
Example 4 — Execute a planned failover with network and flavor mappings
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"failover": {
"failover_type": "planned",
"network_mapping": {
"<primary-network-uuid>": "<dr-network-uuid>"
},
"flavor_mapping": {
"<primary-flavor-uuid>": "<dr-flavor-uuid>"
},
"vm_creation_params": {
"availability_zone": "nova-az-dr"
}
}
}' "$BASE/protection-groups/<pg-id>/action"
The response body includes operation_id. Poll the operation until status is completed:
curl -s -H "X-Auth-Token: $TOKEN" "$BASE/operations/<operation-id>"
The progress field (0–100) tracks completion. source_site and target_site show site names. There is no estimated completion time.
Example 5 — Reconcile an inconsistent protection group
Use this when a protection group is left in an inconsistent state by an interrupted failover or failback. Reconcile can run even when the primary site is unreachable.
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{"reconcile": {}}' "$BASE/protection-groups/<pg-id>/action"
This returns HTTP 200 synchronously with the reconcile result. The operation is also recorded and visible via GET /v1/{tenant_id}/operations.
Example 6 — Create a resource mapping and check for unmapped resources
# Create a network mapping
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"mapping": {
"resource_type": "network",
"primary_resource_id": "<primary-net-uuid>",
"secondary_resource_id": "<secondary-net-uuid>"
}
}' "$BASE/protection-groups/<pg-id>/mappings"
# List all mappings; look for entries with no secondary_resource_id
curl -s -H "X-Auth-Token: $TOKEN" \
"$BASE/protection-groups/<pg-id>/mappings"
Example 7 — Create a tenant mapping between independent Keystones
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"tenant_mapping": {
"local_tenant_id": "<local-project-uuid>",
"remote_site_id": "<remote-site-uuid>",
"remote_tenant_id": "<remote-project-uuid>",
"description": "Production DR tenant pair"
}
}' "$BASE/tenant-mappings"
Example 8 — Site-level failover (all protection groups)
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{
"failover": {
"failover_type": "unplanned"
}
}' "$BASE/sites/<site-id>/action"
Monitor progress via:
curl -s -H "X-Auth-Token: $TOKEN" "$BASE/site-operations/<site-operation-id>"
Example 9 — Python client
The client library is imported from triliositerecovery.v1.client. Managers return plain dicts (use site['id'], not site.id). The resource ID is always the first positional argument. Network and flavor mappings are passed as dicts, not strings.
from keystoneauth1 import session as ks_session
from keystoneauth1.identity import v3 as ks_v3
from triliositerecovery.v1.client import Client
auth = ks_v3.Password(
auth_url="https://keystone.example.com:5000",
username="druser",
password="secret",
project_name="myproject",
user_domain_name="Default",
project_domain_name="Default",
)
sess = ks_session.Session(auth=auth)
adapter = sess.get_endpoint(service_type="protector",
interface="public")
client = Client(
session=sess,
endpoint=adapter,
region_name="RegionOne",
)
# List protection groups — returns a list of dicts
for pg in client.protection_groups.list():
print(pg['id'], pg['name'], pg['status'])
# Execute failover — DR operations are on client.operations
op = client.operations.failover(
pg_id,
failover_type="planned",
network_mapping={"<primary-net-uuid>": "<dr-net-uuid>"},
vm_creation_params={"availability_zone": "nova-az-dr"},
)
print(op['id']) # operation UUID
# Reconcile
result = client.operations.reconcile(pg_id)
# Replication health with probe
health = client.protection_groups.replication_health(pg_id, probe=True)
# Recovery points
points = client.protection_groups.recovery_points(pg_id, limit=10)
HTTP 401 on every request
Symptom: Every API call returns 401 Unauthorized.
Likely cause: The Keystone token has expired, the dr_operator role does not exist on this Keystone, or the service user lacks the Admin grant.
Fix:
- Reissue your token:
openstack token issue - Confirm both roles exist:
openstack role list | grep dr - If a role is missing, create it:
openstack role create dr_operatorandopenstack role create dr_site_adminon both sites - Confirm the service user has the Admin grant:
openstack role assignment list --user protector
409 Conflict on site or protection group create
Symptom: POST /v1/{tenant_id}/sites or POST /v1/{tenant_id}/protection-groups returns 409 ResourceConflict with the message "The request conflicts with an existing resource. A name may still be held by a deleted resource."
Likely cause: A site or protection group with the same name was soft-deleted but its name is still reserved.
Fix: Use a different name, or use openstack dr site list / openstack dr protection group list to find and confirm the deleted resource is gone before reusing the name.
409 InvalidState on the /action endpoint
Symptom: POST /v1/{tenant_id}/protection-groups/{id}/action returns HTTP 409.
Likely cause: The protection group is in a state that does not permit the requested operation (for example, attempting a failover on a group that is already failed over, or submitting a member-add while the group is not on its primary site).
Fix: Check the group's current status and current_primary_site_id with GET /v1/{tenant_id}/protection-groups/{id}. Use openstack dr protection group set --reset-to-primary or --reset-to-secondary to correct state after a manual recovery.
503 ServiceUnavailable on database operations
Symptom: Requests return 503 Database temporarily unavailable.
Likely cause: The protector service cannot reach its MariaDB/MySQL database — connection refused, credentials wrong, or the database is temporarily overloaded. This is distinct from cross-site reachability errors.
Fix:
- Check database connectivity from the API host:
mysql -h <db-host> -u protector -p protector - Under Juju:
juju run trilio-site-recovery-for-openstack/leader health-check - Under Kolla:
docker logs protector_api | tail -50 - Under OpenShift:
oc -n trilio-site-recovery logs -l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api
Failover fails with "Policy doesn't allow volume_extension:volume_manage"
Symptom: Failover starts, storage work completes, then fails with an HTTP 403 from Cinder containing volume_extension:volume_manage.
Likely cause: The Cinder policy on the recovery site does not permit the member role to manage volumes. The service runs as a tenant through a Keystone trust, not as admin. The five required Cinder policy relaxations are:
"volume_extension:volume_manage": "rule:admin_or_owner",
"volume_extension:volume_unmanage": "rule:admin_or_owner",
"volume_extension:services:index": "rule:admin_or_owner",
"volume_extension:type_get": "rule:admin_or_owner",
"volume_extension:type_get_all": "rule:admin_or_owner"
Fix: Apply all five rules to the Cinder policy on both sites. Under Juju, use attach-resource with the resource name policyd-override.
Trust creation fails naming a missing role
Symptom: The first DR operation after deployment fails with an error naming dr_operator or another role.
Likely cause: The charm creates both Keystone roles at deploy time but the roles were not present on both sites, or default_trust_roles was customised and a named role does not exist.
Fix: Create the missing role on the affected site: openstack role create dr_operator. Do not remove member from default_trust_roles — it provides Nova and Cinder access inside the trust and its absence fails at the first instance or volume call during failover.
Protection group status is inconsistent after a failed failover
Symptom: The protection group shows an unexpected status (for example, error or mismatched current_primary_site_id) after an interrupted failover or failback.
Fix: Run reconcile. It inspects storage, VMs, and operation history to repair the group, relink discovered VMs, restart SHUTOFF workloads on the writable site, and synchronise the corrected state to the peer. It works even when the primary site is unreachable:
curl -s -X POST -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{"reconcile": {}}' "$BASE/protection-groups/<pg-id>/action"
Or via CLI: openstack dr protection group reconcile <pg>
Source Site and Target Site columns are blank in operation output
Symptom: openstack dr operation show or GET /v1/{tenant_id}/operations/{id} returns empty source_site and target_site fields.
Likely cause: This was a bug (fixed in b277167). On a patched service the columns show the site name, falling back to the site ID. If you are still seeing blanks, the service version predates the fix.
Fix: Upgrade the trilio-site-recovery package. Under Juju: juju run trilio-site-recovery-for-openstack/leader upgrade-packages; also upgrade the CLI separately on any client node not managed by the charm: apt-get install --only-upgrade python3-triliositerecovery.
OpenShift pod logs return "No resources found"
Symptom: oc logs -l app=trilio-site-recovery-api returns no output.
Likely cause: The pods do not carry a bare app label. The correct label selectors are app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api (or engine).
Fix:
# API logs
oc -n trilio-site-recovery logs \
-l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api
# Engine logs
oc -n trilio-site-recovery logs \
-l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=engine
On OpenShift the service logs only to stdout (the ConfigMap sets use_stderr = true with no log directory), so oc logs is the only path to service output.
Unit enters BLOCKED after a charm upgrade
Symptom: After upgrading the trilio-site-recovery-for-openstack charm to 1.0.20+, the unit enters BLOCKED with the message: set local-site, pure-primary-site-name, pure-secondary-site-name.
Likely cause: This is expected behaviour. The charm does not infer which site it is on; the operator must set local-site explicitly. The two Pure site name options are additionally required when Pure Storage is configured.
Fix:
juju config trilio-site-recovery-for-openstack local-site="site-a"
# If using Pure Storage:
juju config trilio-site-recovery-for-openstack \
pure-primary-site-name="site-a" \
pure-secondary-site-name="site-b"
Failback appears to hang on volume detach
Symptom: Failback is running but progress stalls for up to 120 seconds per volume before continuing.
Likely cause: This is expected behaviour, not a hang. Failback waits for each DR volume's Nova attachment to release before unmanaging it (up to 120 seconds per volume). Nova releases the Cinder attachment asynchronously after the server is deleted. The wait is logged; if a volume is still attached at the deadline it is unmanaged anyway and logged as a warning — failback is not aborted. On a site with slow detaches, a visibly slower failback is the wait working correctly.