Add PostgreSQL HA OCF agent modular baseline
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# PostgreSQL HA OCF resource agent
|
||||
|
||||
A behavior-preserving modular refactor of `ocf:loxthelion:managed-container`.
|
||||
Pacemaker invokes the agent to manage a rootless systemd/Quadlet maintenance
|
||||
container. PostgreSQL is started and stopped independently with `pg_ctl`.
|
||||
|
||||
## Project layout
|
||||
|
||||
- `reference/`: original agent and immutable known-good reference copy.
|
||||
- `refactored/`: executable agent and nine sourced shell modules.
|
||||
- `tests/`: offline structural and behavioral comparison checks.
|
||||
- `cluster-context/` and `runtime-context/`: saved lab configuration and state;
|
||||
these snapshots are not live status. Environment credentials are redacted.
|
||||
- `notes/`: refactor plan, validation report, and file hashes.
|
||||
- `HANDOFF.md`: scope, architecture, and behavior that must be preserved.
|
||||
|
||||
## Validation
|
||||
|
||||
Requires Bash, Python 3, and the OCF shell library (normally
|
||||
`/usr/lib/ocf/lib/heartbeat/ocf-shellfuncs`). From the repository root:
|
||||
|
||||
```bash
|
||||
python3 tests/verify_refactor.py
|
||||
sha256sum -c notes/REFACTOR-SHA256SUMS
|
||||
```
|
||||
|
||||
The tests compare the refactor against the frozen reference without operating
|
||||
the live cluster. Target-node validation and controlled HA transition tests
|
||||
remain outstanding. Existing function names and recovery configuration blocks
|
||||
are retained in this initial modular baseline.
|
||||
|
||||
Read [the refactor report](notes/REFACTOR-REPORT.md) for installation commands,
|
||||
validation results, limitations, and the recommended lab comparison sequence.
|
||||
The public entrypoint remains
|
||||
`/usr/lib/ocf/resource.d/loxthelion/managed-container`.
|
||||
|
||||
Keep lab Pacemaker maintenance mode enabled during this work. Do not modify
|
||||
the frozen reference or automatically run destructive HA tests.
|
||||
|
||||
## Clone
|
||||
|
||||
```bash
|
||||
git clone ssh://git@gitea.loxthelion.com:2222/david/ocf-managed-container.git
|
||||
```
|
||||
Reference in New Issue
Block a user