Notifications & Metrics
oslo.messaging notifications and any exposed metrics
Trilio Site Recovery for OpenStack does not publish oslo.messaging notifications. There are no event topics, no lifecycle events, and no consumer examples to write — the get_notifier() helper exists in the codebase but has no caller, so not a single event is ever published.
Observability is instead polled: you read replication health, audit results, recovery points, and operation records on demand through the CLI and REST API. This page documents those polling surfaces — what each command returns, how frequently to call it, and how to interpret the fields that matter for DR readiness and incident diagnosis. If you are building failover alerting, poll these endpoints; do not subscribe to a notification bus.
Before using the monitoring and observability surfaces described on this page:
- Trilio Site Recovery deployed on both sites (Juju, Kolla-Ansible, or OpenShift).
python3-triliositerecoveryinstalled on any machine running the CLI. Install it from the Trilio apt repository athttps://apt.fury.io/trilio-os-site-recovery-master/:sudo apt-get install python3-triliositerecovery- OpenStack credentials sourced (a
clouds.yamlor RC file for a user holding thedr_operatorordr_site_adminrole, depending on the command). - Both sites registered (
openstack dr site listreturns both entries). - Protection groups created before replication health or recovery-point commands are meaningful.
- Pure Storage driver (if using async or active_dr replication) — health metrics come from the FlashArray REST API; the mock driver returns simulated values.
No separate installation step is required beyond the base service deployment. The observability CLI commands are part of the python3-triliositerecovery package that is installed as part of every deployment path.
Juju — the charm installs the package automatically. After an upgrade, update the CLI separately on any machine that runs openstack dr but is not managed by the charm:
sudo apt-get install --only-upgrade python3-triliositerecovery
Kolla-Ansible / bare-metal — install from the Trilio apt repository:
# Add the Trilio repository if not already present
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
sudo apt-get install python3-triliositerecovery
OpenShift (RHOSO18) — the CLI is used from an external controller node. Install it with the same apt-get command above on an Ubuntu Jammy or Noble host that has network access to the protector API on port 8788.
No configuration is required specifically for observability. The metrics and health data are collected by protector-engine from the storage backend and exposed through the API. The options below affect the data you see.
Recovery point scheduling
Set in /etc/protector/protector.conf under [engine]:
| Option | Type | Default | Effect |
|---|---|---|---|
recovery_point_interval_minutes | integer | 0 | How often the engine automatically creates recovery points for active_dr protection groups. 0 disables scheduled creation; you must call openstack dr recovery point create manually. |
recovery_point_max_count | integer | 20 | Maximum recovery points retained per protection group. Older points are pruned when this limit is reached. |
recovery_point_ttl_hours | integer | 24 | Time-to-live for recovery points in hours. Points older than this are eligible for pruning. |
RPO target
Set in /etc/protector/protector.conf under [pure_storage]:
| Option | Type | Default | Effect |
|---|---|---|---|
default_rpo_seconds | integer | 900 | The RPO target used to determine whether replication lag constitutes an RPO violation. The rpo_compliant field in replication health reflects this threshold. |
snapshot_interval_seconds | integer | 300 | How often the Pure Storage driver schedules snapshots for async replication groups. |
Cross-site timeout
Set in /etc/protector/protector.conf under [engine]:
| Option | Type | Default | Effect |
|---|---|---|---|
cross_site_timeout | integer | 30 | Seconds the engine waits for a cross-site API call before giving up. Increase this on high-latency links. The charm does not expose this directly; set it via config-flags: juju config trilio-site-recovery config-flags="engine:cross_site_timeout=60" |
Scheduled background refresh
| Option | Section | Default | Effect |
|---|---|---|---|
coverage_refresh_interval_minutes | [engine] | 15 | How often the engine refreshes its record of which instances are covered by protection groups. |
floating_ip_refresh_interval_minutes | [engine] | 15 | How often the engine refreshes floating IP associations for covered members. |
All observability commands follow the openstack dr subcommand pattern from the python3-triliositerecovery package. There are no push notifications — poll these commands as needed, or integrate them into a monitoring script.
Replication health
openstack dr replication health <protection_group> returns the current replication state for a protection group, including link status, sync state, lag, RPO compliance, and failover readiness. This is your primary pre-failover check.
The --probe flag asks the recovery site whether the group's networks, security groups, and flavors resolve there as the project it recovers into. It does not check the storage backend or replication lag. Run it before a maintenance failover window to catch missing network mappings before you need them. It is slower than the plain command because it queries the peer site's Neutron and Nova through the same trust-scoped session a real recovery would use — that project-scoping is the whole value.
# Basic replication health check
openstack dr replication health <protection-group-id>
# With recovery-site resource probe (recommended before planned failover)
openstack dr replication health <protection-group-id> --probe
Key fields in the response:
| Field | Meaning |
|---|---|
failover_ready | true if all checks pass and a failover can proceed. |
failover_ready_reason | Human-readable explanation — why it is or is not ready. |
link.status | healthy, degraded, broken, or unknown. unknown means the state could not be determined (e.g., no replication policy, storage group missing, or array unreachable) — not the same as broken. |
link.determined | false when the link state could not be established at all. A partially-created protection group whose setup failed mid-way may show determined: false; this does not mean the arrays cannot see each other. |
lag.rpo_compliant | Whether current lag is within the configured default_rpo_seconds target. |
lag.lag_seconds | Current replication lag in seconds. |
lag.rpo_violation_duration | How long the RPO has been violated, in seconds. null if compliant. |
data_at_risk_seconds | Estimated data loss if the primary fails right now. For async replication this is the age of the newest replicated snapshot; for active_dr it is the current lag. |
recovery_points.newest_replicated | The most recent recovery point confirmed on the target site. null means no replicated point exists — failover is blocked. |
recovery_points.missed_snapshots_24h | Number of scheduled snapshots missed in the last 24 hours. A non-zero value is a warning; it does not block failover on its own. |
Replication audit
openstack dr replication audit checks all protection groups across all tenants (requires dr_site_admin) and returns a summary of replication health. Use it for a site-wide readiness assessment before a planned failover or during routine DR validation.
openstack dr replication audit
Recovery points
Recovery points are the snapshots available for point-in-time recovery. List them to understand your recovery options before a failover, or to verify that scheduled snapshots are being created.
# List the 20 most recent recovery points (default)
openstack dr recovery point list <protection-group-id>
# List the 50 most recent
openstack dr recovery point list <protection-group-id> --limit 50
# Create a manual recovery point (useful before a planned maintenance window)
openstack dr recovery point create <protection-group-id>
openstack dr recovery point create <protection-group-id> --suffix pre-upgrade
Key fields per recovery point:
| Field | Meaning |
|---|---|
created_at | When the snapshot was taken (ISO 8601). |
age_seconds | How old this recovery point is at query time. |
is_replicated | Whether this point has been replicated to the target site. Only replicated points are available for failover. |
is_consistent | Whether this was a consistency-group-level snapshot covering all volumes atomically. |
Operation records
Every DR operation (failover, failback, test failover, reconcile, etc.) is recorded in dr_operations and queryable through the CLI. Operation records are your audit log and your primary tool for diagnosing a failed or stalled DR workflow.
# List all operations
openstack dr operation list
# Filter by protection group
openstack dr operation list --protection-group <pg-id>
# Filter by status
openstack dr operation list --status failed
# Filter by type
openstack dr operation list --operation-type failover
# Show full detail of a specific operation
openstack dr operation show <operation-id>
Key fields in operation show:
| Field | Meaning |
|---|---|
status | pending, running, completed, partial_success, or failed. |
progress | Integer 0–100. The engine updates this as the operation proceeds. |
source_site | The site name the operation ran from (falls back to site ID if the name cannot be resolved). |
target_site | The site name the operation targeted (falls back to site ID). |
error_message | Set when status is failed; describes what went wrong. |
result_data | JSON blob with phase-level detail — which phase was executing when the operation stopped, and what changed. |
Note: operations do not carry an estimated completion time. The progress field (0–100) is the only forward indicator.
For site-level operations (failover of all protection groups at once):
openstack dr site operation list
openstack dr site operation list --status running
openstack dr site operation show <operation-id>
Metadata sync status
Check whether protection group metadata is synchronized between sites:
# REST: GET /v1/{tenant_id}/protection-groups/{pg_id}/metadata/status
# CLI: use sync with --dry-run to preview what would change
openstack dr protection group sync <protection-group-id> --dry-run
Check replication health before a planned failover
export OS_CLOUD=site1
openstack dr replication health pg-prod-web
Check recovery-site resource resolution before a failover window
This queries the peer site's Neutron and Nova to verify that the networks, security groups, and flavors the group needs are available as the correct project:
openstack dr replication health pg-prod-web --probe
List recovery points and identify the newest replicated point
openstack dr recovery point list pg-prod-web --limit 10
Create a manual recovery point before a maintenance window
openstack dr recovery point create pg-prod-web --suffix pre-maintenance-2024-01
Tail operation progress during a failover
# Start the failover with --wait so the CLI polls until complete
openstack dr failover pg-prod-web --failover-type planned --wait --wait-timeout 1800
# Or poll manually from a second terminal
watch -n 10 'openstack dr operation list --protection-group pg-prod-web --status running'
# Show full detail of a running or completed operation
openstack dr operation show <operation-id>
Site-wide replication audit
Requires dr_site_admin:
export OS_CLOUD=site1-admin
openstack dr replication audit
Python client: poll replication health in a monitoring script
The Python client returns plain dicts. The resource ID is positional:
from keystoneauth1 import session as ks_session
from keystoneauth1.identity import v3 as ks_identity
from keystoneauth1 import adapter
from triliositerecovery.v1.client import Client
auth = ks_identity.Password(
auth_url='https://keystone.site1.example.com:5000/v3',
username='droperator',
password='secret',
project_name='myproject',
user_domain_name='Default',
project_domain_name='Default',
)
sess = ks_session.Session(auth=auth)
adp = adapter.Adapter(
session=sess,
service_type='disaster-recovery',
interface='public',
region_name='RegionOne',
endpoint_override='https://protector.site1.example.com:8788',
)
client = Client(session=adp, endpoint='https://protector.site1.example.com:8788')
# pg_id is positional
health = client.protection_groups.replication_health('pg-prod-web-id')
if not health.get('failover_ready'):
print('NOT READY:', health.get('failover_ready_reason'))
print('Data at risk (seconds):', health.get('data_at_risk_seconds'))
else:
print('Ready:', health.get('failover_ready_reason'))
# Poll operations
operations = client.operations.list(pg_id='pg-prod-web-id')
for op in operations:
# op is a plain dict — use op['field'], never op.field
print(op['id'], op['status'], op.get('progress'), '%')
Python client: list recovery points
# recovery_points takes pg_id positionally
points = client.protection_groups.recovery_points('pg-prod-web-id', limit=20)
for point in points:
print(point['name'], point['created_at'], 'replicated:', point['is_replicated'])
REST API: get replication health
TOKEN=$(openstack token issue -f value -c id)
curl -s -H "X-Auth-Token: $TOKEN" \
https://protector.site1.example.com:8788/v1/${OS_PROJECT_ID}/protection-groups/pg-prod-web-id/replication-health \
| python3 -m json.tool
REST API: list recovery points
curl -s -H "X-Auth-Token: $TOKEN" \
"https://protector.site1.example.com:8788/v1/${OS_PROJECT_ID}/protection-groups/pg-prod-web-id/recovery-points?limit=20" \
| python3 -m json.tool
REST API: get operation status
curl -s -H "X-Auth-Token: $TOKEN" \
https://protector.site1.example.com:8788/v1/${OS_PROJECT_ID}/operations/<operation-id> \
| python3 -m json.tool
Replication health shows link.determined: false
Symptom: openstack dr replication health returns failover_ready: false and link.determined: false with a message like "replication state could not be determined".
Likely causes:
- The protection group was created but storage setup failed partway (no replication policy or consistency group was created on the array).
- The FlashArray is unreachable from the engine node.
- The
python3-pure-clientpackage is missing on the engine node.
Fix: Check protector-engine logs at /var/log/protector/ (Juju/Kolla) or via oc logs (OpenShift) for the error that occurred during protection group creation. Do not interpret determined: false as "arrays cannot see each other" — that is a different condition (link.connected: false). Re-run member add or delete and re-add the protection group if storage setup is incomplete.
Replication health shows RPO violation
Symptom: rpo_compliant: false and rpo_violation_duration is non-zero.
Likely causes:
- Network congestion or degraded connectivity between FlashArrays.
- Write rate on the source is exceeding the replication throughput (
transfer.replication_keeping_up: false). - The
snapshot_interval_secondsordefault_rpo_secondsis misconfigured.
Fix: Check transfer.throughput_bytes_per_sec and transfer.source_write_rate_bytes_per_sec in the health response. If the write rate exceeds replication throughput, the RPO target may need to be relaxed or the replication link bandwidth increased. For configuration, adjust default_rpo_seconds in [pure_storage] or snapshot_interval_seconds.
recovery_points.newest_replicated is null
Symptom: Replication health returns failover_ready: false with reason "No replicated recovery points available".
Likely causes (async replication):
- Protection group was created recently and the first scheduled snapshot has not yet replicated.
- Scheduled snapshots are disabled (
recovery_point_interval_minutes = 0) and no manual recovery point has been created. - The replication link was severed before any snapshot completed.
Fix: Create a manual recovery point:
openstack dr recovery point create <protection-group-id>
Then re-check health. If the problem persists, check the FlashArray replication link status directly.
Operation stuck in running after engine restart
Symptom: openstack dr operation list shows an operation in running or pending state after the engine was restarted.
Likely cause: The engine marks orphaned operations as FAILED on startup and restores the protection group to the correct status based on the last checkpoint phase saved in result_data. If the engine did not complete this recovery step, the operation may remain stuck.
Fix: Restart protector-engine. On Juju:
juju ssh trilio-site-recovery/0 'sudo systemctl restart protector-engine'
On Kolla:
docker restart protector_engine
On OpenShift:
oc -n trilio-site-recovery rollout restart deployment/trilio-site-recovery-engine
If the operation remains stuck after restart, use openstack dr operation cancel <operation-id> and then openstack dr protection group reconcile <protection-group-id> to repair the protection group.
Operation source_site and target_site columns are blank
Symptom: openstack dr operation show or openstack dr operation list shows empty values for the Source Site and Target Site columns.
Likely cause: This was a bug in earlier releases (fixed in b277167). If you are running an older version, the site name columns were structurally empty.
Fix: Upgrade to a release that includes b277167. The columns show the site name, falling back to the site ID if the name cannot be resolved.
--probe returns resources as missing but they exist on the recovery site
Symptom: openstack dr replication health <pg> --probe reports a network or flavor as missing even though you can see it on the recovery site.
Likely cause: The --probe flag queries the recovery site as the project the group recovers into (via a trust-scoped session). A resource that exists under a different project on the recovery site will be correctly reported as missing for this group.
Fix: Verify that the network, security group, or flavor exists under the correct project on the recovery site, not just that it exists somewhere on the site. Add an explicit resource mapping if the resources have different names or IDs between sites:
openstack dr protection group mapping create <pg-id> \
--resource-type network \
--primary-resource-id <src-net-id> \
--secondary-resource-id <dst-net-id>
No replication events in oslo.messaging / notification bus
Symptom: A consumer subscribed to the RabbitMQ vhost protector on the topic protector-notifications receives nothing during failover, failback, or other DR operations.
Cause: This is by design. Trilio Site Recovery does not publish oslo.messaging notifications. The notification infrastructure exists in the codebase but get_notifier() has no caller and no event is ever published. Subscribing to the bus for DR lifecycle events will produce a consumer that connects, subscribes, and stays silent through a real failure — which looks identical to nothing being wrong.
Fix: Use the polled observability surface instead:
openstack dr replication health <pg> [--probe]— replication and resource readinessopenstack dr replication audit— site-wide health (requiresdr_site_admin)openstack dr recovery point list <pg>— available recovery pointsopenstack dr operation list/openstack dr operation show— operation status and progress
Build alerting by polling GET /v1/{tenant_id}/protection-groups/{id}/replication-health and GET /v1/{tenant_id}/operations on a schedule.
Replication health shows a recently-created protection group as not ready
Symptom: A new protection group shows failover_ready: false immediately after creation.
Likely cause: For async replication, no replicated snapshot exists yet. For active_dr, the initial sync may still be in progress (sync_status.in_sync: false, sync_status.sync_progress_pct between 0 and 100).
Fix: Wait for the first snapshot to complete and replicate (async), or for the initial sync to finish (active_dr). Monitor progress:
watch -n 30 'openstack dr replication health <protection-group-id>'