Trilio Site Recovery for OpenStackOpenStack native DR service
Guide

Common Workflows

End-to-end tasks combining CLI / API calls


Overview

This page walks you through the five most common operational tasks for Trilio Site Recovery: reconciling a protection group left inconsistent by an interrupted failover or failback, rolling out a new service version, restoring from a database backup, diagnosing a degraded node or failed operation, and executing a site-level failover. Each workflow combines CLI commands, REST API calls, and — where relevant — Python client code, so you can automate or integrate any step. Work through the prerequisites section before attempting any workflow; a misconfigured site identity or missing Keystone role stops every DR operation at its first cross-site call.


Prerequisites

Before starting any workflow on this page, verify the following:

  • Two independent OpenStack clusters (Victoria or later), each with Keystone, Nova, Cinder, and Neutron.
  • Trilio Site Recovery installed and running on both sites — protector-api on port 8788 and protector-engine consuming RabbitMQ messages.
  • python3-triliositerecovery installed on every machine where you run CLI commands. Install it from the Trilio apt repository at /etc/apt/sources.list.d/trilio-site-recovery.list.
  • local_site set in /etc/protector/protector.conf on every node, to the name of the DR site that node belongs to. The service will not participate in DR operations until this is set.
  • Keystone roles dr_operator and dr_site_admin exist on both sites. Trust creation fails naming a missing role rather than skipping it.
  • Your shell environment sourced from an openrc file for the project that owns the protection groups (not the admin project; DR operations must work without admin privilege).
  • Network connectivity between both sites on ports 8788 (protector-api), 5000 (Keystone), 8774 (Nova), and 8776 (Cinder).
  • Cinder policy on both sites relaxed to allow the member role to call volume_extension:volume_manage, volume_extension:volume_unmanage, volume_extension:services:index, volume_extension:type_get, and volume_extension:type_get_all.
  • For Pure Storage deployments: python3-pure-client installed on every node running protector-engine, and async replication configured between the two FlashArrays.

Installation

These steps apply when you need to install or upgrade the CLI client on a machine that is not managed by the Juju charm (for example, a bastion host or CI runner). For full service installation, follow the deployment guide for your platform (Juju, Kolla-Ansible, or OpenShift).

Install the CLI client

Step 1 — Add the Trilio apt repository

echo "deb [trusted=yes] https://apt.fury.io/trilio-os-site-recovery-master/ /" \
  | sudo tee /etc/apt/sources.list.d/trilio-site-recovery.list
sudo apt-get update

Step 2 — Install the client package

sudo apt-get install -y python3-triliositerecovery

This installs the openstack dr CLI plugin and the triliositerecovery Python client library.

Step 3 — Verify the installation

openstack dr --help

You should see the full list of dr subcommands. If the command is not found, confirm that the OpenStackClient plugin system picked up the entry point:

pip3 show triliositerecovery

Upgrade the CLI client on a non-charm machine

The Juju charm's upgrade-packages action upgrades the service unit only. Any machine running the CLI separately needs its own upgrade:

sudo apt-get install --only-upgrade python3-triliositerecovery

Install the Horizon dashboard plugin (optional)

sudo apt-get install -y python3-triliositerecovery-dashboards

Then restart the Horizon WSGI process so it picks up the protector_dashboards module.


Configuration

All service configuration lives in /etc/protector/protector.conf, written in Oslo config INI format. The Juju charm manages this file on charm-deployed units — use juju config or config-flags to change values rather than editing the file directly (the charm rewrites it on every hook). On Kolla and OpenShift deployments, edit the file or ConfigMap directly.

Required options

SectionKeyTypeDefaultPurpose
[DEFAULT]local_sitestring(none)Required. The name or UUID of the DR site this node belongs to. Must match the name passed to openstack dr site create. Set differently on each site.
[database]connectionstring(none)MariaDB/MySQL connection string, e.g. mysql+pymysql://protector:password@localhost/protector.
[keystone_authtoken]auth_urlstring(none)Keystone endpoint for token validation.
[keystone_authtoken]www_authenticate_uristring(none)Public Keystone URI returned in WWW-Authenticate headers.

