Trilio Site Recovery for OpenStackOpenStack native DR service
Guide

Configuration (oslo.config)

The .conf file, its option groups, and an annotated sample


Overview

This page describes every configuration option that Trilio Site Recovery for OpenStack reads from its INI-style configuration file at /etc/protector/protector.conf. The service uses oslo.config, so options are grouped by section, each with a type, a default, and a description of its effect on behaviour. Read this page when you are preparing a new deployment, tuning an existing one, or diagnosing a service that is not behaving as expected. The annotated sample at the end of the page shows how the sections fit together for a two-site Pure Storage production deployment.


Prerequisites

Before editing protector.conf you need:

  • The trilio-site-recovery Debian package installed from the Trilio apt repository at https://apt.fury.io/trilio-os-site-recovery-master/ (configured at /etc/apt/sources.list.d/trilio-site-recovery.list). The package writes the configuration directory at /etc/protector/ and the sample file at etc/protector/protector.conf.sample.
  • A running MariaDB or MySQL instance accessible to the service node, with a protector database and user created.
  • A RabbitMQ broker reachable from both the API and engine nodes. The default vhost is protector and the default user is protector.
  • Keystone roles dr_site_admin and dr_operator created on both sites before the service starts. Trust creation fails if either role is absent.
  • For Pure Storage deployments: the python3-pure-client package installed on every node running protector-engine.
  • Network connectivity between both sites on port 8788 (protector API), 5000 (Keystone), 8774 (Nova), and 8776 (Cinder).

Installation

The configuration file is managed differently depending on your deployment tool.

Juju (Charmed OpenStack)

The trilio-site-recovery-for-openstack charm writes /etc/protector/protector.conf automatically from charm configuration. You do not edit the file directly; instead you set charm options:

juju config trilio-site-recovery local-site=london
juju config trilio-site-recovery storage-driver=pure
juju config trilio-site-recovery pure-primary-management-ip=192.0.2.10
juju config trilio-site-recovery pure-primary-api-token=YOUR-TOKEN
juju config trilio-site-recovery pure-secondary-management-ip=192.0.2.20
juju config trilio-site-recovery pure-secondary-api-token=YOUR-TOKEN
juju config trilio-site-recovery pure-primary-site-name=london
juju config trilio-site-recovery pure-secondary-site-name=frankfurt

After setting options, run the database migration action:

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

To pass any configuration key that the charm does not model directly, use config-flags:

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

Warning: Do not use config-flags to repeat a key the charm already renders — configparser raises DuplicateSectionError for a duplicated section. Keys listed in the charm's 47 built-in options should be set through those options, not through config-flags.

Kolla-Ansible

The Kolla install script renders protector.conf from a site worksheet:

python3 tools/worksheet_to_kolla_conf.py deploy/site-worksheet.yaml
bash deploy/kolla/install.sh all --worksheet deploy/site-worksheet.yaml

This writes generated/protector-<site>/protector.conf for each site. To apply schema migrations manually after editing the file:

protector-manage db sync

Manual / bare-metal

  1. Copy the sample file:

    cp /etc/protector/protector.conf.sample /etc/protector/protector.conf
    chmod 640 /etc/protector/protector.conf
    chown protector:protector /etc/protector/protector.conf
    
  2. Edit the file and replace every CHANGEME-* placeholder.

  3. Run migrations:

    protector-manage db sync
    

    protector-manage db sync reads /etc/protector/protector.conf by default. Pass --config-file to override the path.


Configuration

Options are grouped by section. Every section and key name below is authoritative — use them exactly as shown.


[DEFAULT]

Top-level options that do not belong to a specific subsystem.

