Title: Probe an undeclared MariaDB source from the replica's server (S-019-14) by shipmill-romamo[bot] · Pull Request #463 · cloudfall-dev/cloudfall · GitHub
Open Graph Title: Probe an undeclared MariaDB source from the replica's server (S-019-14) by shipmill-romamo[bot] · Pull Request #463 · cloudfall-dev/cloudfall
X Title: Probe an undeclared MariaDB source from the replica's server (S-019-14) by shipmill-romamo[bot] · Pull Request #463 · cloudfall-dev/cloudfall
Description: Plan Serves: quality bar Files: engine/ansible/roles/cloudfall_mariadb/files/mariadb_source_probe.py (new), engine/ansible/roles/cloudfall_mariadb/filter_plugins/mariadb_replication.py, engine/ansible/roles/cloudfall_mariadb/tasks/replication_check.yml, engine/ansible/roles/cloudfall_mariadb/defaults/main.yml, engine/tests/mariadb_pair.py, engine/tests/test_s019_mariadb_replication_role.py, docs/specs/019-mariadb-service.md, changelog.d/455-mariadb-probe-from-replica.md Order: the failing stand-in test first (a source that refuses the controller but accepts the replica is not promoted over; a source that refuses the replica is), with a per-host probe stand-in that reads the stand-in network and otherwise runs the role's real probe script; then move the probe's classification to a script the role runs on the replica's own server, after the Last_IO_Errno check of #454; then the spec's Promotion wording Proof: engine/tests/test_s019_mariadb_replication_role.py (S-019-14); uv run ruff check ., uv run mypy, uv run ansible-lint engine/ansible Summary After #454, a promotion over a source that no declared service matches went ahead when the controller's probe of the source's port read refused and the replica's Last_IO_Errno was none of the errors only a live source sends. A firewall that REJECTs the controller gives the same ECONNREFUSED, so a running, writable source could be promoted over: two writers. The probe now runs on the replica's own server. files/mariadb_source_probe.py holds the classification #454 wrote (open, refused, timeout, no-route, unresolved, failed; every address of a name tried, a refusal at one never hiding what another can't read), standard library only, and replication_check.yml runs it there with ansible.builtin.script and /usr/bin/python3 (the Python Ansible needs on a Debian 13 target). The source admitted that server while it replicated from it, so a refusal from there means nothing listens The Last_IO_Errno check of #454 still comes first in the plan; a timeout, no route and an unresolved name still leave the source unknown and refuse with PRECONDITION. The declared-source path is unchanged The cloudfall_mariadb_source_probe filter is gone: no controller-side filter reads the network any more. The refusal and promotion messages now say the port was read from "this replica's server" Spec 019's Promotion section says "can't be reached" is read from the replica's side. The triage named docs/mariadb-service-guide.md too; no such guide exists on main, so nothing else was edited Two role variables, cloudfall_mariadb_source_probe_script and cloudfall_mariadb_source_probe_python, name the script and the interpreter; the stand-in pair sets them per host to its probe stand-in (dependency injection, no monkeypatching) Test plan uv run pytest engine/tests/test_s019_mariadb_replication_role.py engine/tests/test_s019_mariadb_role.py engine/tests/test_s019_mariadb_engine.py: all pass new: a source that refuses the controller (a closed loopback port, checked with the real script) but answers the replica in the stand-in network is not promoted over: PRECONDITION service_mariadb_promotion_unsafe, the replica stays read-only and the source keeps taking writes (on main it was promoted); the same source stopped is promoted; both assert the probe ran on the replica's host the #446 cases keep their outcomes from the replica's side: refused promotes; timeout or no route, an unresolved name, a refused login and a TLS error refuse the script's classification tables move from the filter to the script, and one test runs the script as a process (python -I) and checks that no filter cloudfall_mariadb_source_probe is left The probe stand-in answers open or refused for a host and port the stand-in network routes (by whether that server runs), and otherwise runs the role's real script uv run ruff check ., uv run mypy, uv run ansible-lint engine/ansible: clean The full suite is left to CI Not verified on real hosts: ansible.builtin.script with /usr/bin/python3 on a Debian 13 target, and a REJECTing firewall in front of a real source This PR and #461 (for #451) touch the same files from origin/main; whichever lands second needs a rebase. Fixes #455 🤖 Generated with Claude Code
Open Graph Description: Plan Serves: quality bar Files: engine/ansible/roles/cloudfall_mariadb/files/mariadb_source_probe.py (new), engine/ansible/roles/cloudfall_mariadb/filter_plugins/mariadb_replication.py, engine/ans...
X Description: Plan Serves: quality bar Files: engine/ansible/roles/cloudfall_mariadb/files/mariadb_source_probe.py (new), engine/ansible/roles/cloudfall_mariadb/filter_plugins/mariadb_replication.py, engine/ans...
Opengraph URL: https://github.com/cloudfall-dev/cloudfall/pull/463
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d514646a-e914-c5db-99fd-b7dd8e57eb71 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9768:3EA722:1D6796F:27B4B07:6B055AA7 |
| html-safe-nonce | cd6834bcffe5902bc89e2bd7d3e34b905e66063c5b2b7aa849cf084c19a4dec1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzY4OjNFQTcyMjoxRDY3OTZGOjI3QjRCMDc6NkIwNTVBQTciLCJ2aXNpdG9yX2lkIjoiNTI4MDU0NjI4OTQ1NTgxNTMzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 22fb6e7638b56fd576e60148783d039dd9e57c0346f6a1184a4fe83f4391354d |
| hovercard-subject-tag | pull_request:5347731707 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/cloudfall-dev/cloudfall/pull/463/files |
| twitter:image | https://avatars.githubusercontent.com/u/5600783?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/5600783?s=400&v=4 |
| og:image:alt | Plan Serves: quality bar Files: engine/ansible/roles/cloudfall_mariadb/files/mariadb_source_probe.py (new), engine/ansible/roles/cloudfall_mariadb/filter_plugins/mariadb_replication.py, engine/ans... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a79a02b7e7546ea306864e922ed2103ef4c04fac63168e11c2b2d4d816793080 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/cloudfall-dev/cloudfall git https://github.com/cloudfall-dev/cloudfall.git |
| octolytics-dimension-user_id | 339512759 |
| octolytics-dimension-user_login | cloudfall-dev |
| octolytics-dimension-repository_id | 1360999777 |
| octolytics-dimension-repository_nwo | cloudfall-dev/cloudfall |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1360999777 |
| octolytics-dimension-repository_network_root_nwo | cloudfall-dev/cloudfall |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 10dff83edfd4f3617a7792a152d44991587b434c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width