Commit Graph
14682 Commits
Author SHA1 Message Date
evangelostsak 2a60fd1f32 refactor: drop rationale and narration from tests/unit/python/utils/tests/swarm/test_mesh_steps.py 2026-10-16 19:10:01 +02:00
evangelostsak 2698bb7996 refactor: drop rationale and narration from tests/unit/python/utils/github/variant/test_axes.py 2026-10-16 19:10:01 +02:00
evangelostsak 010bc71ab7 refactor: drop rationale and narration from tests/unit/python/roles/web-app-n8n/files/provision/test_mcp.py 2026-10-16 19:10:01 +02:00
evangelostsak 6f24461720 refactor: drop rationale and narration from tests/unit/python/plugins/lookup/test_mesh_ranges.py 2026-10-16 19:10:01 +02:00
evangelostsak d480c2785e refactor: drop rationale and narration from tests/unit/python/plugins/lookup/test_mesh_address.py 2026-10-16 19:10:01 +02:00
evangelostsak 0c0a43adb5 refactor: drop rationale and narration from tests/unit/python/group_vars/test_swarm_advertise_addr.py 2026-10-16 19:10:01 +02:00
evangelostsak 1343f77929 refactor: drop rationale and narration from tests/unit/python/cli/administration/inventory/mesh/test_write.py 2026-10-16 19:10:01 +02:00
evangelostsak 277a2aad76 refactor: drop rationale and narration from tests/unit/python/cli/administration/inventory/mesh/test_transport.py 2026-10-16 19:10:01 +02:00
evangelostsak 7c85cedc8e refactor: drop rationale and narration from tests/unit/python/cli/administration/inventory/mesh/test_plan.py 2026-10-16 19:10:01 +02:00
evangelostsak 814fc8b336 refactor: drop rationale and narration from tests/unit/python/cli/administration/inventory/mesh/test_inventory.py 2026-10-16 19:10:01 +02:00
evangelostsak a88f69bd35 refactor: drop rationale and narration from tests/unit/python/cli/administration/inventory/mesh/test_full_mesh.py 2026-10-16 19:10:01 +02:00
evangelostsak c95e5d06c4 refactor: drop rationale and narration from tests/unit/python/cli/administration/inventory/mesh/test_cli.py 2026-10-16 19:10:01 +02:00
evangelostsak f73bd6ec5d refactor: drop rationale and narration from tests/lint/ansible/roles/meta/test_mesh_subnet_pool.py 2026-10-16 19:10:01 +02:00
evangelostsak 5ab53c0eea refactor: drop rationale and narration from scripts/tests/deploy/ci/dedicated.sh 2026-10-16 19:10:01 +02:00
evangelostsak 3af32502af refactor: drop rationale and narration from roles/svc-net-wireguard/tasks/00_core.yml 2026-10-16 19:10:01 +02:00
evangelostsak 64cacad4b9 refactor: drop rationale and narration from roles/svc-net-wireguard/meta/secrets.yml 2026-10-16 19:10:01 +02:00
evangelostsak fb24984ade refactor: drop rationale and narration from roles/svc-net-wireguard/files/test/test.sh 2026-10-16 19:10:00 +02:00
evangelostsak 364a350e14 refactor: drop rationale and narration from plugins/lookup/nfs_client_src.py 2026-10-16 19:10:00 +02:00
evangelostsak c249df361a refactor: drop rationale and narration from plugins/lookup/mesh_ranges.py 2026-10-16 19:10:00 +02:00
evangelostsak d31a36fd6b refactor: drop rationale and narration from plugins/lookup/mesh_address.py 2026-10-16 19:10:00 +02:00
evangelostsak 81b2af9abd refactor: drop rationale and narration from inventories/examples/wireguard-three-meshes/wireguard.yml 2026-10-16 19:10:00 +02:00
evangelostsak b08dcb7dd3 refactor: drop rationale and narration from inventories/development/wireguard.yml 2026-10-16 19:10:00 +02:00
evangelostsak c12b0aec66 refactor: drop rationale and narration from group_vars/all/18_swarm.yml 2026-10-16 19:10:00 +02:00
evangelostsak 0cfb08644a refactor: drop rationale and narration from group_vars/all/15_storage.yml 2026-10-16 19:10:00 +02:00
evangelostsak d12b725167 refactor: drop rationale and narration from group_vars/all/08_networks.yml 2026-10-16 19:10:00 +02:00
evangelostsak d4cf950c29 refactor: drop rationale and narration from default.env 2026-10-16 19:10:00 +02:00
evangelostsak f169fd5995 refactor: drop rationale and narration from cli/administration/inventory/mesh/write.py 2026-10-16 19:10:00 +02:00
evangelostsak c8d5c4f056 refactor: drop rationale and narration from cli/administration/inventory/mesh/transport.py 2026-10-16 19:10:00 +02:00
evangelostsak cc38fe6232 refactor: drop rationale and narration from cli/administration/inventory/mesh/plan.py 2026-10-16 19:10:00 +02:00
evangelostsak 6c684a127e refactor: drop rationale and narration from cli/administration/inventory/mesh/model.py 2026-10-16 19:10:00 +02:00
evangelostsak 7c124be6a2 refactor: drop rationale and narration from cli/administration/inventory/mesh/keys.py 2026-10-16 19:10:00 +02:00
evangelostsak 59143ee3e2 refactor: drop rationale and narration from cli/administration/inventory/mesh/inventory.py 2026-10-16 19:09:59 +02:00
evangelostsak 868ca8117f refactor: drop rationale and narration from cli/administration/inventory/mesh/__main__.py 2026-10-16 19:09:59 +02:00
evangelostsak 4b0851dc46 refactor: drop rationale and narration from cli/administration/inventory/mesh/__init__.py 2026-10-16 19:09:59 +02:00
evangelostsak 6472ec6959 refactor: drop rationale and narration from cli/administration/inventory/credentials/reset/cli.py 2026-10-16 19:09:59 +02:00
evangelostsak 36d656a64c refactor: drop rationale and narration from Makefile 2026-10-16 19:09:59 +02:00
Prageeth Panicker dc3d30acaa fix(sys-ctl-hlth-journalctl): skip container logs in the host journal check
Problem:
Every compose service logs to journald through
sys-svc-container/templates/base.yml.j2. The daily journal health
check grepped the whole journal for "error", so routine application
errors from containers triggered the host alert (email/Telegram) and
buried real host problems.