OptionTypeDefaultDescription
hoststringlocalhostHostname of this node. Used in log messages and as an identifier in some RPC paths.
local_sitestring(none)Required. The name or UUID of the DR site this node belongs to, exactly as registered with openstack dr site create. The service does not infer which site it is on — it must be told. Set this to the same name on both nodes at a site, and to a different name at each site. Without it the service starts in a blocked state and refuses all DR operations.
rpc_conn_pool_sizeinteger30Size of the oslo.messaging RPC connection pool. Raise this if you see pool exhaustion errors under high concurrency.
use_mock_storagebooleanfalseUse the in-memory mock storage backend instead of a real array. The mock driver requires no hardware and is suitable for initial deployment validation. Set to false for any production deployment.
use_mock_cinderbooleanfalseSubstitute mock Cinder calls for real Cinder API calls. Useful for development; never set in production.

[api]

Controls how protector-api binds and how many workers it spawns.

OptionTypeDefaultDescription
bind_hoststring0.0.0.0Address the API listens on. Set to a specific IP to restrict access.
bind_portinteger8788TCP port for the API. Both sites must be reachable on this port from each other and from clients.
workersinteger4Number of WSGI worker processes. Scale this to the number of CPU cores available to the API node.

[database]

OptionTypeDefaultDescription
connectionstringmysql+pymysql://protector:password@localhost/protectorSQLAlchemy connection URL for the protector database. The default points at a local MariaDB/MySQL with the protector user, password, and database; override it with your real host, credentials, and database name. Example: mysql+pymysql://protector:PASSWORD@DB-HOST:3306/protector. The database name, user, and default password all default to protector in a charm-managed deployment.

[engine]

Controls the behaviour of the protector-engine background service.

OptionTypeDefaultDescription
topicstringprotector-engineRabbitMQ RPC topic the engine subscribes to. The API publishes to this topic; both sides must agree.
recovery_point_interval_minutesinteger0Interval between scheduled recovery point snapshots for ActiveDR protection groups. 0 disables scheduling; snapshots can still be created on demand.
coverage_refresh_interval_minutesinteger15How often the engine re-verifies that each member's volumes are present in the replicated consistency group. 0 disables background refresh.
floating_ip_refresh_interval_minutesinteger15How often the engine re-captures floating IP assignments on protected instances and syncs changes to the DR site. 0 disables background refresh.
recovery_point_max_countinteger20Maximum number of on-demand recovery point snapshots retained per protection group. Older snapshots are pruned when this limit is reached.
recovery_point_ttl_hoursinteger24Automatically delete recovery point snapshots older than this many hours.
auto_create_security_groupsbooleanfalseWhen true, the engine creates missing security groups on the DR site during failover, translating rules into the target site's terms. Rules that cannot be translated are reported rather than copied. Leave false if security group creation on the DR site should require explicit operator action.
cross_site_timeoutinteger30Seconds any single cross-site call (Keystone token exchange, remote API request) may take before being aborted. Raise this value for slow inter-site WAN links. Without a timeout, an unreachable peer can block a gunicorn worker until the worker is killed, leaving the client with a closed connection and no response.

[keystone_authtoken]

Passed directly to keystonemiddleware for token validation. The middleware documentation covers the full option set; the keys most commonly set for this service are:

OptionTypeDefaultDescription
www_authenticate_uristring(none)Keystone endpoint advertised to clients in WWW-Authenticate headers. Must be reachable from clients.
auth_urlstring(none)Keystone endpoint the service uses to validate tokens. May be an internal address.

Other standard keystonemiddleware options (auth_type, project_domain_name, user_domain_name, memcached_servers) are set here as well — see the sample configuration below.


[oslo_policy]

OptionDescription
policy_filePath to the policy override file. Defaults to /etc/protector/policy.yaml.

[service_credentials]

Credentials the engine uses when it acts as the service account rather than through a tenant trust (for example, when making cross-site calls that are not scoped to a specific tenant).