API options ([api])

KeyTypeDefaultPurpose
bind_hoststring0.0.0.0Interface the API listens on.
bind_portinteger8788Port the API listens on.
workersinteger4Number of WSGI worker processes.

Engine options ([engine])

KeyTypeDefaultPurpose
topicstringprotector-engineRabbitMQ topic the engine consumes.
cross_site_timeoutinteger30Seconds any single call to the peer site may take. Raise this on slow inter-site links. A session built without a timeout blocks indefinitely; the gunicorn worker is then killed and the client sees the connection close with no response.
auto_create_security_groupsbooleanfalseWhen true, creates missing security groups on the target site during failover. Rules that cannot be translated to the target site's terms are reported but not copied. Leave false unless you understand the implications — a translated rule carrying the wrong address permits nothing and looks correct.
recovery_point_interval_minutesinteger0Interval between scheduled recovery point snapshots for ActiveDR groups. 0 disables scheduling.
recovery_point_max_countinteger20Maximum on-demand recovery point snapshots retained per protection group.
recovery_point_ttl_hoursinteger24Automatically delete recovery point snapshots older than this many hours.

Storage options ([storage])

KeyTypeDefaultPurpose
storage_driverstringmockStorage backend. Accepts mock, pure, drbd, or a full class path. Use mock for initial validation; switch to pure for production.

Pure Storage options ([pure_storage])

These options are required when storage_driver = pure.

KeyTypeDefaultPurpose
primary_management_ipstring(none)Management IP of the array paired with primary_site_name.
primary_api_tokenstring(none)REST API token for the primary array.
secondary_management_ipstring(none)Management IP of the array paired with secondary_site_name.
secondary_api_tokenstring(none)REST API token for the secondary array.
primary_site_namestring(none)Name of the DR site whose array is at primary_management_ip. Must match the site name registered with openstack dr site create.
secondary_site_namestring(none)Name of the DR site whose array is at secondary_management_ip.
default_rpo_secondsinteger900Default RPO for async replication groups.
snapshot_interval_secondsinteger300Interval between Pure Protection Group snapshots.
verify_sslbooleanfalseVerify TLS certificates when calling the FlashArray REST API.

Array orientation: primary_site_name must name the site whose array is at primary_management_ip. An identical [pure_storage] section works unchanged on both nodes because the driver resolves which array to talk to by site name, not by node position. Inverting the pairing causes a failover to read the wrong array and report all volumes missing.

Service credentials ([service_credentials])

KeyTypeDefaultPurpose
default_trust_roleslistmember,dr_operatorRoles delegated by every per-tenant Keystone trust. member carries Nova/Cinder access; dr_operator satisfies Protector's cross-site sync policy. Every role named here must exist on every site. Do not remove member — failover fails at the first instance or volume call without it.
cafilestring(none)PEM CA bundle for verifying peer site TLS certificates.
insecurebooleanfalseDisable TLS certificate verification. Not recommended in production.

Juju-specific configuration

For charm-managed deployments, change options with juju config:

juju config trilio-site-recovery local-site="site-a"

For options the charm does not model directly, use config-flags:

juju config trilio-site-recovery config-flags="engine:cross_site_timeout=60"

Do not invent charm option names — the charm exposes a fixed set. Using an unknown option name produces an error. cross-site-timeout and engine-cross-site-timeout are not valid charm options; config-flags with the engine:cross_site_timeout key is the supported path.

Annotated sample configuration

[DEFAULT]
# REQUIRED: the name this node's site was registered under.
local_site = site-a

[api]
bind_host = 0.0.0.0
bind_port = 8788
workers = 4

[database]
connection = mysql+pymysql://protector:s3cr3t@db.site-a.example.com/protector