Change:
- Read the last day of the journal as JSON (MESSAGE, CONTAINER_ID,
  SYSLOG_IDENTIFIER, _SYSTEMD_UNIT) and skip every entry that carries
  a CONTAINER_ID field. Docker daemon and system errors are still
  reported.
- Report each match as one readable "source: message" line instead
  of raw journal output.
- Stream the journalctl output line by line instead of buffering a
  whole day of logs in memory.
- Exit 2 with journalctl's stderr if journalctl itself fails, instead
  of silently reporting "no errors".
- Rewrite the check in Python (files/python/script.py, deployed by
  sys-service like the other sys-ctl-hlth roles) and decode non-UTF-8
  messages.
- Fix the success message, which claimed "All docker containers are
  healthy".

Impact:
Container log errors no longer raise this host alert on any
installation. Container health stays covered by sys-ctl-hlth-container;
application log analysis belongs in a log platform such as Wazuh.
system_service_suppress_flush is unchanged until a deploy confirms
that no host errors remain.

Tests:
Unit tests run the script against a fake journalctl (8 cases):
container error ignored, daemon error reported, identifier fallback,
non-UTF-8 message, journalctl failure, many container lines streamed
past, clean journal passes. The core cases fail against the previous
script.
2026-10-16 14:41:05 +00:00
evangelostsak fd3bead0a7 docs(ci): describe the mesh glyph on every compose title 2026-10-16 14:48:36 +02:00
evangelostsak 34f2f0a216 test(ci): a mesh pin is valid on the smallest compose variant only 2026-10-16 14:48:36 +02:00
evangelostsak d4179b747a test(ci): compose titles state their mesh and impossible mesh pins abort 2026-10-16 14:48:36 +02:00
evangelostsak 457adefa1f feat(ci): reject an impossible mesh pin before the run starts 2026-10-16 14:48:36 +02:00
evangelostsak 1860f587b4 feat(ci): show the mesh state on every compose title and refuse a mesh pin it cannot take
A compose row has two behaviours, with or without the mesh, but its title
showed three: no glyph on a role's larger variants, 🛣️ or 🚇 on its smallest.
No glyph and 🛣️ deploy the same thing, so every compose title now reads 🛣️
or 🚇 like a swarm title, and host titles stay without one. Only the smallest
variant still rotates onto the mesh.

A &vpn pin on a row no mode of which can take the mesh now aborts the run
instead of quietly deploying 🛣️, and a regular row pinned to the mesh only
rotates onto a mode that can carry it.
2026-10-16 14:48:36 +02:00
evangelostsak a206abd8d5 docs(ci): every swarm and compose row carries the mesh or direct glyph 2026-10-16 14:48:35 +02:00
kevinveenbirkenbach 7b7ddcf463 Merge remote-tracking branch 'origin/main' into update/version-sources-web-app-suitecrm-20261016-76d4132 2026-10-16 14:18:26 +02:00
kevinveenbirkenbach 086bbaf8a3 fix(web-app-suitecrm): raise the stored system user around the external-auth save
495d23dbde raised an admin context with a fresh in-memory bean, which fixed
hasSaveAccess() and moved the failure one guard further. User::verify_data()
compares $this->id == $current_user->id, and between two unsaved beans that is
'' == '', so a deployment with a single administrator takes the last-admin
branch for the very account CreateUser is in the middle of creating. The branch
reads the legacy $mod_strings, which this request never loads.

