Components
API service, workers/agents, scheduler/conductor, RPC, database
This page describes the runtime components of Trilio Site Recovery for OpenStack: what each process does, how they communicate, and how the database and message bus connect them. Understanding the component topology helps you diagnose failures, plan capacity, and reason about where configuration changes take effect. The service runs as two long-lived processes — protector-api and protector-engine — backed by a MariaDB/MySQL database and a RabbitMQ message bus, and integrates with Keystone, Nova, Cinder, and Neutron on both the primary and recovery sites.
Before working with the components described here, you need:
- Two independent OpenStack clusters (or regions) running OpenStack Victoria or later, each with Keystone, Nova, Cinder, and Neutron
- MariaDB or MySQL accessible to the protector service (the database is named
protectorby default) - RabbitMQ with the
protectorvhost andprotectoruser configured - Keystone roles
dr_operatoranddr_site_admincreated on both sites before any service starts — trust creation fails at runtime if either role is absent - The Trilio apt repository configured at
/etc/apt/sources.list.d/trilio-site-recovery.list(URL:https://apt.fury.io/trilio-os-site-recovery-master/) for Juju and bare-metal deployments - For production use: Pure Storage FlashArray with async replication configured between both sites, and the
python3-pure-clientpackage installed on every node runningprotector-engine - Network connectivity between both sites on port 8788 (protector API), 5000 (Keystone), 8774 (Nova), and 8776 (Cinder)
Installation method depends on your deployment model. Choose the path that matches your infrastructure.
Juju (Charmed OpenStack)
The trilio-site-recovery-for-openstack charm installs and manages both services on Ubuntu Jammy or Noble machines.
1. Deploy the charm:
juju deploy trilio-site-recovery-for-openstack \
--channel latest/stable \
--config local-site=site-primary \
--config pure-primary-management-ip=192.0.2.10 \
--config pure-primary-api-token=YOUR-PRIMARY-TOKEN \
--config pure-secondary-management-ip=192.0.2.20 \
--config pure-secondary-api-token=YOUR-SECONDARY-TOKEN \
--config pure-primary-site-name=site-primary \
--config pure-secondary-site-name=site-secondary
2. Add relations:
juju relate trilio-site-recovery-for-openstack:shared-db mysql-innodb-cluster:db-router
juju relate trilio-site-recovery-for-openstack:amqp rabbitmq-server:amqp
juju relate trilio-site-recovery-for-openstack:identity-credentials keystone:identity-credentials
Note: The charm relation endpoints are
shared-db,amqp, andidentity-credentials— use these exact names.
3. Run database migration:
juju run trilio-site-recovery-for-openstack/leader db-sync
The db-sync action runs protector-manage db preflight automatically before applying migrations. If the ENUM preflight check fails, the action exits non-zero and prints which tokens are unrecognised — do not proceed until this passes.
4. Register the service in Keystone:
juju run trilio-site-recovery-for-openstack/leader register-service
5. Verify the unit is healthy:
juju run trilio-site-recovery-for-openstack/leader health-check
After an upgrade to charm revision 16 or later, the unit may land in BLOCKED with the message set local-site, pure-primary-site-name, pure-secondary-site-name. This is expected — the charm does not infer site identity. Set the required config options to clear the blocked state:
juju config trilio-site-recovery-for-openstack \
local-site=site-primary \
pure-primary-site-name=site-primary \
pure-secondary-site-name=site-secondary
6. (Optional) Install the Horizon dashboard plugin:
juju deploy trilio-site-recovery-for-openstack-dashboard
juju relate trilio-site-recovery-for-openstack-dashboard:dashboard-plugin openstack-dashboard:dashboard-plugin
juju run trilio-site-recovery-for-openstack-dashboard/leader install-plugin
7. Install the CLI on client nodes:
The charm manages packages on the unit it runs on. Any machine running the openstack dr CLI that is not managed by the charm needs the client package installed separately:
apt-get install python3-triliositerecovery
When upgrading, the charm's upgrade-packages action upgrades the unit only. Upgrade the CLI on client machines separately:
apt-get install --only-upgrade python3-triliositerecovery
Kolla-Ansible
The Kolla install script deploys and manages the protector_api and protector_engine Docker containers alongside your existing Kolla-managed OpenStack services.
1. Run the installer for each site:
bash deploy/kolla/install.sh <cluster_ip> <cluster_name>
To install on both sites at once:
bash deploy/kolla/install.sh all
The script builds the protector:latest image, copies the site-specific protector.conf, creates the protector database and user in the Kolla MariaDB container, runs create-tables and db-sync, registers the service in Keystone, and starts the containers.
2. Run the ENUM preflight check manually before crossing migration 022:
Unlike the Juju charm's db-sync action, the bare protector-manage db sync command does not run the preflight automatically. If you are upgrading across migration 022_add_reconcile_operation_type, run the preflight first:
protector-manage db preflight
If it exits non-zero, do not run db sync until the column tokens match the expected member names.
3. Run database migrations:
protector-manage db sync
This is the only supported way to run migrations. Do not invoke alembic directly with a hand-specified alembic.ini path — the installed path is /usr/share/trilio-site-recovery/alembic.ini, not /etc/protector/alembic.ini.
Red Hat OpenStack Services on OpenShift (RHOSO18)
Do not apply the manifests from deploy/openshift/manifests/ individually. The installer script applies all twelve manifests in the correct order, creates the database and RabbitMQ user, registers the service in Keystone, and waits for each init Job to complete before starting the Deployments.
bash deploy/openshift/scripts/install.sh \
--namespace trilio-site-recovery \
--image docker.io/xyzmd/trilio-site-recovery-openstack:dev
The script applies manifests in this order: namespace → serviceaccount → configmap → secret → job-db-init (waits for completion) → job-rabbitmq-init (waits) → job-keystone-init (waits) → job-db-sync (waits) → service → trilio-site-recovery-api Deployment → trilio-site-recovery-engine Deployment.
Skipping any of these steps — particularly the four init Jobs — leaves the Deployments unable to reach the database, RabbitMQ, or Keystone.
All configuration lives in /etc/protector/protector.conf, an INI-style file managed by oslo.config. Under Juju, the charm renders this file on every hook; do not edit it directly. Use juju config for options the charm models, and config-flags for anything else:
juju config trilio-site-recovery-for-openstack config-flags="engine:cross_site_timeout=60"
Under Kolla and bare-metal deployments, edit the file directly and restart both services.
[DEFAULT]
| Option | Type | Default | Purpose |
|---|---|---|---|
local_site | string | (none) | Required. The name or UUID of the DR site this node belongs to, exactly as registered with openstack dr site create. The service has no inference fallback — leaving this unset causes every DR operation to fail with LocalSiteNotConfigured. Set it differently on each site. |
host | string | localhost | Hostname of this node. |
rpc_conn_pool_size | integer | 30 | Size of the oslo.messaging RPC connection pool. |
use_mock_storage | boolean | false | Use the in-memory mock storage driver instead of a real array. For evaluation only. |
use_mock_cinder | boolean | false | Simulate Cinder API calls. For evaluation only. |
cinder_backend_names | list | (empty) | Cinder backend names associated with this node. |
[api]
| Option | Type | Default | Purpose |
|---|---|---|---|
bind_host | string | 0.0.0.0 | Address the gunicorn API server binds to. |
bind_port | integer | 8788 | TCP port for the REST API. All inter-site and client traffic uses this port. |
workers | integer | 4 | Number of gunicorn worker processes. |
[database]
| Option | Type | Default | Purpose |
|---|---|---|---|
connection | string | mysql+pymysql://protector:password@localhost/protector | SQLAlchemy connection URL for the protector database. The database name, user, and password must match what was created during installation. |
[engine]
| Option | Type | Default | Purpose |
|---|---|---|---|
topic | string | protector-engine | RabbitMQ topic the engine listens on. The API publishes to the same topic. |
cross_site_timeout | integer | 30 | Seconds any single cross-site API call may take. Raise this for slow inter-site links. Without a timeout, an unreachable peer blocks the gunicorn worker until the OS closes the socket — after the local half of the operation has already been committed. |
recovery_point_interval_minutes | integer | 0 | Interval between scheduled recovery point snapshots for ActiveDR groups. 0 disables scheduling. |
recovery_point_max_count | integer | 20 | Maximum on-demand recovery point snapshots to retain per protection group. |
recovery_point_ttl_hours | integer | 24 | Automatically delete recovery point snapshots older than this many hours. |
auto_create_security_groups | boolean | false | Create missing security groups on the recovery site during failover. Off by default because writing to the recovery site's cloud should be an explicit operator decision. |
coverage_refresh_interval_minutes | integer | 15 | Background refresh interval for volume replication coverage. 0 disables. |
floating_ip_refresh_interval_minutes | integer | 15 | Background re-capture interval for floating IPs on protected instances. 0 disables. |
[storage]
| Option | Type | Default | Purpose |
|---|---|---|---|
storage_driver | string | mock | Which storage backend to use. Accepted short names: mock (evaluation, no hardware required), pure (Pure Storage FlashArray, production), drbd (in development, not for production). A full Python class path is also accepted, e.g. protector.engine.storage.drivers.pure_driver.PureStorageDriver. |
[pure_storage]
Required when storage_driver = pure. Both sites can share an identical [pure_storage] section — the driver resolves which array to talk to by matching the protection group's primary_site_name against primary_site_name and secondary_site_name. The invariant is the pairing: primary_site_name must name the site whose array is at primary_management_ip.
| Option | Type | Default | Purpose |
|---|---|---|---|
primary_management_ip | string | (none) | Management IP or hostname of the primary FlashArray. |
primary_api_token | string | (none) | API token for the primary FlashArray. |
secondary_management_ip | string | (none) | Management IP or hostname of the secondary FlashArray. |
secondary_api_token | string | (none) | API token for the secondary FlashArray. |
primary_site_name | string | (empty) | OpenStack site name that uses the primary FlashArray. Must match the name used with openstack dr site create. |
secondary_site_name | string | (empty) | OpenStack site name that uses the secondary FlashArray. |
verify_ssl | boolean | false | Verify TLS certificates for Pure array REST API calls. |
default_rpo_seconds | integer | 900 | Default RPO target in seconds for async replication. |
snapshot_interval_seconds | integer | 300 | Default snapshot interval for async replication. |
additional_arrays | list | (empty) | Names of additional array pair sections, e.g. array-pair-2. Each name must have a corresponding [pure_array:array-pair-2] section. |
Multiple array pairs: Each additional pair uses a [pure_array:<name>] section with the same keys as [pure_storage], plus cinder_backend_names to associate Cinder backends with that pair.
[pure_storage]
additional_arrays = array-pair-2
[pure_array:array-pair-2]
primary_management_ip = 192.0.2.30
primary_api_token = TOKEN-C
secondary_management_ip = 192.0.2.40
secondary_api_token = TOKEN-D
primary_site_name = site-primary
secondary_site_name = site-secondary
cinder_backend_names = cinder-backend-b
[service_credentials]
| Option | Type | Default | Purpose |
|---|---|---|---|
default_trust_roles | list | member,dr_operator | Roles delegated by every per-tenant Keystone trust. member grants Nova/Cinder access; dr_operator satisfies Protector's cross-site sync policy. Every role named here must exist on every site — trust creation fails rather than skipping a missing role. Do not remove member: dropping it removes the Nova/Cinder access the trust needs, so failover fails at the first instance or volume call after storage work is complete. The default is correct; omit this option from your config unless you have a specific reason to change it. |
cafile | string | (none) | PEM-encoded CA bundle for verifying Keystone and OpenStack endpoint TLS certificates. |
insecure | boolean | false | Disable TLS certificate verification for all OpenStack endpoints. |
default_service_project | string | service | Default project name for service accounts. |
default_service_user_domain | string | Default | Default domain for service users. |
default_service_project_domain | string | Default | Default domain for service projects. |
[keystone_authtoken]
| Option | Type | Purpose |
|---|---|---|
auth_url | string | Keystone endpoint for token validation. |
www_authenticate_uri | string | Public Keystone URI returned in WWW-Authenticate headers. |
[mock_storage]
Used only when storage_driver = mock. State is stored under /var/lib/protector.
| Option | Type | Default | Purpose |
|---|---|---|---|
storage_base_path | string | /var/lib/protector/mock_storage | Base path for the mock storage SQLite database. |
primary_array_name | string | primary-array | Name for the simulated primary array. |
secondary_array_name | string | secondary-array | Name for the simulated secondary array. |
Annotated sample protector.conf
[DEFAULT]
# REQUIRED: the name this node was registered under with 'openstack dr site create'
# Set differently on each site — there is no inference fallback.
local_site = site-primary
[api]
bind_host = 0.0.0.0
bind_port = 8788
workers = 4
[database]
connection = mysql+pymysql://protector:DBPASS@localhost/protector
[keystone_authtoken]
auth_url = https://keystone.site-primary.example.com:5000/v3
www_authenticate_uri = https://keystone.site-primary.example.com:5000
[engine]
topic = protector-engine
# Raise for slow inter-site links; default 30s is correct for LAN-latency sites.
cross_site_timeout = 30
[storage]
storage_driver = pure
[pure_storage]
primary_management_ip = 192.0.2.10
primary_api_token = T-PRIMARY-TOKEN
secondary_management_ip = 192.0.2.20
secondary_api_token = T-SECONDARY-TOKEN
# These names must match the site names used with 'openstack dr site create'.
# The pairing is the invariant: primary_site_name names the site at primary_management_ip.
primary_site_name = site-primary
secondary_site_name = site-secondary
verify_ssl = false
default_rpo_seconds = 900
snapshot_interval_seconds = 300
[service_credentials]
# Default is correct. Only set this if you have added a custom role.
# default_trust_roles = member,dr_operator
cafile = /etc/protector/ca.pem
Understanding the two processes
protector-api is the WSGI front-end. It runs under gunicorn, validates Keystone tokens, enforces RBAC, and dispatches long-running DR work to the engine over RabbitMQ. All REST and CLI requests pass through it on port 8788.
protector-engine is the RPC worker. It executes every DR workflow — failover, failback, test failover, reconcile, metadata synchronisation, and storage replication management — by consuming messages from the protector-engine RabbitMQ topic. It is the only process that talks to Pure Storage arrays and to the peer site's OpenStack APIs.
The two processes must both be running for the service to function. The API returns HTTP 503 when it cannot reach the engine over RabbitMQ.
Checking service health
Under Juju, use the charm's health-check action:
juju run trilio-site-recovery-for-openstack/leader health-check
Under Kolla, check the container status:
sudo docker ps --filter name=protector_api
sudo docker ps --filter name=protector_engine
Under OpenShift, check the Deployment status using the correct label selector:
oc -n trilio-site-recovery get pods \
-l 'app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api'
oc -n trilio-site-recovery get pods \
-l 'app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=engine'
Viewing logs
Under Juju and Kolla, logs are written to /var/log/protector/. Under OpenShift, both containers log to stdout only — there is no log file. Use oc logs with the correct label selector:
# API logs
oc -n trilio-site-recovery logs \
-l 'app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api' \
--tail=100
# Engine logs
oc -n trilio-site-recovery logs \
-l 'app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=engine' \
--tail=100
Database management
Run migrations (Kolla and bare-metal):
protector-manage db sync
Check the current schema revision:
protector-manage db current
Run the ENUM preflight check before crossing migration 022 on Kolla or bare-metal:
protector-manage db preflight
The Juju db-sync action runs the preflight automatically. On Kolla and bare-metal, you must run it manually before db sync when upgrading across migration 022_add_reconcile_operation_type.
Stamp at a specific revision (without running migrations):
protector-manage db stamp 021_add_member_status_reason
RabbitMQ transport
The API and engine communicate over oslo.messaging. The engine subscribes to the topic protector-engine on the RabbitMQ vhost protector. The connection string is set in [DEFAULT] transport_url (or derived from the charm's amqp relation data). If the engine is not consuming messages, the API will time out on its RPC call and return HTTP 503.
Observability
The service does not emit oslo.messaging notifications. No event stream exists for protection_group.failover or similar lifecycle events. Monitor the service by polling:
openstack dr replication health <pg>— replication lag, RPO compliance, link statusopenstack dr replication health <pg> --probe— also asks the recovery site whether the group's networks, security groups, and flavors resolve there, as the project it recovers into. This talks to the peer site and is slower than the plain command; run it before a planned failover window.openstack dr replication audit— volumes being replicated by the arrays that no protection group accounts foropenstack dr recovery point list <pg>— available recovery point snapshotsopenstack dr operation listandopenstack dr operation show <op>— operation history with status, progress (0–100), source site name, and target site name
Keystone integration
The service registers in Keystone as service type disaster-recovery (also registered as protector). The service user is protector. Two roles must exist on both sites:
dr_operator— required for DR operations and cross-site sync policydr_site_admin— cloud-wide role for site registration, tenant mapping, site failover, and replication audit. Grant this on the admin project only — it carries no project scope, so a holder on any project can register sites and map tenants for every project in the cloud.
The charm creates both roles but grants neither automatically. The dr_site_admin grant to your cloud operator and per-project dr_operator grants are your responsibility.
Register two sites (run once per deployment)
# On site-primary — register itself
openstack dr site create site-primary \
--auth-url https://keystone.site-primary.example.com:5000/v3 \
--service-username protector \
--service-password SERVICE-PASS \
--service-project-name service
# On site-primary — register the peer
openstack dr site create site-secondary \
--auth-url https://keystone.site-secondary.example.com:5000/v3 \
--service-username protector \
--service-password SERVICE-PASS \
--service-project-name service
Create a protection group
openstack dr protection group create my-app-pg \
--primary-site site-primary \
--secondary-site site-secondary \
--replication-type async \
--volume-type cinder-replicated
--volume-type is required when --replication-type async. For active_dr replication it is not required. The --volume-type flag maps to the API field volume_type_id.
Add a member
openstack dr protection group member add my-app-pg \
--instance a1b2c3d4-0000-0000-0000-000000000001
Only instances that boot from a Cinder volume can be protected. Instances with LUKS-encrypted volumes are rejected; use array-side encryption (Pure data-at-rest) instead.
Check replication health before a failover window
# Fast check — storage link status and RPO from the local site
openstack dr replication health my-app-pg
# Full pre-failover check — also verifies that networks, security groups,
# and flavors resolve on the recovery site as the project it recovers into
openstack dr replication health my-app-pg --probe
The --probe flag does not test storage or replication lag. It queries the recovery site's Neutron and Nova through the same trust-scoped session a real failover uses, so a resource that exists on the recovery site but belongs to a different project is correctly reported missing.
Fail over a protection group
# Planned failover with explicit network and flavor mappings
openstack dr failover my-app-pg \
--failover-type planned \
--network-mapping src-net-id=dst-net-id \
--flavor-mapping src-flavor-id=dst-flavor-id \
--wait
The separator in --network-mapping and --flavor-mapping is =, not :. A colon-separated value is accepted by argparse as a single opaque string, so the mapping silently does not apply and the operation falls back to resolving resources by name.
After a successful failover, the recovered instance is named <original-name>-failover. After a subsequent failback, it becomes <original-name>-restored. The member row preserves the original name, so suffixes do not compound over a round trip, but the workload never returns to its original name — update DNS, monitoring, and CMDB entries accordingly.
Fail back
openstack dr failback my-app-pg --wait
Failback waits for each DR volume's Nova attachment to release (up to 120 seconds per volume) before unmanaging it. A visibly slower failback is the wait working, not a hang.
Reconcile an inconsistent protection group
If a failover or failback was interrupted, the protection group may be left in an inconsistent state. Run reconcile from the recovery site (the peer of the site that is unreachable):
openstack dr protection group reconcile my-app-pg
Reconcile inspects storage, VMs, and operation history to repair the group's status, relink discovered VMs, restart SHUTOFF workloads on the writable site, and synchronise the corrected state to the peer. Each reconcile is recorded as an operation of type reconcile and appears in openstack dr operation list.
Python client library
from keystoneauth1 import session as ks_session
from keystoneauth1.identity import v3 as identity_v3
from keystoneauth1 import adapter
from triliositerecovery.v1.client import Client
auth = identity_v3.Password(
auth_url='https://keystone.site-primary.example.com:5000/v3',
username='myuser',
password='mypass',
project_name='myproject',
user_domain_name='Default',
project_domain_name='Default',
)
sess = ks_session.Session(auth=auth)
adp = adapter.Adapter(
session=sess,
service_type='protector',
interface='public',
region_name='RegionOne',
)
client = Client(
session=adp,
endpoint='https://protector.site-primary.example.com:8788/v1/TENANT-ID',
region_name='RegionOne',
)
# List sites — returns plain dicts, not resource objects
for site in client.sites.list():
print(site['name'], site['id']) # use site['key'], not site.key
# Create a protection group
pg = client.protection_groups.create(
name='my-app-pg',
primary_site_id='SITE-PRIMARY-UUID',
secondary_site_id='SITE-SECONDARY-UUID',
replication_type='async',
volume_type_id='VOLUME-TYPE-UUID', # note: volume_type_id, not volume_type
)
print(pg['id'])
# Fail over — DR operations are on client.operations, not client.protection_groups
# pg_id is a positional argument, not a keyword
op = client.operations.failover(
pg['id'],
failover_type='planned',
network_mapping={'src-net-id': 'dst-net-id'}, # dict, not 'src=dst' string
)
print(op['id'], op['status'])
# Check replication health with probe
health = client.protection_groups.replication_health(pg['id'], probe=True)
print(health)
# Reconcile — also on client.operations
reconcile_op = client.operations.reconcile(pg['id'])
print(reconcile_op['id'])
Key conventions:
- Every manager returns parsed JSON (plain dicts and lists). Write
site['id'], notsite.id. - The resource ID is the first positional argument to methods like
failover,test_failover,cleanup_test_failover,replication_health, andreconcile. Passing it as a keyword (protection_group_id=...) raisesTypeError. - Network and flavor mappings are dicts (
{'src-id': 'dst-id'}), not'src=dst'strings. The=separator is argparse syntax in the CLI only. Clientrequires bothsession(a keystoneauth1Adapter) andendpoint. Omittingendpointcauses every request URL to begin withNone/.- DR operation methods (
failover,failback,test_failover,cleanup_test_failover,reconcile,cancel) are onclient.operations(OperationManager), not onclient.protection_groups.
Site-level failover (all protection groups)
Site-level failover requires the dr_site_admin role and is recorded as a site operation:
# Fail over all protection groups at site-primary to their secondary sites
openstack dr site failover site-primary --failover-type planned
# Monitor the site operation
openstack dr site operation list --site site-primary
openstack dr site operation show SITE-OP-UUID
The REST endpoint for site failover accepts only failover or failback as the top-level key:
curl -s -X POST \
-H "X-Auth-Token: $OS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"failover": {"failover_type": "planned"}}' \
https://protector.site-primary.example.com:8788/v1/TENANT-ID/sites/SITE-UUID/action
Unit lands in BLOCKED after charm upgrade
Symptom: juju status shows the unit blocked with message set local-site, pure-primary-site-name, pure-secondary-site-name.
Cause: The charm does not infer site identity. After an upgrade (particularly to revision 16+), required config options must be set explicitly.
Fix:
juju config trilio-site-recovery-for-openstack \
local-site=site-primary \
pure-primary-site-name=site-primary \
pure-secondary-site-name=site-secondary
DR operations fail with LocalSiteNotConfigured
Symptom: Every DR operation returns HTTP 500 with LocalSiteNotConfigured.
Cause: The local_site option in [DEFAULT] is unset or names a site not registered in the database.
Fix: Set local_site to the exact name used with openstack dr site create, restart both services, and verify with openstack dr site list.
Trust creation fails with a missing role error
Symptom: The first DR operation fails with an error naming dr_operator or another role as missing.
Cause: Keystone trusts are created on demand. Trust creation fails and names the missing role rather than skipping it. The role must exist on both sites before any DR operation runs.
Fix:
# Run on both sites
openstack role create dr_operator
openstack role create dr_site_admin
Failover fails mid-operation with volume_extension:volume_manage ... HTTP 403
Symptom: The cloud deploys and reports healthy. The first failover fails partway through with a Cinder 403 error.
Cause: Failover imports replicated volumes through Cinder's manage API, which stock Cinder restricts to admin. The service runs as a tenant through a Keystone trust.
Fix: Apply all five Cinder policy relaxations 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"
Under Juju, deliver the override as a policyd ZIP:
juju attach-resource trilio-site-recovery-for-openstack policyd-override=cinder-policy-override.zip
ENUM preflight fails before migration 022
Symptom: protector-manage db preflight exits non-zero and prints tokens the model does not define.
Cause: The dr_operations.operation_type column holds lowercase values (e.g. 'failover') instead of the uppercase member names ('FAILOVER') that migration 022 expects.
Fix: Do not run db sync until the column tokens match. Check the current tokens:
SHOW COLUMNS FROM dr_operations LIKE 'operation_type';
Contact Trilio support if you need to convert existing rows before migrating.
API returns HTTP 503 for all requests
Symptom: Every API request returns 503 Service Unavailable with message Database temporarily unavailable.
Cause: The fault middleware wraps any OperationalError, InterfaceError, or DisconnectionError as HTTP 503. This is a local database connectivity problem, not a cross-site reachability issue.
Fix: Check that the database is running and that the connection string in [database] connection is correct. Under Kolla, verify the MariaDB container is healthy:
sudo docker ps --filter name=mariadb
Operation stuck in running after engine restart
Symptom: openstack dr operation show <op> shows status running or pending after a service restart.
Cause: The engine marks orphaned operations as failed on startup by reading the last checkpoint phase from result_data. If the engine process was killed, the in-flight operation was interrupted.
Fix: The engine handles this automatically at startup. If an operation is still showing running after both services have restarted, check the engine logs for the orphan recovery output. If the protection group is in an inconsistent state, run:
openstack dr protection group reconcile <pg>
OpenShift pods not found with label selector
Symptom: oc logs -l app=trilio-site-recovery-api prints No resources found.
Cause: The OpenShift manifests do not use a bare app label. Only app.kubernetes.io/name and app.kubernetes.io/component are set.
Fix: Use the correct two-part selector:
oc -n trilio-site-recovery logs \
-l 'app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api'
For the engine:
oc -n trilio-site-recovery logs \
-l 'app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=engine'
On OpenShift, oc logs is the only way to read service output — there is no /var/log/protector/ directory in the containers.
Network mapping silently not applied during failover
Symptom: Failover completes but the recovered instance is on the wrong network.
Cause: The --network-mapping separator is =, not :. A colon-separated value is accepted by argparse as a single opaque string with no error, so the mapping is not applied and the engine falls back to resolving resources by name.
Fix: Use = as the separator:
--network-mapping src-net-id=dst-net-id
Failback appears to hang on volume detach
Symptom: Failback is visibly slow and the engine logs show repeated detach checks.
Cause: 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. This is expected behaviour, not a hang.
Resolution: Wait for the detach to complete. If the timeout is reached, the volume is unmanaged anyway and the event is logged (not raised), so failback continues. A site with slow detaches will show a visibly longer failback; this is the wait working correctly.
config-flags causes DuplicateSectionError
Symptom: Setting a config-flags option that the charm already renders causes a DuplicateSectionError in tooling that reads protector.conf.
Cause: The charm template renders some config keys into named sections. If config-flags names a key in a section the template already writes, that section appears twice in the file. oslo.config tolerates this (last value wins), but Python's configparser and some support tools do not.
Fix: Only use config-flags for keys the charm template does not already render. For example, engine.cross_site_timeout is safe:
juju config trilio-site-recovery-for-openstack config-flags="engine:cross_site_timeout=60"
To check whether a key is already modelled, review the 47 charm config options listed in the charm documentation.