Trilio Site Recovery for OpenStackOpenStack native DR service
Guide

Observability

Logging, metrics, and notifications


Overview

This page covers the observability surface of Trilio Site Recovery for OpenStack: how to read service logs, check API and engine health, query replication status and recovery points, and inspect DR operation records. The service does not emit oslo.messaging notifications — no events are published to RabbitMQ, so there is no event stream to subscribe to. All monitoring is polled: you query the /healthz endpoint, run openstack dr replication health, list recovery points, run replication audits, and inspect operation records. Understanding these surfaces lets you detect degraded replication before a failover window, diagnose a failed operation after the fact, and confirm the service is healthy after a restart or upgrade.


Prerequisites

Before using the observability features described here, you need:

  • Trilio Site Recovery for OpenStack deployed and running (protector-api and protector-engine services)
  • The python3-triliositerecovery package installed on any machine where you run CLI commands
  • An OpenStack credential with at least the member role (and dr_operator for replication health and audit commands)
  • Network access to port 8788 on the protector-api host for direct API calls or the /healthz health endpoint
  • For Juju deployments: access to juju ssh on the charm unit
  • For Kolla deployments: access to docker exec or docker logs on the nodes running protector_api and protector_engine
  • For OpenShift (RHOSO18) deployments: oc CLI access to the trilio-site-recovery namespace

Installation

No separate installation is required for the observability features. They are part of the standard service and CLI packages.

If the CLI is not yet installed on a client node, install it 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

For Juju-managed deployments, the charm installs the CLI on the unit automatically. If you upgrade the service via the charm's upgrade-packages action, also upgrade the CLI separately on any client node not managed by the charm:

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

Configuration

Observability-relevant configuration lives in /etc/protector/protector.conf. The key options are:

Logging

Logging is controlled by oslo.log. Set these in [DEFAULT]:

OptionSectionDefaultPurpose
debug[DEFAULT]falseEmit DEBUG-level log lines. Avoid in production — verbose output can obscure warnings.
verbose[DEFAULT]falseEmit INFO-level log lines (superset of normal output).
log_file[DEFAULT](oslo.log default)Absolute path to the log file. Under Juju and Kolla, logs go to /var/log/protector/. On OpenShift, logs go to stdout only — there is no log file.
log_dir[DEFAULT](oslo.log default)Directory for log files. The charm sets this to /var/log/protector.

Example [DEFAULT] snippet for increased verbosity during diagnosis:

[DEFAULT]
local_site = site-primary
debug = true

Revert debug = true after diagnosis. On a busy site it generates substantial output and can make it harder to spot warnings.

Health endpoint

The /healthz endpoint on port 8788 is unauthenticated and requires no configuration. It is always present when protector-api is running. It returns HTTP 200 with {"status": "ok", "checks": {"database": "ok"}} when the API can serve requests, and HTTP 503 with {"status": "unhealthy", "checks": {"database": "unavailable (<ExceptionClass>)"}} when the database is unreachable. The check is a readiness check: a 200 means the API can actually serve requests, not merely that the process is alive. The database connection URL is never included in the 503 response body — it goes to the service log only.

Replication monitoring intervals

These options in [engine] control background refresh cycles that keep replication coverage and floating-IP metadata current without manual operator intervention:

OptionSectionDefaultPurpose
coverage_refresh_interval_minutes[engine]15How often the engine re-verifies that each member volume is included in the replicated storage group. Set to 0 to disable.
floating_ip_refresh_interval_minutes[engine]15How often the engine re-captures floating IPs on protected instances on the primary site and syncs changes to the DR site. Set to 0 to disable.
recovery_point_interval_minutes[engine]0Interval between scheduled recovery-point snapshots for ActiveDR groups. 0 disables scheduled snapshots.
recovery_point_max_count[engine]20Maximum on-demand recovery-point snapshots retained per protection group.
recovery_point_ttl_hours[engine]24Automatically delete recovery-point snapshots older than this many hours.

RPO target

The RPO target used by the replication health subsystem is set in [pure_storage]:

OptionSectionDefaultPurpose
default_rpo_seconds[pure_storage]900Target RPO in seconds. Replication health marks a group rpo_compliant = false and blocks failover readiness when lag exceeds this value.
snapshot_interval_seconds[pure_storage]300Interval between async replication snapshots on the Pure FlashArray.

Cross-site timeout

Cross-site API calls (health probes to the peer, metadata sync, tenant mapping validation) use:

OptionSectionDefaultPurpose
cross_site_timeout[engine]30Seconds any single call to another site may take. Raise this on slow inter-site links.