OptionTypeDefaultDescription
usernamestring(none)Keystone username for the service account (typically protector).
project_namestring(none)Project the service account belongs to (typically service).
default_service_projectstringserviceDefault project name for service accounts when not overridden per site.
default_service_user_domainstringDefaultDefault Keystone domain for service users.
default_service_project_domainstringDefaultDefault Keystone domain for the service project.
default_trust_roleslistmember,dr_operatorComma-separated list of Keystone roles delegated by every per-tenant trust the service creates. member grants Nova/Cinder access; dr_operator satisfies Protector's own cross-site sync policy. Every role named here must exist on both sites — trust creation fails naming the first missing role rather than silently skipping it. Do not remove member: dropping it removes Nova and Cinder access from the trust and failover fails at the first instance or volume call, after the storage work has already been done. The default is correct for most deployments; omit this option from your configuration file rather than repeating the default.
cafilestring(none)PEM-encoded CA bundle for verifying Keystone and OpenStack endpoint TLS certificates.
insecurebooleanfalseDisable TLS certificate verification for all OpenStack endpoint calls. Never set true in production.

[storage]

OptionTypeDefaultDescription
storage_driverstringmockWhich storage backend to load. Accepted short names: mock (in-memory simulation, no hardware required), pure (Pure Storage FlashArray), drbd (in development, not for production). A fully-qualified class path such as protector.engine.storage.drivers.pure_driver.PureStorageDriver is also accepted.

[mock_storage]

Read only when storage_driver = mock.

OptionTypeDefaultDescription
storage_base_pathstring/var/lib/protector/mock_storageFilesystem path where the mock driver stores its SQLite state.
primary_array_namestringprimary-arrayDisplay name for the simulated primary array.
secondary_array_namestringsecondary-arrayDisplay name for the simulated secondary array.

[pure_storage]

Read only when storage_driver = pure. Delete this section entirely for mock deployments rather than leaving unfilled placeholders.

OptionTypeDefaultDescription
primary_management_ipstring(none)Management IP or hostname of the FlashArray that this site's volumes live on.
primary_api_tokenstring(none)API token for the primary FlashArray. Treat as a secret.
secondary_management_ipstring(none)Management IP or hostname of the peer site's FlashArray.
secondary_api_tokenstring(none)API token for the secondary FlashArray. Treat as a secret.
primary_site_namestring(empty)The OpenStack site name that uses the primary FlashArray — the name you gave the site with openstack dr site create. The driver resolves which array to talk to by site name, not by node position: it compares a protection group's primary site name against primary_site_name and swaps the array pair if they do not match. The pairing (primary_site_name ↔ primary_management_ip) must be consistent; inverting it causes the driver to read replication state from the wrong array. An identical [pure_storage] section can be used on both nodes.
secondary_site_namestring(empty)The OpenStack site name that uses the secondary FlashArray. Must name the site whose array is at secondary_management_ip.
verify_sslbooleanfalseVerify TLS certificates when connecting to FlashArray management endpoints. Set true in production if your arrays have valid certificates.
default_rpo_secondsinteger900RPO target in seconds used in replication health reports. The engine logs a warning when the measured replication lag exceeds this value.
snapshot_interval_secondsinteger300Desired interval between replication snapshots for async protection groups. The array may enforce a higher minimum; a warning is logged when it clamps the value.
additional_arrayslist(empty)Names of additional array-pair sections, written as [pure_array:<name>]. Use this when protected volumes span more than one FlashArray pair. Each named section carries its own management IPs, API tokens, site names, and cinder_backend_names.

[pure_array:<name>]

One section per additional array pair, referenced by name in additional_arrays. Accepts the same options as [pure_storage] plus:

OptionTypeDefaultDescription
cinder_backend_nameslist(empty)Cinder backend names that map to this array pair. The engine uses these to route volume operations to the correct array when multiple pairs are configured. Note: cinder_backend_names belongs in [pure_array:<name>] sections, not in [pure_storage] or [DEFAULT].

[drbd_storage]

Read only when storage_driver = drbd. DRBD support is in development and not for production use.

