Worker read-only mounts: reserve relocated install dirs, portable test fixtures, recursive read-only
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with setup-scripts/debian13-worker/check-ro-mounts.sh, then trace how load_env, run-fleet.sh, install-release.sh and the Makefile pass the effective directories. Read the named Bats tests and run them with relocated paths and a checkout under a reserved prefix. For recursive read-only behavior, perform the described Debian 13 worker check and document the result; done means all acceptance criteria pass, including compatibility and the Unreleased changelog entry.
Written by the indexing model from the issue text.
Description
Problem
setup-scripts/debian13-worker/check-ro-mounts.sh validates WORKER_RO_MOUNTS. Three gaps remain.
- The reserved list is fixed.
RESERVEDis hardcoded (setup-scripts/debian13-worker/check-ro-mounts.sh:63) and covers the default config and home dirs only. A relocatedCONFIG_DIR(setup-scripts/debian13-worker/lib.sh:29) orWORKER_HOME(setup-scripts/debian13-worker/lib.sh:276) is not reserved, and the workerINSTALL_DIR(ops/release/install-release.sh:507) is not reserved even at its default. A mount of one of those dirs passes the validator. Those dirs can hold the worker env files andsetup.env. - Test fixtures depend on the checkout path. The bats tests create fixtures with
mktemp -d "${BATS_TEST_DIRNAME}/ro-fixture.XXXXXX"(setup-scripts/debian13-worker/tests/test_check_ro_mounts.bats:18,setup-scripts/debian13-worker/tests/test_makefile_ro_mounts.bats:36,setup-scripts/debian13-worker/tests/test_run_fleet.bats:187,ops/release/tests/test_install_release.bats:73). A checkout under a reserved prefix (for example/tmp,/varor a home dir in the list) makes every positive test fail, because the validator rejects the fixture path. :romay not be recursive. The Makefile mounts each entry with-v $(d):$(d):ro(Makefile:329). Depending on the Podman and crun versions, a filesystem mounted under a declared dir may stay writable inside the container. Podman offersrrofor a recursive read-only mount. This has not been checked.
Proposed change
- Add an optional
--reserve <path>argument (repeatable) tocheck-ro-mounts.sh.load_env(setup-scripts/debian13-worker/lib.sh:327),run-fleet.sh(setup-scripts/debian13-worker/run-fleet.sh:141),install-release.shand the Makefile (Makefile:956) pass the effectiveCONFIG_DIR,WORKER_HOMEandINSTALL_DIR. The rule stays in one script. - Add a fixture root for the tests (for example
RO_FIXTURE_ROOT). When it resolves under a reserved prefix, skip with a clear message instead of failing. - Test on a Debian 13 worker with a tmpfs mounted under a declared dir. If it stays writable, use
rrowhen the installed Podman supports it, or document that submounts are not covered.
Compatibility
--reserveis a new optional argument. Callers that do not pass it behave as today.- A host whose
WORKER_RO_MOUNTSoverlaps a newly reserved dir would fail validation, andmake up clientwould stop. Guard: in the first release, a collision with a path added through--reservelogs a warning and does not fail. It fails in a later release, announced in the CHANGELOG. rrois used only when the installed Podman accepts it. Otherwise the mount stays:ro, so a worker on an older Podman still starts.
Acceptance criteria
-
check-ro-mounts.sh --reserve <dir> '<dir>/sub'reports the collision (warning in the first release) and names the reserved dir (bats test). - The callers pass the effective
CONFIG_DIR,WORKER_HOMEandINSTALL_DIR(bats test with relocated values). - The bats suites pass from a checkout under a reserved prefix, or skip with a clear message.
- A documented manual check shows whether a submount under a declared dir is writable inside the container, and the result is applied (
rroor a documented limit). - Existing deployments keep working without config changes: a
WORKER_RO_MOUNTSaccepted today still letsmake up clientstart the worker in this release. - A worker on a Podman without
rrosupport still starts with:romounts. - CHANGELOG entry under Unreleased, including the planned switch from warning to error.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AInvirion/orcaster
-
enhancement P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement good first issue P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug P2 server
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
bug P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
enhancement P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
All issues in AInvirion/orcaster
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
daniel-ospina/tortoise#15308 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
difficulty:easy prio:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NatronGitHub/Natron#2405 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Jstar269/nakagawa-recomp#3746 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day