On Juju, do not add cross_site_timeout as a top-level charm option — it does not exist in the charm's option set. Use config-flags instead:

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

Usage

Checking service health

The /healthz endpoint is the fastest way to confirm protector-api can serve requests:

curl -s http://<protector-api-host>:8788/healthz

A healthy response returns HTTP 200. An unhealthy response returns HTTP 503. Use this endpoint in your monitoring system in preference to checking whether port 8788 accepts a TCP connection — the port can be open while the database is down, and only /healthz distinguishes the two cases.

The Juju charm exposes a health-check action that wraps this check:

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

Reading service logs

Log location and access method depend on your deployment model.

Juju deployments — logs are written to /var/log/protector/ on the Juju unit:

juju ssh trilio-site-recovery/0 -- sudo tail -f /var/log/protector/protector-api.log
juju ssh trilio-site-recovery/0 -- sudo tail -f /var/log/protector/protector-engine.log

Kolla deployments — logs come from the protector_api and protector_engine containers:

docker logs -f protector_api
docker logs -f protector_engine

OpenShift (RHOSO18) deployments — logs go to stdout only; there is no log file. Use oc logs with the correct label selectors:

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

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

Important: On OpenShift, kubectl logs -l app=trilio-site-recovery-api selects zero pods because that label does not exist on these deployments. You must use both app.kubernetes.io/name and app.kubernetes.io/component as shown above.

Checking replication health

The primary way to monitor replication status is openstack dr replication health. This command queries the storage driver for the protection group's replication link status, sync state, lag, recovery points, and transfer performance, and reports a failover-readiness assessment:

openstack dr replication health <protection-group>

To also ask the recovery site whether the group's networks, security groups, and flavors resolve there as the project it recovers into, add --probe:

openstack dr replication health <protection-group> --probe

The --probe flag talks to the peer site through the same trust-scoped session that a real recovery uses. It checks whether each required resource exists on the recovery site in the right project — a network that exists under a different project is correctly reported missing. It does not check storage replication or lag. Because it makes a live cross-site call, it is slower than the plain command. Run it before a planned failover window to confirm resource resolution, not as a routine poll.

Listing recovery points

For async and ActiveDR protection groups, list available recovery points:

openstack dr recovery point list <protection-group>
openstack dr recovery point list <protection-group> --limit 50

Create an on-demand recovery point snapshot:

openstack dr recovery point create <protection-group>
openstack dr recovery point create <protection-group> --suffix pre-upgrade

Running a replication audit

The replication audit shows what the storage arrays are replicating that no protection group accounts for. This covers volumes still being replicated after a protection group was deleted, or volumes added to the array's replication group outside of the service:

openstack dr replication audit

This command requires the dr_site_admin role. A volume reported by the audit is not protected — it has no managed recovery points and no service-driven failover — it is simply still consuming replication capacity.

Inspecting DR operations

Every failover, failback, test failover, test cleanup, and reconcile operation is recorded in the database and queryable. Use these commands to track operation status and diagnose failures:

# List all operations for the current project
openstack dr operation list

# Filter by protection group
openstack dr operation list --protection-group <pg-id-or-name>

# Filter by status
openstack dr operation list --status failed

# Filter by type
openstack dr operation list --operation-type failover

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

The operation show output includes:

  • status — current status (pending, running, completed, failed, etc.)
  • progress — integer 0–100 indicating completion percentage
  • source_site / target_site — site names (falling back to ID if the site was deleted)
  • started_at / completed_at — timestamps
  • error_message — the first fatal error if the operation failed
  • warnings — non-fatal issues captured during the operation
  • instances_created, volumes_managed, floating_ips_allocated — resources created on the recovery site
  • result_data — full structured record of what the operation decided and left behind

Note: there is no estimated completion time for any operation type. The progress field (0–100%) is what the service tracks; no ETA is computed or displayed.

For site-level failover operations, use the site operation commands:

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

Monitoring with --wait

The dr failover, dr failback, dr test failover, and related commands accept --wait to block until the operation settles, polling every 5 seconds:

openstack dr failover <protection-group> --wait --wait-timeout 3600

If the timeout expires, the CLI raises an error and prints the last known status and progress. The operation continues running on the server — use openstack dr operation show <id> to track it.


Examples

Example 1 — Check API health

curl -s http://10.0.0.50:8788/healthz

Example 2 — Check API health from a Juju unit

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

Example 3 — Tail engine logs on a Juju unit

juju ssh trilio-site-recovery/0 -- sudo tail -100 /var/log/protector/protector-engine.log

