Repository navigation
fix(compose): never move a multi-container install on update, and keep two Compose files - #3279
Conversation
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Findings
|
| Layer / File(s) | Summary |
|---|---|
Compose layouts and deployment settings docker-compose.yml, docker-compose.split.yml, docker-compose.node*.yml, docker-compose.nvidia.yml, docker-compose.vaapi.yml, .env.example, README.md, docs/architecture/tcp-congestion.md |
The split Compose file defines Silo, PostgreSQL, Redis, and optional Meilisearch services. The default Compose file documents server, node, and hardware-transcoding settings. Separate node and GPU Compose files are removed. |
Node configuration and requirements .env.example, docker-compose.yml, omnibus/rootfs/etc/s6-overlay/scripts/init-config, docs/architecture/node-drain.md, docs/architecture/omnibus-image.md |
Node access and node operation are configured through the default Compose file. Proxy and transcode modes now require NODE_URL. The stop grace period can be set with SILO_STOP_GRACE_PERIOD. |
Migration command and startup checks README.md, docker-compose.yml, omnibus/rootfs/etc/s6-overlay/scripts/init-postgres, omnibus/rootfs/etc/silo-omnibus/migrate-compose-stack, docs/architecture/omnibus-image.md, scripts/silo-dev |
Existing multi-container installations can select docker-compose.split.yml. Migration is a separate administrator-run command. The migration script no longer writes the checked marker, and startup checks now run before the PostgreSQL-enabled early exit. |
Local development Compose updates
| Layer / File(s) | Summary |
|---|---|
Development Compose path and references dev/compose.yml, AGENTS.md, CONTRIBUTING.md, DEVELOPMENT.md, .github/workflows/trusted-linux-ci.yml, contracts/api/v2/*, docs/architecture/api-contract.md, docs/architecture/observability.md, scripts/apiv2-ledger/build_ledger.py |
Development commands and health-check references use dev/compose.yml. Its build contexts, bind mounts, and optional .env path resolve from the parent directory. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant Operator
participant migrate-compose-stack
participant DockerCompose
participant init-postgres
Operator->>migrate-compose-stack: Run the migration command after stopping the earlier stack
Operator->>DockerCompose: Select docker-compose.split.yml to retain the multi-container layout
DockerCompose->>init-postgres: Start Silo
init-postgres->>init-postgres: Check the migration marker before the PostgreSQL-enabled early exit
Possibly related issues
- [v1] Distributed transcode nodes #1176: The PR changes the Compose deployment and node-access configuration, but does not address registration, caps, monitoring, or failover criteria.
- Distributed transcode nodes — Web admin #1178: The PR changes Compose layouts and node configuration, but does not validate the web-admin setup, node registration, or single-node configuration.
Suggested labels: stacked, needs-review, impact: usability
Suggested reviewers: darthshadow, thezak48
Merge Risk: 
Moderate · up to 4e302
-
Existing installations can migrate the wrong database or later start stale copied data; both migration paths should be fixed before merging.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (10 skipped: 10 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsBlocking findings (1)
Advisory findings (2)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
This changes Compose startup and migration behavior, not a client-rendered surface or server response, so it is not visible under the evidence criteria. The Evidence section says “No visual change” but is missing the required line; please add Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02206dadf4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ### Updating an install from before the omnibus image | ||
|
|
||
| An install that runs PostgreSQL, Redis, and Silo in separate containers can | ||
| keep that layout. Before updating, add this line to its `.env`, followed by | ||
| any file you already layer on it, such as `:docker-compose.vaapi.yml`: |
There was a problem hiding this comment.
Move the upgrade instructions to the user manual
This new section is an operator-facing upgrade guide: it tells administrators how to configure .env, choose a deployment layout, and migrate an existing installation. The root AGENTS.md explicitly prohibits adding operator guides here and reserves the sole exception for docs/update-to-1.0.md. Put these instructions in the siloserver.org user manual and retain a short link from the README instead.
AGENTS.md reference: AGENTS.md:L122-L127
Useful? React with 👍 / 👎.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: ce46396c3b
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
| shm_size: ${POSTGRES_SHM_SIZE:-8gb} | ||
| environment: | ||
| POSTGRES_USER: ${POSTGRES_USER:-silo} | ||
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-silo} |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Security: Remove the split stack's known database password
On split-stack hosts where an untrusted local process can reach loopback and POSTGRES_PASSWORD was not overridden, this defaults both the silo account and its password to silo while publishing PostgreSQL on 127.0.0.1:5432. The repository identifies silo as the cluster superuser, so that process can bypass Silo authentication and modify users.role or other authorization state. The loopback bind blocks remote hosts, but not lower-privileged code on a shared server or NAS. Do not publish this port by default, or require a generated password and provide an existing-cluster rotation step.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Keeping this as is in this PR. It's the cost of keeping docker-compose.split.yml the same file existing installs already run: their clusters were initialized with the POSTGRES_PASSWORD they had then, and the old quick start generated one, so the silo default applies only to installs that skipped that step. The port is bound to 127.0.0.1, so using it already takes code running on the host, and host-side tools such as pg_dump rely on it. Requiring a password or dropping the publish would stop or break updates for those installs. New installs use docker-compose.yml, where PostgreSQL has no password and listens only on its socket inside the container. Tightening the split file's host ports, with a password-rotation step for existing clusters, fits better as its own change.
|
The distributed-node deployment path is materially different, so the recorded build 1804 results for server C1/C2 need re-validation after merge. The removed node file defaulted to
Suggested corrected line: Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
docker-compose.yml runs the omnibus image, and its postgres service copied an install of the earlier multi-container stack into the single container on the next docker compose up. Existing installs were moved without asking. The postgres service now stops before Silo starts when it finds such an install, unless .env sets MIGRATE_COMPOSE_STACK=true. Its message offers both choices: keep the layout by selecting docker-compose.split.yml, which is the earlier Compose file unchanged on the regular image, or opt into the move. REQUIRE_COMPOSE_MIGRATION still keeps Silo from creating an empty database meanwhile. Installs already moved, and omnibus installs of their own, are unaffected. New installs keep the single-container default. The image-pin check now runs after this one, so an install that keeps its layout is not told to pin an omnibus image. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The repository root held seven Compose files. Keep docker-compose.yml and docker-compose.split.yml: - The VA-API and NVIDIA lines, which docker-compose.vaapi.yml and docker-compose.nvidia.yml layered on, are commented out in both files. - Node access is ENABLE_NODE_ACCESS, the passwords, and NODE_ACCESS_HOST in .env, plus two commented port lines in docker-compose.yml, in place of docker-compose.node-access.yml. - A node's host runs docker-compose.yml with MODE, DATABASE_URL, REDIS_URL, and NODE_URL in .env, in place of docker-compose.node.yml. The image already turns off its bundled services for those modes. SILO_STOP_GRACE_PERIOD sets the longer stop timeout a draining transcode node needs. - The development stack moves to dev/compose.yml. Its project name, and so its volumes, stay the same. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#3280 added cap_add: [NET_ADMIN] to docker-compose.yml and the node file, so Silo can use kernel BBR and a larger send buffer for remote clients. The split stack's file lacked it. The regular image runs Silo as root, which still has no NET_ADMIN unless Compose grants it, so add the same grant. Silo's startup helper confines it there as in the omnibus image. tcp-congestion.md names the two shipped files that grant it now that node hosts run docker-compose.yml. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The repository holds no operator guides. Keep only what an existing install needs before it updates (select docker-compose.split.yml, and what happens otherwise) and link to the architecture doc; the user manual gets the full steps. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ce46396 to
f05f468
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: f05f468df2
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
| image: redis:alpine | ||
| restart: unless-stopped | ||
| ports: | ||
| - "127.0.0.1:${REDIS_PORT:-6379}:6379" |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Security: Require authentication for split-stack Redis
On split-stack hosts where an untrusted local process can reach loopback, this publishes Redis without authentication while Silo stores v2 WebSocket authority in it. The process can poll silo:events:v2:ticket:*, copy a live serialized ticket before GETDEL, and present it to the public /api/v2/events/ws or /api/v2/admin/logs/ws handshake to receive the victim's realtime data or admin logs. The 30-second TTL and authority recheck mitigate the race but accept a stolen live session. This remains exploitable after the separately reported PostgreSQL password is changed. Remove the host publish or require a Redis ACL/password and use it in REDIS_URL.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Same trade-off as the PostgreSQL thread: this is the earlier file's Redis, unchanged and bound to 127.0.0.1, and existing installs' REDIS_URL carries no password. Using it takes a process already running on the host that copies a ticket inside its 30-second window. New installs use docker-compose.yml, whose bundled Redis is not published and listens only inside the container unless node access is on, which requires REDIS_PASSWORD. Adding a password or dropping the publish for split installs fits better as its own change, together with the PostgreSQL one.
There was a problem hiding this comment.
Actionable comments posted: 3

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
5c2de20a-4b3c-404d-bde0-58008e2f047d
Files selected for processing: 23-
.env.example.github/workflows/trusted-linux-ci.ymlAGENTS.mdCONTRIBUTING.mdDEVELOPMENT.mdREADME.mdcontracts/api/v2/migration.jsoncontracts/api/v2/migration.schema.jsondev/compose.ymldocker-compose.node-access.ymldocker-compose.node.ymldocker-compose.nvidia.ymldocker-compose.split.ymldocker-compose.vaapi.ymldocker-compose.ymldocs/architecture/api-contract.mddocs/architecture/node-drain.mddocs/architecture/observability.mddocs/architecture/omnibus-image.mddocs/architecture/tcp-congestion.mdomnibus/rootfs/etc/s6-overlay/scripts/init-postgresomnibus/rootfs/etc/silo-omnibus/migrate-compose-stackscripts/apiv2-ledger/build_ledger.py
Files with no reviewable changes: 4-
- docker-compose.vaapi.yml
- docker-compose.nvidia.yml
- docker-compose.node-access.yml
- docker-compose.node.yml
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
…move a manual step docker-compose.yml kept one-shot services named postgres, redis, and meilisearch so an update replaced the multi-container stack's containers, and the postgres one checked for that stack before Silo started. A new install never needs them, and they made the file look as if it still ran PostgreSQL, Redis, and Meilisearch. The file now runs only Silo. It does not look for an earlier install: an install of the multi-container stack keeps its layout by selecting docker-compose.split.yml before it updates. Started without that, Silo comes up on a new, empty database, and the earlier containers keep running with their data untouched until COMPOSE_FILE brings them back. Moving such an install into the single container is a deliberate one-off: stop the stack, then run migrate-compose-stack with docker compose run and SILO_DATA_ROOT mounted, as docs/architecture/omnibus-image.md describes. With nothing running it on its own, MIGRATE_COMPOSE_STACK, REQUIRE_COMPOSE_MIGRATION, and the .compose-migration-checked marker go. A run that finds nothing to move says so and fails. init-postgres keeps refusing to start while a move is half done. The Compose comments are rewritten in plainer language; no setting changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80fc38cc4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # everywhere else: on bare metal or a VM they are the same files Silo would | ||
| # read anyway. Each is used independently, so dropping one only reverts | ||
| # that reading. See docs/architecture/observability.md#node-resource-sampling. | ||
| # These three matter only when the Docker host is itself an LXC container. |
There was a problem hiding this comment.
Restore the catalog-seeds mount in the default stack
For installations with catalog bundles in ${SILO_DATA_ROOT}/catalog-seeds, removing the /catalog-seeds mount makes those existing bundles inaccessible after updating the default stack. CatalogSeedHandler.localImportDirectory() still defaults to /catalog-seeds, and ListLocalCatalogImportSourcesPage() treats a missing directory as an empty list, so the local import picker silently loses all its sources and imports using their previous paths fail. Keep the read-only mount in docker-compose.yml, as the new split file already does.
Useful? React with 👍 / 👎.
| ENABLE_MEILISEARCH: ${ENABLE_MEILISEARCH:-false} | ||
| # Until the postgres service below has run once, Silo creates no empty | ||
| # database, so `up --no-deps silo` cannot start a new install in front | ||
| # of an earlier one the migration has yet to move. | ||
| REQUIRE_COMPOSE_MIGRATION: "true" | ||
| ports: |
There was a problem hiding this comment.
Unauthenticated administrator provisioning reopens when docker-compose.yml removes the migration startup gate and an existing split deployment updates without setting COMPOSE_FILE: the replacement server serves a new empty database on the same published ports, allowing the first remote visitor to create an administrator and authenticated session through the public /api/v2/auth/setup endpoint and gain administrative control over the server and its mounted resources. Refuse startup when legacy data exists until the administrator explicitly selects the split layout or requests a fresh install.
Prompt for LLM
File docker-compose.yml:
Line 71 to 72:
Unauthenticated administrator provisioning reopens when docker-compose.yml removes the migration startup gate and an existing split deployment updates without setting COMPOSE_FILE: the replacement server serves a new empty database on the same published ports, allowing the first remote visitor to create an administrator and authenticated session through the public /api/v2/auth/setup endpoint and gain administrative control over the server and its mounted resources. Refuse startup when legacy data exists until the administrator explicitly selects the split layout or requests a fresh install.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
| - ${SILO_DATA_ROOT:-/opt/silo}/download-artifacts:/tmp/silo-download-artifacts | ||
| - ${SILO_DATA_ROOT:-/opt/silo}/catalog-seeds:/catalog-seeds:ro | ||
| # Only load-bearing when the Docker host is itself an LXC container, where | ||
| # these three files describe the physical machine and the LXC's own cap | ||
| # sits on a cgroup this container cannot see. lxcfs virtualizes them to the | ||
| # LXC's limits, so passing that view in is what makes CPU, load, and memory | ||
| # report this container's share instead of the whole machine's. Harmless | ||
| # everywhere else: on bare metal or a VM they are the same files Silo would | ||
| # read anyway. Each is used independently, so dropping one only reverts | ||
| # that reading. See docs/architecture/observability.md#node-resource-sampling. | ||
| # These three matter only when the Docker host is itself an LXC container. |
There was a problem hiding this comment.
Catalog import failure in the default deployment results from removing the catalog-seeds bind mount in docker-compose.yml: HandleListLocalImportSources still reads /catalog-seeds and returns an empty list when it is absent, while readLocalImportFile cannot open existing host-side catalog import files. Restore the read-only mount retained in docker-compose.split.yml.
- ${SILO_DATA_ROOT:-/opt/silo}/download-artifacts:/tmp/silo-download-artifacts
- ${SILO_DATA_ROOT:-/opt/silo}/catalog-seeds:/catalog-seeds:roPrompt for LLM
File docker-compose.yml:
Line 95 to 96:
Catalog import failure in the default deployment results from removing the catalog-seeds bind mount in docker-compose.yml: HandleListLocalImportSources still reads /catalog-seeds and returns an empty list when it is absent, while readLocalImportFile cannot open existing host-side catalog import files. Restore the read-only mount retained in docker-compose.split.yml.
Suggested Code:
- ${SILO_DATA_ROOT:-/opt/silo}/download-artifacts:/tmp/silo-download-artifacts
- ${SILO_DATA_ROOT:-/opt/silo}/catalog-seeds:/catalog-seeds:ro
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 80fc38cc4f
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
| # docker-compose.split.yml in .env before it updates. This file does not look | ||
| # for one: started on its SILO_DATA_ROOT, it comes up on a new, empty | ||
| # database, and the earlier containers keep running with their data untouched. |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Security: Refuse legacy upgrades before exposing setup
When a pre-omnibus multi-container install updates with the default file before setting COMPOSE_FILE, this path initializes a new bundled database while the API remains published. Public POST /api/v1/auth/setup and POST /api/v2/auth/setup then treat the zero-user database as first run, so a remote caller who wins the race receives an admin session and can use the plugin-upload route to execute a binary as the server user. The advisory lock and rate limit only select or slow the first claimant, and the README warning is not a runtime control. Preserve a startup legacy-layout check that refuses to initialize until the operator selects the split file or explicitly migrates.
Useful? React with 👍 / 👎.
… install With the one-shot services gone, an install of the multi-container stack that updated onto docker-compose.yml without selecting docker-compose.split.yml came up on a new, empty database. First-run setup was open on the published ports, and an administrator can upload plugins that run inside the container, where the .env credentials for the earlier postgres container, still running on the Compose network, are readable. docker-compose.yml now mounts SILO_DATA_ROOT at /silo-data. Before init-postgres creates a database, it looks there for the earlier stack's cluster or Silo directories and refuses to start, naming both choices. The check runs only while the container has no database. The manual move command no longer needs its own mount. Also from review: - Restore the catalog-seeds mount the previous commit dropped from docker-compose.yml. - init-config requires NODE_URL for proxy and transcode nodes, as the removed node file did; Silo otherwise guesses one from its port, and two nodes would share session keys. - The README's note on the removed GPU and node files names the deployment file in use, which can be docker-compose.split.yml. - The migration ledger cites dev/compose.yml's health check at line 142. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7428498b20
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| earlier=() | ||
| for dir in /silo-data/postgres/*/docker /silo-data/postgres/data; do | ||
| if [[ -e "$dir/PG_VERSION" ]]; then |
There was a problem hiding this comment.
Check for an earlier install before skipping external PostgreSQL
If an earlier split-stack installation has DATABASE_URL in .env, init-config disables bundled PostgreSQL and this script exits at enabled postgres || exit 0, never reaching the new earlier-install check. The split file explicitly overrides that variable, whereas the omnibus file passes it through, so a previously ignored URL can now select a different database—including an empty one that exposes first-run setup—despite the original cluster being present. Previously, the mandatory migration script rejected a DATABASE_URL alongside the original cluster. Run the earlier-install safety check independently of whether bundled PostgreSQL is enabled, while allowing installations that have explicitly completed migration.
Useful? React with 👍 / 👎.
The earlier-install check ran only before init-postgres created a bundled database. A DATABASE_URL in .env turns the bundled PostgreSQL off, so init-postgres exited before the check. The multi-container Compose file overrode that variable for Silo, while docker-compose.yml passes .env through, so a stale URL from an earlier install could now pick Silo's database, including an empty one that opens first-run setup. Run the check before that exit, in the primary modes, which serve setup. It still skips an install with a finished move or a bundled database of its own, and proxy and transcode nodes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
Actionable comments posted: 4

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3406c615-932d-482b-b92b-683e323eccdc
Files selected for processing: 11-
.env.exampleREADME.mdcontracts/api/v2/migration.jsondocker-compose.split.ymldocker-compose.ymldocs/architecture/omnibus-image.mdomnibus/rootfs/etc/s6-overlay/scripts/init-configomnibus/rootfs/etc/s6-overlay/scripts/init-postgresomnibus/rootfs/etc/silo-omnibus/migrate-compose-stackscripts/apiv2-ledger/build_ledger.pyscripts/silo-dev
Files skipped from review as they are similar to previous changes: 3-
- scripts/apiv2-ledger/build_ledger.py
- .env.example
- docker-compose.split.yml
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
|
|
||
| ```sh | ||
| docker compose -f docker-compose.split.yml down | ||
| docker compose run --rm --entrypoint /etc/silo-omnibus/migrate-compose-stack silo |
There was a problem hiding this comment.
Resolve file-backed settings before migration.
--entrypoint bypasses init-envfile. If FILE__DATABASE_URL supplies an external database, the migration script sees no DATABASE_URL and copies the old cluster instead of rejecting the conflicting configuration. Normal startup then resolves the secret and connects to the external database, leaving the migrated data unused. Resolve and validate the same settings before migration. (raw.githubusercontent.com)
| # it. A finished move, or a database of this container's own, skips the check. | ||
| mode="${MODE:-integrated}" | ||
| if [[ "$mode" == integrated || "$mode" == api ]] && | ||
| [[ ! -e /config/.compose-cluster-copied && ! -e /config/postgres/data/PG_VERSION ]]; then |
There was a problem hiding this comment.
Check the source cluster before starting a migrated copy.
After a migration, an administrator can stop the omnibus stack, resume the split stack, and later switch back. The marker skips this guard, so Silo starts the stale copy without the fingerprint check in migrate-compose-stack. Changes made on the split stack are then absent. Check the recorded fingerprint during startup and refuse when the source cluster has changed.
…e startup check docker-compose.yml is an example of a new install on the omnibus image, and existing installs keep their own Compose file, with docker-compose.split.yml as the earlier multi-container layout. The earlier-install check needed the whole data root mounted beside its own subdirectories, so it goes, with the /silo-data mount and the SILO_DATA_ROOT variable it used. The file's header, the README, .env.example, and the architecture doc say that the example does not look for an earlier install and comes up on a new, empty database with setup open if started on one. The move command mounts the data root itself again, and the doc notes that going back to the split file after a move leaves the copy stale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Related issue: N/A
Validation tasks: changes #1177 C1, C2 (how a worker host is started; registration, co-location groups, and caps are unchanged)
Updating an existing install moves its data without asking. Since #3180,
docker-compose.ymlruns the omnibus image, and one-shot services namedpostgres,redis, andmeilisearchreplace the earlier multi-container stack's containers on the nextdocker compose up -d, after which thepostgresone copies that install into the single container. Administrators who want to keep separate containers have no supported file to stay on. The same services make the default file look as if it still runs PostgreSQL, Redis, and Meilisearch, and the repository root holds seven Compose files, five of them small add-ons.After this change,
docker-compose.ymlis an example of a new install: it runs only Silo and never moves an existing install. Existing installs keep their own Compose file, and a newdocker-compose.split.ymlkeeps the earlier layout. Moving into the single container becomes a deliberate one-off command. Those two are the only Compose files left at the root; the GPU and node options are commented out inside them.Approach
Existing installs:
docker-compose.split.ymlis thedocker-compose.ymlfrom before feat(docker): make the omnibus image the default Compose deployment #3180, on the regular image, with a new header, its commented proxy and transcode examples removed, the GPU lines added commented out, and theNET_ADMINgrant from feat(net): remote viewers keep their speed on lossy, long links #3280. An install of that layout selects it withCOMPOSE_FILE=docker-compose.split.ymlbefore it updates.docker-compose.ymldoes not look for an earlier install. The file's header, the README, and.env.examplesay to select the split file first, and what happens otherwise (see Risks).migrate-compose-stackby hand: stop the stack, thendocker compose runwith the data root mounted at/silo-data, asdocs/architecture/omnibus-image.mdshows. The script's copy, checks, and rollback safety are unchanged. Since nothing runs it on its own,MIGRATE_COMPOSE_STACK,REQUIRE_COMPOSE_MIGRATION, and the.compose-migration-checkedmarker go; a run that finds nothing to move says so and fails.init-postgresstill refuses to start while a move is half done.Two Compose files instead of seven:
docker-compose.vaapi.ymlanddocker-compose.nvidia.ymlbecome commenteddevicesanddeploylines in both files.docker-compose.node-access.ymlbecomesENABLE_NODE_ACCESS, the two passwords, andNODE_ACCESS_HOSTin.env, plus two commented port lines indocker-compose.yml. The image already refuses node access without the passwords.docker-compose.node.ymlgoes away: a node's host runsdocker-compose.ymlwithMODE,DATABASE_URL,REDIS_URL, andNODE_URLin.env, and the image turns off its bundled services in those modes. The image now requiresNODE_URLfor proxy and transcode nodes, as the removed file did; Silo otherwise guesses one from its port, and two nodes would share session keys.SILO_STOP_GRACE_PERIOD=11mgives a draining transcode node its longer stop timeout. Distributed transcode nodes — Server #1177 C1 and C2 passed with workers started from the removed file; the node test below covers the new path, and re-running those cases on a build with this change confirms it.dev/compose.yml. Its pinned project name keeps contributors' volumes. The API v2 migration ledger, its schema, and the ledger script cite that file by path, so they follow it, now at the health check's actual line.Both files grant
cap_add: [NET_ADMIN], as #3280 set up for the main and node files. The split stack's regular image runs Silo as root, which still lacks NET_ADMIN unless Compose grants it; Silo's startup helper confines it the same way. The Compose comments are rewritten in plainer language without changing any setting.Validation
:aioimage with this branch'sinit-postgres,init-config, and migration script mounted in:docker-compose.yml: healthy, one container, bundled PostgreSQL and Redis.docker-compose.ymlwithoutCOMPOSE_FILE: Compose left the earlierpostgresandrediscontainers running as orphans, and Silo came up on a new, empty database with setup open; the old cluster and artwork were untouched.COMPOSE_FILE=docker-compose.split.yml: back on its original database with the same login.docker-compose.yml: refused withoutNODE_URLand started with it. A main server with node access set in.envand its port lines uncommented, plus a node running against it, came up healthy in transcode mode with an 11-minute stop timeout.docker compose configrenders both files as shipped, and with the GPU and node-access lines uncommented, which produce the same devices, NVIDIA reservation, and ports as the deleted files. Both grantNET_ADMIN. Thesilomounts matchmain, and the split file's match the pre-feat(docker): make the omnibus image the default Compose deployment #3180 file.make verify-migration-ledger,make verify-shellcheck,make verify-local-paths, andgit diff --checkpass.:aioimage; the three scripts are the only image files that changed. No hardware transcoding run, and no run of the split stack withNET_ADMIN, since no published image contains feat(net): remote viewers keep their speed on lossy, long links #3280 yet. The change touches no Go or web files, so those gates do not apply.Evidence
No visual change. The notes cover the scenarios above and the messages each one printed.
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3279/
Risks
docker-compose.ymlwithout settingCOMPOSE_FILEcomes up as a new, empty server with setup open on the published ports. Whoever claims it first can upload plugins, which run inside the container next to the.envcredentials for the earlierpostgrescontainer, still running on the Compose network. A startup check could prevent this, but it needs the whole data root mounted beside its own subdirectories; this change instead treats the file as an example for new installs and states the risk in the file header, README, and.env.example.docker-compose.split.ymlafter a move leaves the copy stale; the doc says to moveconfigaside and run the move again.COMPOSE_FILEnames one of the deleted files fails ondocker compose upwith a missing-file error until it names only the deployment file it uses and uncomments the matching lines. Adocker-compose.override.ymlthat still changes the oldpostgres,redis, ormeilisearchservices makes Compose rejectdocker-compose.yml.git pullcan conflict with those local edits on later updates.docker-compose.split.ymlkeeps the earlier file's defaults, includingPOSTGRES_PASSWORDfalling back tosilowith PostgreSQL published on127.0.0.1:5432. Existing installs initialized their cluster with those values, so tightening them would stop their updates; new installs usedocker-compose.yml, whose PostgreSQL has no password and listens only on its socket.docker compose -f dev/compose.ymlinstead ofdocker-compose.dev.yml.docker-compose.yml, and the move command reports nothing to do for them.:aioimage is published,docker-compose.ymlonmainstill moves existing installs on update.Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Keep multi-container installs on
docker-compose.split.ymland remove per-purpose Compose overridesdocker-compose.nvidia.yml,docker-compose.vaapi.yml,docker-compose.node.yml, anddocker-compose.node-access.ymloverrides; their settings are now commented options inside the main Compose filesmigrate-compose-stackexplicitly; the script no longer writes the.compose-migration-checkedmarker, andinit-postgresno longer requires itinit-confignow exits whenMODE=proxyorMODE=transcodeis set withoutNODE_URLmigrate-compose-stackandinit-postgresinomnibus/rootfs/etc/silo-omnibus/Macroscope summarized 4e30227.