OptionTypeDefaultDescription
standby_flavorstringm1.drbd-standbyNova flavor for counterpart VMs on the secondary site. Should be a minimal flavor (1 vCPU, 512 MB RAM) since these VMs exist only to keep DRBD block devices attached.
transport_urlstring(none)oslo.messaging transport URL for DRBD agent RPC. If unset, the DEFAULT transport URL is used.
drbd_agent_topicstringdrbd-agentRPC topic for the DRBD agent.
drbd_agent_rpc_timeoutinteger60Timeout in seconds for DRBD agent RPC calls.
primary_hoststring(none)Hostname of the primary site compute node running the DRBD agent.
secondary_hoststring(none)Hostname of the secondary site compute node running the DRBD agent.
primary_replication_ipstring(none)Replication network IP of the primary site node.
secondary_replication_ipstring(none)Replication network IP of the secondary site node.
primary_site_namestring(empty)OpenStack site name for the primary DRBD site.
secondary_site_namestring(empty)OpenStack site name for the secondary DRBD site.
drbd_port_range_startinteger7788Start of the DRBD TCP port range.
drbd_port_range_endinteger8788End of the DRBD TCP port range.

RBAC and policy overrides

The service enforces access control through oslo.policy. The default rules are in /etc/protector/policy.yaml. The role hierarchy is:

  • admin — full access, overrides everything.
  • dr_site_admin — cloud-wide site-level operations: site create/update/delete, tenant mapping create/delete/validate, site failover, replication audit, and site operation list/show. Because these rules carry no project_id owner clause, the grant is effective across all projects regardless of which project dr_site_admin is granted on. Assign it to cloud operators on the admin project, not to per-tenant DR users.
  • dr_operator — create, modify, and delete protection groups, members, and resource mappings; trigger DR actions (failover, failback, test failover, reconcile), scoped to the caller's own project.
  • member — read-only access (list, show) within the caller's own project.

To override a rule, create or edit /etc/protector/policy.yaml and add entries in the form:

"protector:protection_groups:create": "rule:context_is_dr_operator"

Note that context_is_dr_operator (role:dr_operator or role:dr_site_admin or role:admin) is broader than context_is_admin (role:admin only). Switching a rule from rule:context_is_admin to rule:context_is_dr_operator relaxes access.

The protector:sites:storage_arrays rule requires role:admin and cannot be relaxed to dr_site_admin.

For Juju deployments, attach a policy override file using the policyd-override resource:

juju attach-resource trilio-site-recovery policyd-override=./my-policy.yaml

Usage

Locating the configuration file

All deployment paths write the configuration to /etc/protector/protector.conf. The protector-manage command reads this file by default:

protector-manage db sync

To use an alternate path:

protector-manage --config-file /path/to/protector.conf db sync

Setting local_site (required before any DR operation)

Every node must declare which registered site it belongs to. This is the single most important option — the service does not infer it:

[DEFAULT]
local_site = london

The value must match the site name exactly as shown by openstack dr site list. On a Juju deployment, set it as a charm option:

juju config trilio-site-recovery local-site=london

After a 1.0.20 or later charm upgrade, the unit lands in BLOCKED with the message set local-site, pure-primary-site-name, pure-secondary-site-name until these options are configured. This is expected behaviour — not a failed upgrade.

Choosing a storage driver

Set storage_driver in [storage] to select the backend:

[storage]
storage_driver = pure

For initial validation without hardware:

[storage]
storage_driver = mock

The mock driver stores state under /var/lib/protector/mock_storage by default. No other configuration is required.

Configuring cross-site timeouts

On a slow or high-latency inter-site link, the default 30-second timeout for cross-site calls may cause spurious failures. Raise it in [engine]:

[engine]
cross_site_timeout = 60

For Juju deployments, since there is no dedicated charm option for this key:

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

Configuring multiple Pure Storage array pairs

When protected volumes span more than one FlashArray pair, list the additional pair names in [pure_storage] and define a section for each:

[pure_storage]
primary_management_ip = 192.0.2.10
primary_api_token = TOKEN-A
secondary_management_ip = 192.0.2.20
secondary_api_token = TOKEN-B
primary_site_name = london
secondary_site_name = frankfurt
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 = london
secondary_site_name = frankfurt
cinder_backend_names = cinder-backend-flash2

additional_arrays holds section names (e.g. array-pair-2), not IP addresses.

Verifying the configuration

After editing protector.conf, check the service is reachable:

curl -s http://localhost:8788/v1

