Freeze HA scoring and document reported production failover

This commit is contained in:
Lyncoln
2026-09-12 18:07:28 -04:00
parent c8636ed6d4
commit 488a1672d7
29 changed files with 2285 additions and 46 deletions
+12 -3
View File
@@ -20,6 +20,8 @@ BuildRequires: resource-agents
BuildRequires: hostname
BuildRequires: diffutils
BuildRequires: coreutils
BuildRequires: pacemaker-cli >= 2.1.0
Requires: python3
Requires: bash
Requires: /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs
Requires: podman
@@ -31,6 +33,7 @@ Requires: coreutils
Requires: gawk
Requires: sed
Requires: hostname
Requires: pacemaker-cli >= 2.1.0
%description
OCF agent managing PostgreSQL through a persistent rootless systemd/Quadlet
@@ -48,22 +51,28 @@ cp packaging/README.md RPM-BUILD.md
%install
install -d %{buildroot}%{ocf_provider_dir}/managed-container.d
install -m 0755 refactored/managed-container %{buildroot}%{ocf_provider_dir}/managed-container
install -m 0644 refactored/managed-container.d/*.sh %{buildroot}%{ocf_provider_dir}/managed-container.d/
install -m 0644 refactored/managed-container.d/*.sh refactored/managed-container.d/*.py %{buildroot}%{ocf_provider_dir}/managed-container.d/
%check
python3 tests/verify_refactor.py
python3 tests/test_promotion_scores.py
python3 tests/test_promotion_scheduler.py
python3 tests/test_promotion_cleanup.py
python3 tests/test_disconnected_state.py
# Check the actual staged layout, including resolution from an unrelated cwd.
agent="%{buildroot}%{ocf_provider_dir}/managed-container"
"$agent" meta-data > staged-metadata.xml
reference/managed-container meta-data > reference-metadata.xml
refactored/managed-container meta-data > reference-metadata.xml
cmp reference-metadata.xml staged-metadata.xml
(cd /tmp && "$agent" meta-data) > other-cwd-metadata.xml
cmp reference-metadata.xml other-cwd-metadata.xml
%files
%defattr(-,root,root,-)
%doc README.md packaging/PROVENANCE.md RPM-BUILD.md
%doc README.md packaging/PROVENANCE.md RPM-BUILD.md notes/PROMOTION-SCORING.md notes/DISCONNECTED-STANDBY.md
%doc docs/operations.md docs/testing.md docs/review.md
%dir %{ocf_provider_dir}
%attr(0755,root,root) %{ocf_provider_dir}/managed-container
%dir %{ocf_provider_dir}/managed-container.d
%attr(0644,root,root) %{ocf_provider_dir}/managed-container.d/*.sh
%attr(0644,root,root) %{ocf_provider_dir}/managed-container.d/*.py