Example 4 — Tail engine logs on Kolla

docker logs --tail 100 -f protector_engine

Example 5 — Tail API and engine logs on OpenShift

oc -n trilio-site-recovery logs \
  -l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api \
  --tail 100 -f

oc -n trilio-site-recovery logs \
  -l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=engine \
  --tail 100 -f

Example 6 — Check replication health for a protection group

openstack dr replication health pg-web-tier

Example 7 — Probe recovery-site resource resolution before a planned failover

openstack dr replication health pg-web-tier --probe

Example 8 — List recent recovery points

openstack dr recovery point list pg-web-tier --limit 10

Example 9 — Create an on-demand recovery point before a maintenance window

openstack dr recovery point create pg-web-tier --suffix pre-maintenance-2024

Example 10 — Run a replication audit to find untracked replicated volumes

openstack dr replication audit

Example 11 — List all failed operations for a protection group

openstack dr operation list \
  --protection-group pg-web-tier \
  --status failed

Example 12 — Show full details of a specific operation

openstack dr operation show a1b2c3d4-e5f6-7890-abcd-ef1234567890

Example 13 — List site-level operations and filter by partial success

openstack dr site operation list --status partial_success

Example 14 — Run a failover and wait for completion

openstack dr failover pg-web-tier \
  --failover-type unplanned \
  --network-mapping prod-net=dr-net \
  --wait \
  --wait-timeout 3600

Example 15 — Query replication health from the Python client

from keystoneauth1 import identity, session as ks_session
from keystoneauth1.adapter import Adapter
from triliositerecovery.v1.client import Client

auth = identity.v3.Password(
    auth_url='https://keystone.primary.example.com:5000/v3',
    username='myuser',
    password='mypassword',
    project_name='myproject',
    user_domain_name='Default',
    project_domain_name='Default',
)
ks = ks_session.Session(auth=auth)
adapter = Adapter(
    session=ks,
    service_type='disaster-recovery',
    interface='public',
    region_name='RegionOne',
)

client = Client(
    session=adapter,
    endpoint='https://protector.primary.example.com:8788/v1/myproject-id',
    region_name='RegionOne',
)

# Get replication health (storage metrics only)
health = client.protection_groups.replication_health('pg-web-tier')
print(health['failover_ready'])
print(health['failover_ready_reason'])
print(health['data_at_risk_seconds'])

# Get replication health with recovery-site resource probe
health_probed = client.protection_groups.replication_health('pg-web-tier', probe=True)

# List recent recovery points
rps = client.protection_groups.recovery_points('pg-web-tier', limit=10)

# List recent operations
operations = client.operations.list(pg_id='pg-web-tier-uuid')
for op in operations:
    # op is a plain dict — use op['key'], not op.key
    print(op['id'], op['status'], op.get('progress'))

Troubleshooting

/healthz returns HTTP 503

Symptom: curl http://<host>:8788/healthz returns 503 with {"status": "unhealthy", "checks": {"database": "unavailable (<ExceptionClass>)"}}.
Cause: protector-api cannot reach its database. The exception class in the response indicates the type of failure (e.g., OperationalError, DisconnectionError). The connection URL is not included in the response — check the service log for the full detail.
Fix:

  1. Confirm the MariaDB/MySQL service is running and accepting connections.
  2. Check [database] connection in /etc/protector/protector.conf for a correct host, port, credentials, and database name.
  3. On Juju: juju ssh trilio-site-recovery/0 -- sudo cat /var/log/protector/protector-api.log | grep -i database
  4. On Kolla: docker logs protector_api | grep -i database
  5. On OpenShift: oc -n trilio-site-recovery logs -l app.kubernetes.io/name=trilio-site-recovery,app.kubernetes.io/component=api | grep -i database

openstack dr replication health reports determined: false

Symptom: Replication health shows the replication state could not be determined, even though the arrays appear to be replicating.
Cause: The engine could not establish the replication state — the protection group's storage group may be missing, the replication policy may not be set up, or the array may be unreachable. This is distinct from a confirmed broken link. determined: false means "we could not tell", not "it is broken".
Fix:

  1. Check the engine log for errors contacting the Pure FlashArray.
  2. Verify that [pure_storage] primary_management_ip, primary_api_token, secondary_management_ip, and secondary_api_token are correct in protector.conf.
  3. Confirm that the protection group was successfully created on the array: a protection group whose creation failed partway will report an undetermined state.
  4. Verify the site name pairing: primary_site_name must name the site whose array is at primary_management_ip. An inverted pairing causes the driver to query the wrong array and can produce a StorageSiteMappingUnknown error or an undetermined state.

