bf25eb2fc7 removed the sync-main job because the fork had no token that
may push .github/workflows/**: GITHUB_TOKEN cannot be granted the
workflows permission, and the bot App is installed on infinito-nexus/core
only. Since then a fork's main only moves when its owner syncs it by
hand, and the fork's main has fallen 368 commits behind.
The job is back with a token of its own: CI_SYNC_MAIN_TOKEN, a
fine-grained personal access token limited to the fork, with Contents
and Workflows write. main_from_repository.sh resolves the source through
baseline_remote.sh, so the normalization and the off switch exist once:
in infinito-nexus/core itself and with CI_SYNC_MAIN_SOURCE_REPOSITORY
disabled the job ends green without reading the secret. Everywhere else
a missing secret fails the job before any fetch or push and names the
page that explains how to create it. The token reaches git as an HTTP
header through GIT_CONFIG_* variables, never through argv or
.git/config; checkout runs without persisted credentials so its own
header does not compete.
The job runs beside run-policy, not before it: CI keeps fetching its
diff baseline from the source repository read-only, so a failed sync
turns the run red without holding CI back.
fix/ci-mirror-token tried the bot App instead (019fb572a7, 756b180f1d).
That needs the App installed on every fork and granted Workflows write,
which secrets.md rules out for the App, so the token here is a
per-fork PAT.
Checked: the script skips as infinito-nexus/core and with the sync
disabled, and fails before fetching as a fork without the secret.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Four roles rendered a credential into a container's command or
healthcheck, where `docker inspect` and the host's `ps` show it:
- svc-db-redis: `redis-server --requirepass <password>`, the
healthcheck's `redis-cli -a <password>`, `REDIS_CLI` with `-a` and
the ACL password on the `container exec` line. The CLI, ACL and
healthcheck changes are the ones feature/store-i18n made for #1213
(54dde281a0, 772e3e70e0): REDISCLI_AUTH from the container's
REDIS_PASSWORD, the ACL password on stdin through `redis-cli -x`,
and the healthcheck declared through the container_healthcheck SPOT.
New here: redis-server reads `--requirepass "$$REDIS_PASSWORD"` from
its environment at runtime, which needs the CA override to keep the
`$$` (e53a8c7d75).
- svc-db-elasticsearch: the healthcheck's `curl -u elastic:<password>`
now reads the credential as a curl config on stdin, written by the
printf builtin from ELASTIC_PASSWORD.
- svc-db-typesense: the server reads TYPESENSE_API_KEY from its env
file, so `--api-key <key>` is gone.
- web-app-funkwhale: its Typesense sidecar gets the key through that
service's `environment:` instead of `--api-key`; the shared env file
would hand it to the API as well.
The exec argv lints check Ansible commands only, so none of this was
caught. test_compose_argv_no_secret refuses a credential variable in the
command, entrypoint, healthcheck or test of a role template; it failed
on these five lines before the fix.
Checked: the local redis answers the authenticated ping on the first
attempt and its Cmd and healthcheck carry only `$REDIS_PASSWORD`;
typesense 0.25.2 accepts the key from the environment (200 with it,
401 without, refuses to start with none); curl sends the expected
Authorization header from `-K -`.
Refs #1213
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ansible.mysql warns on every deploy that "MariaDB has been detected: its
support will be dropped in 6.0.0. For MariaDB automation, please use the
ansible.mariadb collection instead." The galaxy pin updater crosses major
versions, so its next bump would have broken the three tasks that wait
for root credentials, create a consumer's database and create its user.
They now use ansible.mariadb.mariadb_db and mariadb_user. Their options,
the shared login options and the PyMySQL driver are the same, so the
tasks only change their module name. ansible.mariadb 6.0.2 replaces
ansible.mysql 5.2.0 in both requirement files; nothing else used the
mysql collection.
The deprecated-pattern lint now refuses ansible.mysql.* as well as
community.mysql.*, and the raw query lint covers mariadb_query.
Local Nextcloud update deploy: the wait task loads
ansible/mariadb/plugins/modules/mariadb_db.py, passes on the first
attempt, and the MariaDB warning is gone.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
render_override takes a service's entrypoint and command from the
output of `docker compose config`, which already prints a literal `$`
as `$$`, and the image's Entrypoint and Cmd from `docker image inspect`,
which are raw. It escaped the combined argv once more, so a service
command reading a variable at runtime (`$$REDIS_PASSWORD` in
compose.yml) reached the override as `$$$$` and the container as `$$`,
which the shell expands to its PID. redis then required
"<pid>REDIS_PASSWORD" and every authenticated ping failed with
WRONGPASS.
Only the image-derived parts are escaped now; the service's own argv
is written as compose config printed it. A new test keeps a service
command's `$$` intact next to an image entrypoint; the existing tests
still require an image Cmd's `$VAR` to become `$$VAR`.
Local Nextcloud update deploy: the redis override holds `$$`, the
container Cmd `$REDIS_PASSWORD`, and the authenticated ping answers
PONG on the first attempt.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On a fresh stack the daemon config changes, so the
container-manager-restart handler runs the Docker-in-Docker DNS probe
before sys-ca-selfsigned has created the root CA. container run then
found no CA file and logged "CA injection disabled (CA files not
found). Falling back to plain 'docker run'." twice per fresh deploy.
The probe only resolves names and needs no TLS, so the handler now
passes CA_CONTAINER_ENABLED=0 like the helper containers of bluesky,
confluence, jira, mediawiki and nextcloud do. container.py reads the
flag in one place and injects the CA only for "1".
Checked with fake CA paths: with the flag at 1 container run warns
once, at 0 it does not warn and still exits 0.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ansible-lint --fix folds the line. Inside the double-quoted scalar the
break folds to a single space, so the parsed expression is unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The background pre-pull ran only with ASYNC_ENABLED, so local deploys,
the first CI pass and debug deploys pulled every missing image inside
the app that needed it, one after the other. The job itself is a
best-effort background pull that reap.yml collects and only reports
on, so it does not depend on the rest of the deploy being asynchronous.
Storage-constrained hosts, MODE_RESET and swarm workers still skip it.
Of twelve deploy cells, three change from skip to run: the local
synchronous reinstall, CI pass 1 and a production deploy with
MODE_DEBUG. A local Nextcloud reinstall generated its CA override in
10 s instead of 84 s, because the images were already present.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
automtu searched the path MTU between its payload bounds, and a lost
echo during that search moved the result between 1400 and 1398 from one
deploy to the next. Every move changed the daemon MTU, rewrote
daemon.json and restarted dockerd.
The probe window is now a single payload: the smaller of 1500 and the
egress MTU automtu reads itself (`--print-mtu egress`), minus the 28
bytes of IP and ICMP header, with `--pmtu-policy max` so one target
answering at that size decides. registry-1.docker.io leaves the
targets because it does not answer ICMP echo. The assert now names both
the egress and the effective value.
Local repeat deploy: the probe took 0.83 s and no handler restarted
dockerd.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Handlers run in definition order, and "Generate CA trust override" was
defined before "Build compose". On a first deploy the override read the
Entrypoint and Cmd of every service image with docker image inspect
before compose build had created the locally built tags, found none,
and left those services without the with-ca-trust wrapper; on later
deploys it read the previous build's Entrypoint and Cmd instead of the
new one. The override and the compose config validation now run after
the build and rebuild handlers and before compose up; pull stays first.
The swarm handlers already build before they generate their override
and use no wrapper, so they are unchanged.
TestFirstDeployFlush replays the shell handlers of one compose-build
plus compose-up flush in the order handlers/compose.yml defines them
and asserts that compose up starts the freshly built image behind the
wrapper.
Local deploy: all six stacks with a built image carry the wrapper in
compose.ca.override.yml, nextcloud for 8 of 8 services.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
recognize's app:install downloads about 700 MB of models and held the
plugin phase for minutes. An addon may now set
config.background_install; the plan files such a plugin under the new
background list unless it is pinned through archive or mandatory.
01_background.yml starts occ app:install as an async job and holds
every later occ call at a gate until the app's schema is applied:
Nextcloud migrations diff a schema snapshot, so DDL running beside
another occ call can be reverted. The gate reads the async job file
and files/php/utils/migration_state.php, which prints the versions
oc_migrations records and the versions the app's migration folder
holds. occ migrations:status is not usable, Nextcloud registers it only
with debug on. While the app directory does not exist yet the
MigrationService constructor throws and lib/base.php's ErrorHandler
only logs it, so the probe exits 0 with nothing on stdout and the gate
waits.
The install loop then runs while the job finishes; the always section
joins every job with async_status and fails on an exit code that a
timeout or signal produced, because the php process may then still run
inside the container. 02_install.yml afterwards answers "already
installed" and enables and configures the plugin, or installs it with
its own retries when the job failed before placing the app.
The stage files are renumbered (01_install -> 02_install, 02_enable ->
03_enable, 03_configure -> 04_configure) so the numbers follow the
include order the task-numbering lint checks.
Local perf run: plugin phase 538 s -> 282 s, gate open after 30.2 s,
recognize 12.0.2 enabled with 8/8 migrations, failed=0.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeQL flagged five notes on PR #1215: four test modules imported unittest both as a module and through from-import, and sys-front-inj-matomo's __init__ exported PROJECT_ROOT without declaring it, so the import from test_site_cache.py read as unused. The modules now bind mock through import unittest.mock as mock, and the package declares __all__, the same fixes main carries from 3610e7b9ef and 6e776a5780. The same pattern is fixed in the new Talk direct-media test and the decommission integration package, and the coturn test package drops an __init__ export nothing imports.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Every TLS vhost set ssl_stapling on. Let's Encrypt certificates carry no OCSP responder URL since Let's Encrypt ended OCSP in 2025, and the self-signed development certificates have no issuer chain for it, so nginx ignored the directive and logged a warning for every server block on every reload.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
janus_conf is mounted only when direct media is on, which requires compose mode, and compose ignores a config mode outside swarm and warns about it on every deploy. The file keeps the 0644 it is rendered with on the host.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Since db:seed only runs under MODE_DEMO (8e35d053a2), nothing created an organization on a non-production deploy, so the host and OIDC tasks that follow had none to configure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removing a role from the inventory left its compose stack running under /opt/compose, holding ports, memory and a stale instance directory, until someone stopped it by hand.
On a full compose deploy with MODE_CLEANUP (no --id), the destructor now takes every directory below DIR_COMPOSITIONS that is named after a known role, carries the full instance layout and is owned by no active role (inventory-wide groups, group_names, the dependency closure and the instances this play prepared), stops it with compose down --remove-orphans without -v, verifies through the project and working_dir labels that no container is left, and only then deletes the directory; named volumes stay. Hand-made, partial or backup directories and instances a non-compose container is named after are left in place and listed. The step is the last block of the destructor, with the timer unlock in its always section, so a failure cannot leave timers locked.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The aio-talk image runs Janus with its stock janus.jcfg: no rtp_port_range and no nat_1_1_mapping, so Janus offered only its bridge address and every stream of a call went through coturn as relay. Calls above about six participants stuttered and failed.
When talk runs bridged next to standalone coturn in compose mode on a host that owns networks.internet.ip4, a rendered janus.jcfg is mounted over the stock one with rtp_port_range 61000-61999, nat_1_1_mapping = ip4 and keep_private_host, and that UDP range is published on ip4. TURN stays the fallback. Before rendering, the deploy reads the image's launcher and stock janus.jcfg and stops when Janus no longer reads the mounted path or the stock settings drifted from the template. Variant 0 publishes 64 ports so dev and CI exercise the path; the call capacity spec asserts a non-relay selected pair on ip4 in that range. With the flag off every rendered file is byte-identical to before.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With host networking and no --relay-ip, coturn put every non-loopback IPv4 of the host into its relay list, Docker bridge gateways included, and handed IPv6 and bridge clients relays on those addresses while advertising the public ip4, so their media went nowhere. It also listened on every bridge address.
In compose mode with host networking, coturn now listens on networks.internet.ip4, 127.0.0.1 for the healthcheck and networks.internet.ip6 when set, and relays on ip4. It pins only when the host owns ip4, and owns ip6 too or leaves it unset; behind 1:1 NAT, without the ip binary or with a foreign ip6 it renders the previous command unchanged, because coturn exits when it cannot bind a listening address. A unit test renders the real template and vars for every cell.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The spec could never pass. It built URLs as ${baseUrl}/call/<token> with a base that already ends in a slash, so Talk's client router matched no route and rendered an empty page. It also expected a single display-name dialog, while Talk shows a welcome dialog (Enter your name, Submit name and join) when no call runs and a device check with a display name field when one does. And its guests had no media devices, so no peer connection ever formed.
URLs now go through new URL(path, base) like every other Nextcloud spec, joinCallAsGuest follows both dialogs, and the guests run in a dedicated Chromium with fake media devices and a regular Chrome user agent, because Talk's unsupported-browser toast for HeadlessChrome covers the call button.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
SystemMaxUse was unset, so journald fell back to 10 % capped at 4 GiB regardless of the host. The role now measures the filesystem that holds /var/log/journal with df and sets SystemMaxUse to services.svc-journalctl.system_max_use_percent of it, 2 % by default, overridable per host in the inventory.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The role pins v8.3.2, which LAST_MIGRATION_VERSIONS did not list, so peertube_migration_version aborted every deploy. 8.3.2 keeps LAST_MIGRATION_VERSION 1130 from upstream server/core/initializers/constants.ts.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
coturn ran with a fixed --total-quota=100 for the whole server. A Nextcloud Talk call through the HPB opens N peer connections per participant and one allocation per TURN transport, about 2*N^2 allocations, so calls of more than about five participants ran out. services.coturn.total_quota now sets the quota, 2000 by default; on echoserver eight participants held connected media with it.
The Nextcloud Playwright suite gains test-talk-call-capacity, gated like the Talk admin test: as administrator it creates a public room through the Talk API, joins six guests in separate contexts with fake media, and requires every guest to hold a connected peer connection to every participant and no TURN 486 Allocation Quota Reached.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
client_max_body_size 31M sat in the server block of the mail vhost, where the client_max_body_size of location / (server.client_max_body_size, 100m by default) overrode it. It now lives in meta/server.yml, so both Stalwart vhosts enforce 31M. The extra configuration of the mail vhost instead answers the legacy Mailu path /webmail with a 301 to the Roundcube base URL.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Context Agent 2.10.0 (bumped in #1219) moved to a multi-stage image whose
runtime stage ships no curl ("no vim, no git, no curl, no pipx/poetry",
nextcloud/context_agent Dockerfile at v2.10.0). The curl healthcheck then
fails with `exec: "curl": executable file not found in $PATH`, the task
never leaves `starting`, and the swarm converge wait gives up on
nextcloud_context_agent (main run 40401200083, Nextcloud#2).
Switch to the http_status flavor, which speaks HTTP over bash's
/dev/tcp and still requires a 2xx/3xx answer from /heartbeat.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SeaweedFS 4.49 (seaweedfs/seaweedfs#11592) authorizes a PutObject that
carries x-amz-acl as s3:PutObjectAcl as well. The consumer identities
only held Read/Write/List/Tagging, so every app that sends an ACL on
upload (Nextcloud, Fider and Pixelfed with private, Mastodon, PeerTube,
BookWyrm and Baserow with public-read) got AccessDenied after the 4.48 -> 4.51
bump in #1226. Main run 40401200083 failed Fider#0, BookWyrm#0,
Baserow#0, Pixelfed#0 and Nextcloud#0/#4/#8 on it.
Add WriteAcp to the s3.json identities and to the sidecar s3.configure
grant.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>