[keystone_authtoken]
auth_url = https://keystone.site-a.example.com:5000
www_authenticate_uri = https://keystone.site-a.example.com:5000

[engine]
topic = protector-engine
cross_site_timeout = 30
auto_create_security_groups = false

[storage]
storage_driver = pure

[pure_storage]
primary_management_ip = 10.0.1.10
primary_api_token = <site-a-array-token>
primary_site_name = site-a
secondary_management_ip = 10.0.2.10
secondary_api_token = <site-b-array-token>
secondary_site_name = site-b
default_rpo_seconds = 900
snapshot_interval_seconds = 300
verify_ssl = false

[service_credentials]
# Do not change default_trust_roles unless you know what you are doing.
# Removing 'member' removes Nova/Cinder access from every trust.
default_trust_roles = member,dr_operator

[oslo_messaging_rabbit]
transport_url = rabbit://protector:rabbit-secret@rabbit.site-a.example.com/protector

Usage

Workflow 1 — Reconcile an inconsistent protection group

A protection group is left inconsistent when a failover or failback is interrupted — by a network partition, a process crash, or a timeout — before it finishes. The group's status is typically error or stuck in failing_over / failing_back. Use reconcile to repair it. Reconcile works even when the primary site is unreachable; run it from the site that is accessible.

Check the group status first:

openstack dr protection group show <pg-id-or-name>

Look at the status field and the next_step field. The next_step field tells you exactly which command to run and on which site, based on the interrupted operation.

Run reconcile:

openstack dr protection group reconcile <pg-id-or-name>

Reconcile inspects storage, VMs, and operation history. It fixes the protection group status, relinks discovered VMs, restarts SHUTOFF workloads on the writable site, and synchronizes the corrected state to the peer. The operation is recorded in the operation history with operation_type=reconcile.

Monitor the reconcile operation:

openstack dr operation list --protection-group <pg-id> --operation-type reconcile
openstack dr operation show <operation-id>

The progress field shows completion as a percentage (0–100). There is no estimated completion time — monitor progress and status.

The operation reaches a terminal status of completed, failed, or error. If it fails, check error_message in the operation record and review the service logs.

Via the REST API:

curl -s -X POST \
  -H "X-Auth-Token: $OS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"reconcile": {}}' \
  http://protector.site-b.example.com:8788/v1/$OS_PROJECT_ID/protection-groups/<pg-id>/action

Via the Python client:

from keystoneauth1 import session as ka_session
from keystoneauth1.identity import v3
from keystoneauth1 import adapter
from triliositerecovery.v1.client import Client

auth = v3.Password(
    auth_url="https://keystone.site-b.example.com:5000/v3",
    username="druser",
    password="secret",
    project_name="dr-project",
    user_domain_name="Default",
    project_domain_name="Default",
)
ks_session = ka_session.Session(auth=auth)
adapt = adapter.Adapter(
    session=ks_session,
    service_type="disaster-recovery",
    interface="public",
)
client = Client(
    session=adapt,
    endpoint="http://protector.site-b.example.com:8788",
    region_name="USEAST",
)

# pg_id is a positional argument, not a keyword
operation = client.operations.reconcile("<pg-id>")
print(operation['id'], operation['status'])

Workflow 2 — Roll out a new service version

Juju deployments

Step 1 — Run the upgrade preflight check

Before upgrading, obtain upgrade_preflight.py from the repository tag you are upgrading to (it is not shipped in any Debian package). Copy it to the unit and run it:

python3 upgrade_preflight.py --config /etc/protector/protector.conf

If the preflight fails, do not proceed. Address all reported issues first.

Step 2 — Upgrade the charm revision

juju refresh trilio-site-recovery-for-openstack --channel latest/stable

After the upgrade, the charm may land in BLOCKED with the message:

set local-site, pure-primary-site-name, pure-secondary-site-name

This is expected after a 1.0.20+ upgrade. Set the required options:

