---
title: "Configuration (Oslo.Config)"
product: trilio-site-recovery-for-openstack
doc_type: guide
version: master
source: git2docs (code-derived, validation-filtered)
canonical: https://git2docs.com/mark-reid/docs/trilio-site-recovery-for-openstack/trilio-site-recovery-for-openstack/configuration
---

# 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).

## Examples

### Minimal mock deployment (no hardware)

Use this for initial deployment validation or development.

```ini
[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.

```ini
[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`:

```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:

```bash
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`:

```bash
protector-manage db preflight
protector-manage db sync
```

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

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