This returns the API version document. The service also exposes an unauthenticated health check at /healthz — HTTP 200 when the API can serve requests, HTTP 503 when it cannot — which is polled by the Kolla container health check and by peer-site connectivity tests.

For a Juju deployment, run the built-in health check action:

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

Examples

Minimal mock deployment (no hardware)

Use this for initial deployment validation or development.

[DEFAULT]
local_site = site-a
debug = True
log_dir = /var/log/protector
use_stderr = true
state_path = /var/lib/protector

transport_url = rabbit://protector:RABBIT-PASSWORD@rabbit-host:5672/protector

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

[database]
connection = mysql+pymysql://protector:DB-PASSWORD@db-host:3306/protector

[engine]
topic = protector-engine

[keystone_authtoken]
www_authenticate_uri = https://keystone-host:5000
auth_url = https://keystone-host:5000
auth_type = password
project_domain_name = Default
user_domain_name = Default
memcached_servers = memcached-host:11211

[oslo_policy]
policy_file = /etc/protector/policy.yaml

[service_credentials]
username = protector
project_name = service
default_service_project = service
default_service_user_domain = Default
default_service_project_domain = Default
default_trust_roles = member,dr_operator

[storage]
storage_driver = mock

[mock_storage]
storage_base_path = /var/lib/protector/mock_storage
primary_array_name = primary-array
secondary_array_name = secondary-array

Production deployment with Pure Storage (async replication)

This is the configuration for the London site in a London–Frankfurt pair. The Frankfurt node uses the same [pure_storage] section — the driver resolves which array is local by comparing primary_site_name against the protection group's primary site, and swaps the pair automatically.

[DEFAULT]
local_site = london
debug = False
log_dir = /var/log/protector
use_stderr = true
state_path = /var/lib/protector
host = controller-london.example.com
rpc_conn_pool_size = 30

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

[database]
connection = mysql+pymysql://protector:DB-PASSWORD@db-london:3306/protector

[engine]
topic = protector-engine
auto_create_security_groups = false
cross_site_timeout = 45
recovery_point_max_count = 20
recovery_point_ttl_hours = 24

[keystone_authtoken]
www_authenticate_uri = https://keystone-london:5000
auth_url = https://keystone-london:5000
auth_type = password
project_domain_name = Default
user_domain_name = Default
memcached_servers = memcached-london:11211

[oslo_messaging_rabbit]
rabbit_durable_queues = true
amqp_durable_queues = true

[oslo_policy]
policy_file = /etc/protector/policy.yaml

[service_credentials]
username = protector
project_name = service
default_service_project = service
default_service_user_domain = Default
default_service_project_domain = Default
default_trust_roles = member,dr_operator
cafile = /etc/ssl/certs/ca-bundle.pem

[storage]
storage_driver = pure

[pure_storage]
primary_management_ip = 192.0.2.10
primary_api_token = LONDON-ARRAY-TOKEN
secondary_management_ip = 192.0.2.20
secondary_api_token = FRANKFURT-ARRAY-TOKEN
primary_site_name = london
secondary_site_name = frankfurt
verify_ssl = true
default_rpo_seconds = 900
snapshot_interval_seconds = 300

Policy override: grant dr_operator read access to storage array details

By default, protector:sites:storage_arrays requires role:admin. This cannot be relaxed below admin. To relax a different rule — for example, to allow any authenticated member to list protection groups across all projects — add an override at /etc/protector/policy.yaml:

# Allow admin or dr_site_admin to list all protection groups
"protector:protection_groups:index": "rule:admin_or_owner or rule:context_is_site_admin"

The service picks up the file on restart. No reload signal is needed.


Running the database migration

After installing a new package version, run migrations before starting the new code:

protector-manage db sync

When crossing migration 022_add_reconcile_operation_type on Kolla or bare-metal deployments, run the preflight check before db sync:

protector-manage db preflight
protector-manage db sync

On Juju deployments the charm's db-sync action runs the preflight automatically:

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

Troubleshooting

Service starts but refuses all DR operations

Symptom: Every openstack dr command returns an error referencing the execution site or an invalid site.

Cause: local_site in [DEFAULT] is unset or does not match a registered site name.