juju config trilio-site-recovery \
    local-site="site-a" \
    pure-primary-site-name="site-a" \
    pure-secondary-site-name="site-b"

Step 3 — Upgrade service packages

juju run trilio-site-recovery/0 upgrade-packages

Step 4 — Run the database migration

Important for migration 022: If you are crossing migration 022_add_reconcile_operation_type, the charm's db-sync action runs the ENUM preflight automatically. On Kolla and bare-metal deployments, run it manually first:

protector-manage db preflight

Then run the sync:

protector-manage db sync

On Juju, trigger the migration via the charm action:

juju run trilio-site-recovery/0 db-sync

Step 5 — Upgrade the CLI on non-charm machines

Any machine running the openstack dr CLI separately needs its own upgrade:

sudo apt-get install --only-upgrade python3-triliositerecovery

Step 6 — Verify the service is healthy

juju run trilio-site-recovery/0 health-check

Then confirm the API responds:

curl -s http://protector.site-a.example.com:8788/v1/$OS_PROJECT_ID/sites \
  -H "X-Auth-Token: $OS_TOKEN"

Kolla-Ansible deployments

Step 1 — Run the preflight check manually (required when crossing migration 022):

docker exec protector_api protector-manage db preflight

Step 2 — Pull the new image and restart containers:

bash deploy/kolla/install.sh

Step 3 — Run the database migration:

docker exec protector_api protector-manage db sync

OpenShift (RHOSO18) deployments

Update the image tag in your deployment and re-run the installer, which applies manifests in the correct order and gates each init Job on completion:

bash deploy/openshift/scripts/install.sh \
  --namespace trilio-site-recovery \
  --image docker.io/xyzmd/trilio-site-recovery-openstack:dev

Workflow 3 — Restore from database backup

If the protector database is lost or corrupted, restore it from your MariaDB/MySQL backup tool, then resynchronize the schema.

Step 1 — Restore the database from backup using your site's standard MariaDB restore procedure. Confirm the protector database is accessible:

mysql -u protector -p protector -e "SHOW TABLES;"

Step 2 — Run the schema migration to bring the restored database to the current head (025_add_member_removing):

Juju:

juju run trilio-site-recovery/0 db-sync

Kolla:

docker exec protector_api protector-manage db sync

Bare-metal / manual:

protector-manage db sync
# or with a non-default config path:
protector-manage --config-file /etc/protector/protector.conf db sync

Do not run python3 -m protector.db.migration upgrade head or alembic --config /etc/protector/alembic.ini upgrade head — neither path exists. protector-manage db sync is the only supported migration command.

Step 3 — Restart the services to clear any stale in-memory state.

Juju: The charm restarts services automatically after db-sync.

Kolla:

docker restart protector_api protector_engine

OpenShift:

oc -n trilio-site-recovery rollout restart \
  deployment/trilio-site-recovery-api \
  deployment/trilio-site-recovery-engine

Step 4 — Verify protection groups are intact:

openstack dr protection group list
openstack dr site list

If a protection group shows error status after the restore, its in-database state may differ from the storage and VM state. Run reconcile (Workflow 1) to repair it.


Workflow 4 — Diagnose a degraded node or failed operation

Check operation status

# List recent operations, filter by status
openstack dr operation list --status failed
openstack dr operation list --status error

# Show details of a specific operation
openstack dr operation show <operation-id>

The operation show output includes:

  • progress: integer percentage (0–100) showing how far the operation advanced.
  • source_site / target_site: the site names (falling back to IDs) for the operation's source and destination.
  • error_message: the error that stopped the operation.
  • warnings: any non-fatal issues encountered.
  • result_data: what the operation decided and left behind — restore points, floating IP allocations, and rollback details.

There is no estimated completion time. Use progress to gauge how far an operation has advanced.

Check replication health

# Basic health check (reads cached state)
openstack dr replication health <pg-id-or-name>

