Title: Enforce the declared firewall in the services converge (#453) by shipmill-romamo[bot] · Pull Request #459 · cloudfall-dev/cloudfall · GitHub
Open Graph Title: Enforce the declared firewall in the services converge (#453) by shipmill-romamo[bot] · Pull Request #459 · cloudfall-dev/cloudfall
X Title: Enforce the declared firewall in the services converge (#453) by shipmill-romamo[bot] · Pull Request #459 · cloudfall-dev/cloudfall
Description: Summary After a MariaDB role change, the new primary's nftables did not admit its new replica until cloudfall baseline converge ran: only baseline.yml and logging.yml run the cloudfall_firewall role, and services.yml never touched nftables, so the new link failed with a bare timeout. services.yml now enforces the declared firewall on each host before it converges that host's services, as logging.yml does for the gateway rule (S-011's port provider: "rendered into the firewall the baseline already owns"). The ruleset is the host's rendered cloudfall_firewall, the same one baseline converge applies, which already carries the services' port rules (replication, remoteAccess, Elasticsearch transport), so a services converge never opens a port the baseline wouldn't. A host without a declared firewall is left alone. The task runs after the pre-task refusals, so a refused server is still left unchanged. The Elasticsearch role's own "Enforce the declared firewall with the transport rule" stays: it now applies a ruleset already in place, so it changes nothing. No guide changes: the triage planned a line in docs/mariadb-service-guide.md, but that guide doesn't exist on main, and S-019 already describes a role change as "the declaration changes and a converge runs". The proving-run record (docs/proving-runs/2026-11-16-hetzner-mariadb-pair.md) is left as the record of that run. Plan Serves: quality bar Files: engine/ansible/playbooks/services.yml, engine/tests/test_s019_mariadb_replication_role.py, changelog.d/453-services-enforce-firewall.md Order: the failing test first (after a role swap, the services converge enforces a ruleset on the new primary that admits 3306 from the new replica only, with the old primary's rule gone, and leaves a host without a firewall alone), then the firewall task in services.yml Proof: the new S-019-15 test in test_s019_mariadb_replication_role.py, failing on main and passing here; the existing services.yml task-order tests (S-012-4, S-019-4, #329) still pass Test plan uv run pytest engine/tests/test_s019_mariadb_replication_role.py engine/tests/test_s019_mariadb_role.py engine/tests/test_s012_elasticsearch_role.py engine/tests/test_s012_elasticsearch_access.py engine/tests/test_s012_elasticsearch_cluster_role.py engine/tests/test_s012_elasticsearch_existing_cluster_role.py engine/tests/test_services_passwords.py engine/tests/test_component_hosts.py: 233 passed; the new test failed on main (services.yml had no firewall task) uv run ruff check ., uv run mypy, uv run ansible-lint engine/ansible (with CI's ANSIBLE_CONFIG=engine/ansible/ansible.cfg) pass The full suite is left to CI Not verified on a live host: that the services converge after a role swap now links without a baseline step, and that a second services converge reports the firewall unchanged (the role is the one baseline converge already runs idempotently) Fixes #453 🤖 Generated with Claude Code
Open Graph Description: Summary After a MariaDB role change, the new primary's nftables did not admit its new replica until cloudfall baseline converge ran: only baseline.yml and logging.yml run the cloudfall_firewall...
X Description: Summary After a MariaDB role change, the new primary's nftables did not admit its new replica until cloudfall baseline converge ran: only baseline.yml and logging.yml run the cloudfall_fire...
Opengraph URL: https://github.com/cloudfall-dev/cloudfall/pull/459
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:52f9c5a0-b349-22df-4733-706f019eb3c9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C162:29A85A:26B707D:32E5727:6B0559E4 |
| html-safe-nonce | b43e73c6c5b87f0c0490112c2bb60730e45c3bbebb3d6f2ecc7c324f4d682626 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTYyOjI5QTg1QToyNkI3MDdEOjMyRTU3Mjc6NkIwNTU5RTQiLCJ2aXNpdG9yX2lkIjoiMjcxNDI0NzUxNjk5NTgwMzYyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0d8542c16b9527335b23a3c17c23badb85ee6632c46b8c703fd1d2657cedfa53 |
| hovercard-subject-tag | pull_request:5347413044 |
| 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/459/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 | Summary After a MariaDB role change, the new primary's nftables did not admit its new replica until cloudfall baseline converge ran: only baseline.yml and logging.yml run the cloudfall_firewall... |
| 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