Skip to content

fix(compose): keep the tier 0 memory overlay in the resolved stack - #7478

Merged
Lightheartdevs merged 1 commit into
Osmantic:mainfrom
roshangupta00750:fix/tier0-overlay-in-resolver
Oct 8, 2026
Merged

Lightheartdevs merged 1 commit into
Osmantic:mainfrom
roshangupta00750:fix/tier0-overlay-in-resolver

Conversation

@roshangupta00750

Copy link
Copy Markdown
Contributor

Fixes #5466

Problem

docker-compose.tier0.yml caps memory for machines below 8GB RAM. The installer's compose-select.sh adds it and logs Including docker-compose.tier0.yml (Tier 0 memory limits). Phases 03 and 11 then replace COMPOSE_FLAGS with scripts/resolve-compose-stack.sh output, which is cached in .compose-flags. The resolver has never applied the overlay, so a tier 0 install runs on the base limits. Every later resolution drops it again: ods enable/disable, the host agent and ods-update.sh.

With the real compose files (base + cpu), the effective limits on main and with this change:

Service main this PR (tier 0)
llama-server 6G 4G
dashboard 2G 512M
dashboard-api 2G 512M
open-webui 4G 1G

Change

The resolver adds docker-compose.tier0.yml for tier 0/T0 when the file exists, before the operator's docker-compose.override.yml, so operator overrides still win. Other tiers are unchanged.

Persisting TIER to .env, so that later resolutions receive tier 0, is the separate change in #6617 and is not duplicated here.

Tests

tests/test-tier0-memory-overlay.sh (registered in tests/ci-suite.txt) runs the real resolver against a minimal tree. It checks:

  • tier 0 and T0 include the overlay;
  • tier 1 does not;
  • the overlay comes before docker-compose.override.yml;
  • a tree without the overlay file still resolves.
macOS (/bin/bash 3.2) Linux, Ubuntu 26.04
main — 3 of 5 fail
this PR 5/5 5/5
  • Mutation: dropping the T0 spelling fails its check.
  • docker compose config on the real base + cpu files: with this change, tier 0 gives the limits in the table above.
  • Related suites: test-compose-failure-report.sh and test-compose-image-discovery.sh still pass.
  • Checks: list-unwired-tests.py --check passes.

This re-lands the resolver part of #5467, which was closed with the public-beta branch.

AI assistance was used for analysis and drafting the fix and test. I reproduced the failure and verified the results above myself.

docker-compose.tier0.yml caps memory for machines below 8GB RAM. The
installer's compose-select.sh adds it and logs 'Including
docker-compose.tier0.yml', but phases 03 and 11 then replace the flags
with resolve-compose-stack.sh output, cached in .compose-flags, and the
resolver never applied the overlay. Tier 0 installs ran on the base limits
(llama-server 6G instead of 4G, Open WebUI 4G instead of 1G, each dashboard
2G instead of 512M), and every later resolution (ods enable/disable, host
agent, ods-update) dropped it again.

The resolver now adds the overlay for tier 0, before the operator's
docker-compose.override.yml.
@roshangupta00750

Copy link
Copy Markdown
Contributor Author

@Lightheartdevs @gabsprogrammer flagging this one because of its user impact: every tier 0 install (machines under 8GB RAM) currently runs without docker-compose.tier0.yml. The resolver drops it, so services get about 14G of memory limits on a 6G host (llama-server 6G instead of 4G, Open WebUI 4G instead of 1G). This is a 10-line resolver change with a CI-registered test, and docker compose config on the real files confirms the tier 0 limits apply. The TIER-in-.env half stays in #6617.

@Lightheartdevs
Lightheartdevs merged commit c2060a4 into Osmantic:main Oct 8, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tier 0 installs never get the tier 0 memory overlay: the compose resolver drops docker-compose.tier0.yml

2 participants