openstack dr replication health --probe reports a network as missing, but it exists

Symptom: --probe reports a network or flavor cannot be resolved, but you can see it in openstack network list on the recovery site.
Cause: --probe queries the recovery site's Neutron and Nova through the same trust-scoped session a real recovery uses, scoped to the project the group recovers into. A resource that exists on the recovery site but belongs to a different project is correctly reported missing. This is the most common cause: the network was created under the admin project or a different tenant.
Fix: Confirm that the network exists in the correct project on the recovery site, or create a resource mapping to redirect to a network that does exist in the recovery project. Use openstack dr protection group mapping create to register the mapping.


dr operation list returns operations from other projects

Symptom: An operator sees operations belonging to other tenants when running openstack dr operation list.
Cause: This was a bug (fixed): the list endpoint was not scoped to the caller's project. If you are on a patched version, dr operation list only shows the current project's operations.
Fix: Upgrade to a version that includes the scoped operation query fix. Confirm by checking whether openstack dr operation list returns only your project's operations.


source_site and target_site columns are blank in operation show

Symptom: openstack dr operation show <id> shows empty source_site and target_site fields.
Cause: This was a bug (fixed in b277167): the CLI read source_site and target_site fields that the API only emitted as source_site_id and target_site_id. On a patched service, the API emits both the name (falling back to the ID) and the raw ID.
Fix: Upgrade both trilio-site-recovery (server) and python3-triliositerecovery (CLI) to the current version. The CLI renders the site name; the raw IDs are still present in the API response for any consumer that needs them.


OpenShift: oc logs -l app=trilio-site-recovery-api returns "No resources found"

Symptom: Trying to read logs with -l app=trilio-site-recovery-api or -l app=trilio-site-recovery-engine finds no pods.
Cause: Neither deployment uses a bare app label. The correct label selectors use the app.kubernetes.io/name and app.kubernetes.io/component keys.
Fix: Use the correct selectors:

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

# Engine
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 — the oc logs command is the only way to read service output.


Operation stuck in running state; --wait times out

Symptom: An operation shows status: running and never progresses to completed or failed. A --wait invocation times out.
Cause: Several possible causes:

  • The engine process has crashed or been restarted mid-operation.
  • A cross-site call is blocked waiting for a slow or unreachable peer and cross_site_timeout is not set.
  • A volume detach is taking longer than expected (failback waits up to 120 seconds per volume for Nova to release the Cinder attachment before unmanaging).

Fix:

  1. Check engine logs for the operation ID: grep <operation-id> /var/log/protector/protector-engine.log
  2. If the engine restarted, cancel the stuck operation with openstack dr operation cancel <id> and re-run.
  3. If cross-site calls are timing out, raise cross_site_timeout in [engine] (via config-flags on Juju).
  4. If a volume is stuck detaching during failback, the engine logs will show the wait. The wait is best-effort: a volume still attached at the 120-second deadline is unmanaged anyway and the fact is logged but does not abort the failback.

No notifications received by an oslo.messaging consumer

Symptom: A consumer listening on the protector-notifications topic receives no events, even during active DR operations.
Cause: Trilio Site Recovery does not emit oslo.messaging notifications. The service constructs a notifier object internally, but get_notifier() has no caller anywhere in the service and no events are ever published. This is by design in the current release.
Fix: Remove the notification consumer. Use the polled observability surface instead:

  • openstack dr replication health <pg> — replication link, sync status, lag, RPO compliance
  • openstack dr replication health <pg> --probe — recovery-site resource resolution
  • openstack dr replication audit — untracked replicated volumes
  • openstack dr recovery point list <pg> — available recovery point snapshots
  • openstack dr operation list / openstack dr operation show <id> — DR operation history and status

Juju unit shows BLOCKED after upgrade with message about local-site

Symptom: After upgrading the charm to 1.0.20 or later, the unit enters BLOCKED state with a message referencing local-site, pure-primary-site-name, or pure-secondary-site-name.
Cause: This is expected behaviour. From 1.0.20 onward the charm requires local_site to be explicitly configured; it no longer infers which site it is on. The inference was unreliable, especially on the recovery site where failover runs.
Fix: Set the required options:

juju config trilio-site-recovery local-site=site-primary
# If using Pure Storage:
juju config trilio-site-recovery \
  pure-primary-site-name=site-primary \
  pure-secondary-site-name=site-secondary

The unit will return to ACTIVE once these are set. This is not a failed upgrade — it is the charm enforcing that the site identity is unambiguous.