Freeze lab-tested PostgreSQL plugin engine
Extract PostgreSQL, Podman runtime and systemd lifecycle adapters while preserving existing lifecycle and scoring behavior. Update RPM layout and add guarded operator-run lab harnesses. Record successful manual stop/start, promotion, demotion and rewind-only rejoin with pinned installed hashes. The unfenced lab does not validate automatic failover, Pacemaker-managed transitions or divergent-data rewind. Validation: 103 offline tests, original-function differential checks, checksum manifest and whitespace checks passed.
This commit is contained in:
@@ -4,10 +4,18 @@ A modular PostgreSQL HA implementation 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`.
|
||||
|
||||
This branch extracts the frozen implementation into a PostgreSQL plugin, Podman
|
||||
runtime adapter and systemd lifecycle adapter. It is **installed on ELITEDESK
|
||||
in the test cluster only**. [Basic lifecycle checks](docs/lab-plugin-basic-test.md)
|
||||
and [manual promotion, demotion and rewind-only rejoin tests](docs/lab-role-tests.md)
|
||||
passed according to operator-supplied output. The lab has no fencing. See the
|
||||
[engine contract and validation plan](docs/plugin-engine.md). The production test
|
||||
report applies to the earlier freeze, not automatically to this extraction.
|
||||
|
||||
## Project layout
|
||||
|
||||
- `reference/`: original agent and immutable known-good reference copy.
|
||||
- `refactored/`: executable agent, nine sourced shell modules, and a Python state helper.
|
||||
- `refactored/`: executable agent, application/runtime/lifecycle modules, and a Python state helper.
|
||||
- `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.
|
||||
@@ -21,6 +29,7 @@ Requires Bash, Python 3, and the OCF shell library (normally
|
||||
|
||||
```bash
|
||||
python3 tests/verify_refactor.py
|
||||
python3 tests/test_plugin_engine.py
|
||||
python3 tests/test_promotion_scores.py
|
||||
python3 tests/test_promotion_scheduler.py
|
||||
python3 tests/test_disconnected_state.py
|
||||
@@ -28,7 +37,8 @@ python3 tests/test_promotion_cleanup.py
|
||||
sha256sum -c notes/REFACTOR-SHA256SUMS
|
||||
```
|
||||
|
||||
The tests preserve the original 29 lifecycle function bodies and exercise the
|
||||
The tests retain all 29 original functions and verify exact equivalence after
|
||||
reversing only adapter-call substitutions. They exercise the
|
||||
added promotion-scoring layer without operating the live cluster. The operator
|
||||
has reported successful production SBD fencing, automatic promotion, VIP movement,
|
||||
and former-primary rewind/rejoin in a three-node cluster.
|
||||
|
||||
Reference in New Issue
Block a user