# Full probe: asks the recovery site whether networks, security groups,
# and flavors resolve in the target project
openstack dr replication health <pg-id-or-name> --probe

--probe contacts the recovery site's Neutron and Nova through the same trust-scoped session a real failover uses. It tells you whether the resources the recovered VMs need actually exist in the right project on the target site. It does not test the storage backend or replication lag. Run it before a maintenance window, not as a storage health check.

Audit replication across all protection groups

openstack dr replication audit

Review recovery points

openstack dr recovery point list <pg-id-or-name>

Read service logs

Juju:

juju exec --unit trilio-site-recovery/0 -- \
  tail -n 200 /var/log/protector/protector-api.log
juju exec --unit trilio-site-recovery/0 -- \
  tail -n 200 /var/log/protector/protector-engine.log

Kolla:

docker logs protector_api --tail 200
docker logs protector_engine --tail 200

OpenShift — logs go to stdout only; kubectl logs is the only path:

# API pods
oc -n trilio-site-recovery logs \
  -l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api \
  --tail=200

# Engine pods
oc -n trilio-site-recovery logs \
  -l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=engine \
  --tail=200

OpenShift note: The label selector requires both app.kubernetes.io/name and app.kubernetes.io/component. Using -l app=trilio-site-recovery-api selects zero pods.

Run the charm health check

Juju only:

juju run trilio-site-recovery/0 health-check

Check site reachability

openstack dr site list
openstack dr site show <site-id-or-name>

A site in unreachable or error status means the protector-engine cannot contact that site's Keystone, Nova, Cinder, or protector-api on the expected ports (8788, 5000, 8774, 8776).

Diagnose a stuck protection group

A protection group stuck in failing_over or failing_back after the engine has stopped usually means the operation interrupted mid-flight. Check:

  1. openstack dr operation list --protection-group <pg-id> — find the operation and read its error_message.
  2. openstack dr protection group show <pg-id> — read next_step, which names the exact command and site to run.
  3. If next_step points to reconcile, run openstack dr protection group reconcile <pg-id> from the accessible site.

Workflow 5 — Execute a site-level failover

A site-level failover moves all protection groups whose primary is on the failing site over to the secondary in a single operation. Run this from the secondary site (the site you are failing over to).

Step 1 — Confirm both sites are registered and known:

openstack dr site list

Step 2 — Review which protection groups will move:

openstack dr protection group list

Only groups currently primary on the failing site are moved.

Step 3 — Optionally probe failover readiness for each group:

openstack dr replication health <pg-id> --probe

Step 4 — Execute the site failover from the secondary site:

openstack dr site failover <site-id-or-name> --failover-type unplanned

Use planned when the primary site is still reachable and you want an orderly handoff. Use unplanned when the primary is down.

Add --force to skip validation checks when the site is completely unreachable and you need to proceed without confirmation.

Step 5 — Monitor the site-level operation:

openstack dr site operation list --site <site-id>
openstack dr site operation show <site-operation-id>

Site operations reach a terminal status of completed, partial_success, or failed. partial_success means some protection groups failed over and others did not — check each group individually.

Step 6 — Verify VMs are running on the secondary site:

openstack server list

Failed-over instances are created with a -failover suffix appended to their original name (e.g., web-vm-failover). The original instance name is preserved in the protection group member record.

Step 7 — When the primary site recovers, fail back:

openstack dr failback <pg-id-or-name> --failback-type planned --wait

Failback instances are created with a -restored suffix. Names do not compound across round trips.

Via the REST API (site failover):

curl -s -X POST \
  -H "X-Auth-Token: $OS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"failover": {"failover_type": "unplanned"}}' \
  http://protector.site-b.example.com:8788/v1/$OS_PROJECT_ID/sites/<site-id>/action

The request body accepts only failover or failback as top-level keys.


Examples

Example 1 — Reconcile an inconsistent protection group

A planned failover was interrupted by a network partition. The group is stuck in error. Run from the accessible secondary site:

