Platform testing

Drills for the OpenShift platform: operators healthy, a pod killed on purpose, a backup restored, and a record of how long recovery took.

Updated CompTech Team

Application tests prove the service. They assume the cluster schedules pods, the StorageClass binds, the operators are running, and a backup from last night can be restored. Platform testing is how you stop assuming that. It is a set of drills, run on a schedule, with the result written down. A drill that has never been run is a runbook you hope is true.

The service-level checks are Application testing. Several drills already have a home in another lab. This page ties them into one habit.

What you record

Every drill produces the same four lines, in a ticket or a Git note, not in someone's memory:

  • The date and the cluster.
  • The step that was taken (oc delete pod, a restore CR, a switchover).
  • The clock time from the action until the check passed.
  • Whether the data you wrote beforehand was still there.

The time is the measurement. It is not a target copied from a slide. After a few drills you will know what this platform actually does, and a regression (a restore that used to take minutes and now takes an hour) is visible.

Operators and nodes, first

Before any dramatic test, the quiet ones:

oc get clusteroperators
oc get nodes
oc adm top nodes
oc get csv -A --no-headers | awk '$NF != "Succeeded" && $NF != "PHASE"'

A ClusterOperator that is not Available and Progressing=False is a reason to stop and look, not a reason to start a failover drill. oc adm inspect ns/<namespace> --dest-dir=inspect collects the objects when something is already wrong, so the next person is not typing oc get from a screenshot. For a support case, oc adm must-gather is the bundle. Run it once on a healthy cluster so you know it finishes and where it writes.

Pods that restart all night are a platform fault even when the Deployment stays green. oc get pods -A | awk '$4 > 5' is a crude filter for restart counts. Find out why before you add a replica to hide it.

Kill a pod, on purpose

Pick a data service that claims to survive one pod, in a non-production namespace. Write a row or a key. Delete the pod that owns it. Read it back. Time the gap.

Service The drill this series already has
Redis Delete the primary. Sentinel or Cluster promotes. High availability.
Data Grid Delete one pod of a cache with owners: 2. The key is readable from another pod. Install lab.
PostgreSQL Delete the primary. Patroni promotes. Crunchy DC/DR.
The application Delete the pod that holds the session, with sessions in Data Grid. The cookie still works. Session externalisation.

Do one of these a month, not all of them the night before a review. A drill during an unrelated incident teaches you nothing. Tell the channel you are doing it, even in a lab cluster, because someone will be using that namespace.

A node drain is the larger version: oc adm cordon and oc adm drain one worker, watch the pods land elsewhere, then uncordon. A pod with a local volume that cannot move will sit Pending. That is a finding, not a failed command. Fix the topology or accept that this workload has a single node.

Restore a backup

A backup job that exits 0 is not a restore. Once a quarter, in a scratch namespace:

  1. Take the backup the way production does. For Data Grid that is a Backup CR (backup lab). For PostgreSQL it is the pgBackRest annotation in the Crunchy lab. For the model weights it is the replicated volume in the OpenShift AI DC/DR labs.
  2. Restore into an empty namespace or the DR cluster.
  3. Read the row, the key, or the model id you wrote before the backup.
  4. Write down the elapsed time and delete the scratch copy.

If step 3 fails, production does not have that backup. Open a fault. Do not wait for the real incident to discover the bucket policy blocked the restore.

Two sites

A site drill is expensive and rare, and it is the one that matters if you claim an RTO. The sequence for a full switch is the one the individual labs already warn about: the database first (Data Guard or the Crunchy promote), then caches (Data Grid cross-site or a Redis restore), then the applications (Ramen relocate). Doing the applications first gives you pods that write to a database that is still the standby.

You do not need to move a whole bank to learn something. Relocate one stateless application and one cache, measure, and move them back. A drill that cannot move back is an incident you scheduled.

A drill note

Keep the note dull enough that people will actually write it. One paragraph is enough:

2026-10-29 dc, namespace datagrid-drill.
Deleted pod example-infinispan-0 at 10:04.
Key sku-42 readable from example-infinispan-1 at 10:04:40.
WellFormed again at 10:07.
Data present. No follow-up.

File it where the next operator will look, next to the runbook, not in a chat scroll. If the key had been missing, the note would say so and name the cache mode (owners) you expected to save it. That note is the start of a fix in the cache modes lab, not a reason to rerun the delete until it passes.

When to stop

Stop a drill when a check fails three times the usual recovery, when a ClusterOperator goes degraded, or when you are no longer sure which site is primary. Write that down too. A stopped drill with a clear note is more useful than a heroic one that leaves two primaries.

What's next

Security is the other half of "is the platform actually in the state we think": who can delete the pod you just deleted. Tracing is how you see the request that failed during the drill, rather than only the pod restart.