Fix: Set local_site to the exact name shown by openstack dr site list, then restart the service. On Juju: juju config trilio-site-recovery local-site=<name>.


Unit in BLOCKED state after Juju charm upgrade

Symptom: juju status shows the trilio-site-recovery unit in blocked with the message set local-site, pure-primary-site-name, pure-secondary-site-name.

Cause: The 1.0.20 and later charm requires these options to be set explicitly after upgrade. This is expected behaviour — not a failed upgrade.

Fix:

juju config trilio-site-recovery local-site=<site-name>
juju config trilio-site-recovery pure-primary-site-name=<primary>
juju config trilio-site-recovery pure-secondary-site-name=<secondary>

Trust creation fails with a missing role error

Symptom: The first DR operation after deployment fails with an error naming a Keystone role (typically dr_operator).

Cause: The roles listed in default_trust_roles under [service_credentials] do not all exist on both sites. Trust creation fails at the first missing role rather than silently skipping it.

Fix: Create the missing roles on both sites:

openstack role create dr_operator
openstack role create dr_site_admin

Then retry the operation. Do not modify default_trust_roles to remove member — doing so removes Nova and Cinder access from the trust and failover fails at the first instance or volume call.


Cross-site calls time out on a slow WAN link

Symptom: Operations involving the peer site fail with timeout errors. The gunicorn worker is killed and the client sees the connection closed with no response.

Cause: cross_site_timeout in [engine] is too low for the inter-site round-trip time.

Fix: Raise the timeout. For manual or Kolla deployments:

[engine]
cross_site_timeout = 60

For Juju (no dedicated charm option; use config-flags):

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

Do not use the invented charm options cross-site-timeout or engine-cross-site-timeout — these fail with an unknown-option error.


Failover fails partway through with a Cinder 403 error

Symptom: Failover stops with Policy doesn't allow volume_extension:volume_manage to be performed (HTTP 403).

Cause: The Cinder policy on the DR site has not been relaxed to allow the service's trust-scoped session to manage volumes. The service runs as a tenant through a Keystone trust and needs five Cinder policy relaxations on both sites:

  • volume_extension:volume_manage
  • volume_extension:volume_unmanage
  • volume_extension:services:index
  • volume_extension:type_get
  • volume_extension:type_get_all

Fix: Add the following to the Cinder 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"

For Juju Cinder deployments, use juju attach-resource cinder policyd-override=./cinder-policy.yaml.


Pure Storage driver picks up wrong array during failover

Symptom: Failover reports volumes missing from the target array, even though they exist. The driver logs StorageSiteMappingUnknown or reports 2 of 2 volumes missing.

Cause: primary_site_name or secondary_site_name in [pure_storage] does not match the name of the site whose array is at the corresponding management IP. The driver resolves which array to contact by site name; an inverted or misspelled name causes it to read from the wrong array.

Fix: Verify the pairing: primary_site_name must name the site whose array is at primary_management_ip, and secondary_site_name must name the site at secondary_management_ip. An identical [pure_storage] section works correctly on both nodes — the driver swaps the pair automatically based on the protection group's primary site.


Database migration fails with an ENUM error

Symptom: protector-manage db sync fails when crossing migration 022_add_reconcile_operation_type on a Kolla or bare-metal deployment.

Cause: The preflight check that validates the existing ENUM values in dr_operations.operation_type was not run before the migration. The charm's db-sync action runs this automatically; direct protector-manage db sync calls do not.

Fix: Run the preflight check manually before the migration:

protector-manage db preflight
protector-manage db sync

config-flags causes DuplicateSectionError

Symptom: The charm raises DuplicateSectionError after a config-flags change.

Cause: A key named in config-flags is already rendered by the charm template. The charm appends the section a second time, and configparser rejects duplicate sections.

Fix: Use config-flags only for keys that the charm does not model in its 47 built-in options. Keys the charm already renders must be set through their dedicated charm option (e.g. juju config trilio-site-recovery engine-topic=...). The option engine:cross_site_timeout is safe because it is not in the template.