# Check current status
openstack dr protection group show web-tier-pg

# Repair the group
openstack dr protection group reconcile web-tier-pg

# Poll until complete
openstack dr operation list --protection-group web-tier-pg --operation-type reconcile

Example 2 — Create a protection group and add a member

# Register both sites (run on each cluster; both must know both sites)
openstack dr site create site-a \
    --auth-url https://keystone.site-a.example.com:5000 \
    --region USEAST \
    --service-username protector \
    --service-user-id <protector-user-id> \
    --service-project-name service \
    --service-user-domain-name Default \
    --service-project-domain-name Default \
    --service-password <protector-password>

openstack dr site create site-b \
    --auth-url https://keystone.site-b.example.com:5000 \
    --region USEAST \
    --service-username protector \
    --service-user-id <protector-user-id-site-b> \
    --service-project-name service \
    --service-user-domain-name Default \
    --service-project-domain-name Default \
    --service-password <protector-password>

# Create a protection group (async replication requires --volume-type)
openstack dr protection group create web-tier-pg \
    --primary-site site-a \
    --secondary-site site-b \
    --replication-type async \
    --volume-type replicated-ssd

# Add an instance to the group
openstack dr protection group member add web-tier-pg \
    --instance 8abe6b31-d704-4728-931d-4d6ab25540ce \
    --boot-order 1

Note: --volume-type is required for async replication. For active_dr replication it is not required, and the CLI enforces this client-side.


Example 3 — Failover with network and flavor mapping

Networks and flavors may be named differently on the secondary site. Use = as the separator between source and destination:

openstack dr failover web-tier-pg \
    --failover-type planned \
    --network-mapping private-net=dr-private-net \
    --flavor-mapping m1.large=dr.large \
    --wait \
    --wait-timeout 1800

The left side of --network-mapping must be the source network name as it appears in openstack dr operation show output. Nova instance metadata carries network names, not UUIDs, so a source UUID here matches nothing. The right side may be an ID or a name.


Example 4 — Failover to a specific recovery point

When recovering from ransomware or corruption, fail over to a known-good snapshot rather than the latest data:

# List available recovery points
openstack dr recovery point list web-tier-pg

# Fail over to a specific point
openstack dr failover web-tier-pg \
    --failover-type unplanned \
    --recovery-point <recovery-point-name-or-suffix> \
    --wait

Example 5 — Test failover and cleanup

Test failover is non-disruptive — it creates temporary VMs on the secondary site without affecting the primary:

# Run a test failover
openstack dr test failover web-tier-pg \
    --network-mapping private-net=dr-isolated-net \
    --wait

# Inspect the test VMs on the secondary site
openstack server list

# Clean up test VMs
openstack dr test failover cleanup web-tier-pg

Example 6 — Python client: failover with network mapping

from keystoneauth1 import session as ka_session
from keystoneauth1.identity import v3
from keystoneauth1 import adapter
from triliositerecovery.v1.client import Client

auth = v3.Password(
    auth_url="https://keystone.site-b.example.com:5000/v3",
    username="druser",
    password="secret",
    project_name="dr-project",
    user_domain_name="Default",
    project_domain_name="Default",
)
ks_session = ka_session.Session(auth=auth)
adapt = adapter.Adapter(
    session=ks_session,
    service_type="disaster-recovery",
    interface="public",
)
client = Client(
    session=adapt,
    endpoint="http://protector.site-b.example.com:8788",
    region_name="USEAST",
)

# Managers return plain dicts — use dict['key'], never dict.key
# pg_id is positional; network_mapping is a dict, not a 'src=dst' string
operation = client.operations.failover(
    "web-tier-pg",
    failover_type="planned",
    network_mapping={"private-net": "dr-private-net"},
    flavor_mapping={"m1.large": "dr.large"},
)

print(operation['id'])      # the operation UUID
print(operation['status'])  # 'pending' immediately after dispatch

