Title: Spec 020: Automatic failover for a MariaDB pair by shipmill-romamo[bot] · Pull Request #417 · cloudfall-dev/cloudfall · GitHub
Open Graph Title: Spec 020: Automatic failover for a MariaDB pair by shipmill-romamo[bot] · Pull Request #417 · cloudfall-dev/cloudfall
X Title: Spec 020: Automatic failover for a MariaDB pair by shipmill-romamo[bot] · Pull Request #417 · cloudfall-dev/cloudfall
Description: Spec for #416 Approved by the maintainer on 2026-11-16 as it stands at 05298e3 (status: approved); see the comment with his words. Plan Serves: G-2, G-3 Files: docs/specs/020-mariadb-failover.md (new), docs/proving-runs/2026-11-16-replication-manager-bench.md (new); no product code Order: after S-019's build (#409); the application's half is S-021 (#418, merged) Proof: specs.py check clean; 22 criteria (S-020-1 to S-020-22), the last a proving run on three hosts Summary Automatic failover for a MariaDB primary and its replica, with replication-manager (Signal18, GPLv3) as the part that decides and a Cloudfall watchdog as the part that fences. No proxy, and no controller of Cloudfall's own. Declared on the replica (replication.failover), naming the Server that runs the manager; the block is the consent Cloudfall installs the manager at one pinned version and renders its whole configuration: automatic mode, its own rejoin off, no proxies, no hosted arbitration, API on loopback with a generated login Servers start read-only; the manager opens writes on its primary A watchdog on each database host only ever turns writes off: when the server has had neither the manager nor its replica as a witness for fenceSeconds The manager's two waits (pings, and the replica's heartbeat) are rendered from fenceSeconds so that it promotes at least ten seconds after a cut-off primary has stopped fence: none declines the watchdog, with a warning that says what is given up A FailoverReceipt per failover, written from the manager's post-failover script; converge refuses a stale declaration until the roles are swapped Why this shape A bench on 2026-11-16 (recorded in this PR): the manager promoted without a proxy in 9 s. With a primary cut off and a local application writing through the socket, 51 rows went to the old primary only. With a watchdog and the ping wait raised, no run had two writable servers; with the heartbeat wait left at its default the margin was 2 s, which is why both are rendered. Settled by the bench's second part Installation: Signal18's APT repository serves replication-manager-osc for Debian 12 and 13 on amd64 and arm64; a pinned version installs and holds Grants: the documented list is not enough on MariaDB 11.8; SLAVE MONITOR is added, and without it the manager promotes nothing The manager as witness: the watchdog reads the idle time of the manager's sessions from the server's own process list Open before approval fenceSeconds defaults to 10, so a replica takes writes about 20 seconds after the primary is lost; without the watchdog it was 9 s A cut-off primary still loses up to fenceSeconds of writes; the spec says so and does not add semi-synchronous replication The three-host proving run (#427): the package was installed in containers, never under systemd on a host Not verified: nothing here has run on a real host; the bench ran in containers. 🤖 Generated with Claude Code
Open Graph Description: Spec for #416 Approved by the maintainer on 2026-11-16 as it stands at 05298e3 (status: approved); see the comment with his words. Plan Serves: G-2, G-3 Files: docs/specs/020-mariadb-failover.md (...
X Description: Spec for #416 Approved by the maintainer on 2026-11-16 as it stands at 05298e3 (status: approved); see the comment with his words. Plan Serves: G-2, G-3 Files: docs/specs/020-mariadb-failover.md (...
Opengraph URL: https://github.com/cloudfall-dev/cloudfall/pull/417
X: @github
Domain: github.com
IPv4 address: 140.82.114.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:07b00955-e3ca-d3ca-c20e-7b49bb707807 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9786:1E782F:19F6388:22175E0:6B05590B |
| html-safe-nonce | 543e31232dd662a1dbe5cb991dbe26f25fd966ca1ef7d6ebc629e71993ebefd9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Nzg2OjFFNzgyRjoxOUY2Mzg4OjIyMTc1RTA6NkIwNTU5MEIiLCJ2aXNpdG9yX2lkIjoiMTgyNTU1MTQ4NTYxMDg0MjM3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ef7eaadb73772a3bfd52ef30bd4cdc52216b090379b0c64fc23788331f444822 |
| hovercard-subject-tag | pull_request:5333541670 |
| 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/417/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 | Spec for #416 Approved by the maintainer on 2026-11-16 as it stands at 05298e3 (status: approved); see the comment with his words. Plan Serves: G-2, G-3 Files: docs/specs/020-mariadb-failover.md (... |
| 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