That is why the two SuiteCRM jobs of CI run 38818071194 looked like two
failures: the LDAP variant ended in ErrorException "Trying to access array
offset on value of type null" at modules/Users/User.php:1678 and answered
HTTP 500 to POST /login, while the SAML variant took the same verify_data()
failure, avoided the 500 because $mod_strings happened to be loaded, redirected
to index.php?action=Error&module=Users and left no session, so its spec timed
out waiting for the SPA instead. Both are the first login of a persona that has
no local row yet; administrator passes in both because it already has one.

Use the stored system user, which has a real id, so hasSaveAccess() passes,
restrictAdminOnlyFields() early-returns, setIsAdmin()'s reloaded bean resolves
and '' == '1' skips the last-admin branch.

Assign $current_user before calling getSystemUser(), not from its return value.
User::retrieve() runs loadPreferences() after filling the bean, and both
UserPreference::loadPreferences() and reloadPreferences() dereference
$current_user->id unguarded, so retrieving while the caller's anonymous
$current_user is still in place raises "Attempt to read property id on null"
and answers HTTP 500 one line further on. Assigning first also means the only
session preferences key written is the system user's own, never the key of the
account signing in.

The patch header records both failure modes, because the patch outlives this
commit and is applied at image build time with -F0, so whoever reads it next
when a hunk stops matching needs to know what it was for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 207cdc70ff)
2026-10-16 14:18:23 +02:00
kevinveenbirkenbach 104af5332a Merge remote-tracking branch 'origin/main' into merge/pr-950 2026-10-16 14:17:36 +02:00
kevinveenbirkenbach 463df06202 Merge pull request #973 from infinito-nexus/fix/ci/dns53-sampler-portable-clock
fix(ci): time the DNS53 sampler probes from /proc/uptime
2026-10-16 14:15:57 +02:00
kevinveenbirkenbachandClaude Opus 5.5 891d46d589 fix(ci): time the DNS53 sampler probes from /proc/uptime
The 🐳 Workspace (ubuntu:latest) job on main (run 38879556215, 1b36ef6120)
failed test-unit-python in the hook's second make test:

    AssertionError: Regex didn't match: '^ localhost=ok/\d+ms$'
    not found in ' localhost=ok/-1612931482679767779ms'

ubuntu:latest is Ubuntu 26.04, whose date is uutils coreutils. uutils
0.7.0 ignores the field width in %3N and prints all nine nanosecond
digits, so `date +%s%3N` yields a 19-digit value instead of epoch
milliseconds. Against main's sampler, uutils 0.7.0 date reports
localhost=ok/7081859ms, and an unpadded nanosecond value turns the
difference negative.

answer_once now takes both timestamps from /proc/uptime, which the
kernel prints with two decimals whatever date the image ships. The
sampler already reads /proc/net/udp, so it was Linux-only before. The
resolution is 10 ms; the same probe reports 10 to 20 ms with uutils
date on PATH.

The new test puts a date on PATH that does not understand %3N; main's
sampler dies on it, the fixed one does not call date for the latency.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 14:15:25 +02:00
evangelostsak 6e8fbd9c25 test(wireguard): size the bulk probe and bound the SSH connect time 2026-10-16 13:55:11 +02:00
evangelostsak a709d237c5 test(wireguard): probe the meshes with SSH, bulk data and the cryptokey table
A ping proved the tunnels answer, not that a session lands on the right host
or that full-size TCP segments cross them. Each pair sharing a mesh now also
opens an SSH session to the peer's mesh address and must land on that peer,
then pulls 8 MiB through it and compares the checksum with the one taken at
the source. Each pair that shares no mesh must fail the SSH connection itself,
never on authentication, since every host trusts every other host's key.
WireGuard must refuse a packet forced into a mesh that holds no peer for it
(Required key not available), so the isolation is shown to come from the
cryptokey table rather than from a missing route. The two hosts must still
reach each other on the underlay, so the isolation is the mesh's doing.

The SSH options are the platform's own, mesh_ssh_args over the repository's
ssh_args, the ones the swarm transport switches Ansible onto; the addresses
come from mesh_address. Every probe runs through one check helper, so a probe
is a predicate rather than another copy of the pass and fail bookkeeping.

Verified in the dev stack: all 20 checks passed, and a mutant that inverted
every expectation (unreachable pairs, a wrong identity, a different file, a
denied key, the peer's own address forced through the cryptokey check) failed
all 9 of its checks.
2026-10-16 13:55:11 +02:00