Python client conventions:

  1. All managers return parsed JSON (plain dicts and lists). Use op['id'], not op.id.
  2. The resource ID is always the first positional argument. Passing it as a keyword argument (protection_group_id=...) raises TypeError.
  3. Mappings are dicts ({'src': 'dst'}), not 'src=dst' strings — the = separator is CLI-only.
  4. Client requires both session (a keystoneauth1 Adapter) and endpoint. Omitting endpoint produces request URLs beginning with None/ and fails at the first call.

Example 7 — Site-level failover via REST API

# Trigger unplanned failover of all PGs primary on site-a
curl -s -X POST \
  -H "X-Auth-Token: $OS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"failover": {"failover_type": "unplanned"}}' \
  http://protector.site-b.example.com:8788/v1/$OS_PROJECT_ID/sites/<site-a-id>/action

# Monitor the site operation
curl -s \
  -H "X-Auth-Token: $OS_TOKEN" \
  http://protector.site-b.example.com:8788/v1/$OS_PROJECT_ID/site-operations

Example 8 — Upgrade packages on a Juju unit

# Upgrade service packages on the charm unit
juju run trilio-site-recovery/0 upgrade-packages

# Then run the database migration
juju run trilio-site-recovery/0 db-sync

# Verify health
juju run trilio-site-recovery/0 health-check

# Upgrade the CLI on a separate client machine
sudo apt-get install --only-upgrade python3-triliositerecovery

Troubleshooting

Use this table to match what you observe to a likely cause and a fix.


Protection group stuck in failing_over or failing_back

Symptom: openstack dr protection group show returns status: failing_over or failing_back but no operation is running.

Likely cause: The failover or failback was interrupted (network partition, engine crash, timeout) before it finished.

Fix:

  1. Run openstack dr protection group show <pg> and read next_step. It names the exact command and site.
  2. Run openstack dr protection group reconcile <pg> from the accessible site.
  3. Monitor with openstack dr operation list --protection-group <pg> --operation-type reconcile.

Operation fails with Policy doesn't allow volume_extension:volume_manage to be performed (HTTP 403)

Symptom: Failover starts, reaches the volume import phase, then fails with a 403 from Cinder.

Likely cause: Cinder policy on the target site restricts volume manage/unmanage to admin. The service runs as a tenant through a Keystone trust.

Fix: Relax the following five rules in Cinder's policy on both sites:

"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"

The service deploys and reports healthy without these; they fail late, mid-failover, in a way that looks like a product fault.


Trust creation fails with a missing role error

Symptom: The first DR operation after setup fails with a message naming a missing role.

Likely cause: dr_operator or dr_site_admin does not exist on one or both sites. Trust creation names missing roles rather than skipping them.

Fix: Create the missing roles on both sites:

openstack role create dr_operator
openstack role create dr_site_admin

Then assign dr_operator to your DR users on the DR project.


openstack dr commands return local_site is not configured

Symptom: Any DR operation fails with LocalSiteNotConfigured or a similar message.

Likely cause: local_site is not set in /etc/protector/protector.conf on this node.

Fix:

  • Juju: juju config trilio-site-recovery local-site="<site-name>"
  • Kolla/bare-metal: Set local_site = <site-name> in the [DEFAULT] section of /etc/protector/protector.conf and restart the service.

Failover reports 2 of 2 volumes missing or destroyed

Symptom: Failover completes with errors reporting volumes missing, but the volumes exist on the array.

Likely cause: primary_site_name and secondary_site_name are mismatched — the driver is reading the wrong array's state. This happens when primary_site_name does not name the site whose array is at primary_management_ip.

Fix: Correct the [pure_storage] section so that each *_site_name names the site whose array is at the matching *_management_ip. The driver resolves which array to contact by site name, not by node position. An identical section can work correctly on both nodes. Do not invert the section to fix this — that recreates the problem.


Juju unit lands in BLOCKED after upgrade

Symptom: After running juju refresh, the unit shows BLOCKED with message set local-site, pure-primary-site-name, pure-secondary-site-name.

Likely cause: This is expected after a 1.0.20+ upgrade. The charm requires these options to be set explicitly; it no longer infers site identity.

Fix:

juju config trilio-site-recovery \
    local-site="site-a" \
    pure-primary-site-name="site-a" \
    pure-secondary-site-name="site-b"

--network-mapping has no effect; failover uses wrong network

Symptom: You passed --network-mapping but the recovered VMs land on a different network than expected.

Likely cause: The separator was : instead of =. Argparse accepts a colon-separated value as one opaque string; the mapping silently does not apply and the engine falls back to resolving by name.

Fix: Use = as the separator:

--network-mapping private-net=dr-private-net

Also confirm the left side is the source network name (not UUID). Instance metadata is keyed by network name, so a source UUID matches nothing.


--probe shows resources missing even though they exist on the target site

Symptom: openstack dr replication health <pg> --probe reports networks or flavors missing, but you can see them in openstack network list on the secondary site.

Likely cause: The resources exist on the target site but belong to a different project. --probe resolves resources through the same trust-scoped session a real failover uses, scoped to the DR project. A resource in another project is correctly reported missing.

Fix: Ensure the networks, security groups, and flavors the PG needs exist in the correct project on the secondary site — not just anywhere on the cloud. If the projects differ between sites, create a tenant mapping with openstack dr tenant mapping create.


Failback appears to hang on volume detach

Symptom: Failback is running but takes much longer than expected per volume.

Likely cause: This is the expected behavior. Failback waits up to 120 seconds per volume for Nova to release the Cinder attachment after the DR instance is deleted. Nova does not release attachments synchronously. The wait is best-effort: a volume still attached at the deadline is unmanaged anyway and logged, not raised, so failback is not aborted.

Fix: No action needed unless the wait exceeds 120 seconds per volume. If it does, check that the DR instance was actually deleted on the secondary site and that Cinder is not reporting an error state for the volume.


OpenShift: oc logs returns No resources found

Symptom: oc -n trilio-site-recovery logs -l app=trilio-site-recovery-api returns nothing.

Likely cause: The app label does not exist on these pods. The correct selector requires both app.kubernetes.io/name and app.kubernetes.io/component.

Fix:

# API pods
oc -n trilio-site-recovery logs \
  -l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api

# Engine pods
oc -n trilio-site-recovery logs \
  -l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=engine

On OpenShift, logs go to stdout only. There is no /var/log/protector/ directory to fall back to.


Database migration fails with ENUM value does not exist

Symptom: Running protector-manage db sync fails when crossing migration 022_add_reconcile_operation_type.

Likely cause: The ENUM in dr_operations.operation_type does not contain the uppercase member names expected by migration 022. This must be validated before the migration runs.

Fix: Run the preflight check manually before db sync on Kolla and bare-metal deployments:

protector-manage db preflight
protector-manage db sync

On Juju, the db-sync charm action runs the preflight automatically — use the action, not the bare command.


Operation show has blank source_site and target_site columns

Symptom: openstack dr operation show <id> displays empty values for source_site and target_site.

Likely cause: This was a bug (fixed in the current release). Earlier versions emitted only source_site_id / target_site_id in the API response; the CLI read source_site / target_site and found nothing. The API now emits the site name, falling back to the ID.

Fix: Upgrade python3-triliositerecovery and the service to the current release. After the upgrade, the columns will display the site name.


LUKS-encrypted volume cannot be added to a protection group

Symptom: openstack dr protection group member add fails with InvalidInput for an instance with an encrypted volume.

Likely cause: LUKS-encrypted volumes are explicitly unsupported. Cinder's manage API cannot associate Barbican keys on the DR site, so an encrypted volume cannot be recovered.

Fix: Use array-side encryption (Pure data-at-rest encryption) instead of host-side LUKS encryption for volumes that need to be DR-protected.