Run a run-once process as its oneshot unit (design 38 WP4c) #85

Merged
mesh-admin merged 1 commits from fix/a-run-once-step-runs-where-and-as-declared into main 2026-10-03 22:29:11 +00:00
Contributor

A run-once process was run directly, with the host's own working directory, and without its env, env-file or user. Module steps moving out of their containers, in mesh-catalog #245 and the waves after it, run node bootstrap/index.js from their bundle and read their words from an env file. They could find neither.

A step is now written as a oneshot unit from the same writer as a daemon's, so it gets the same working directory, environment, environment files and user. It is then started with systemctl start, which waits for the step to finish and fails when it fails. The unit is never enabled, has no restart, and has no install section. A changed declaration or a restart-on file reruns it, as before.

Test: the step's unit carries all four settings, the step is started and not run directly or enabled, and a failed step fails the apply. The test fails on main and passes here. The full suite passes.

A run-once process was run directly, with the host's own working directory, and without its `env`, `env-file` or `user`. Module steps moving out of their containers, in mesh-catalog #245 and the waves after it, run `node bootstrap/index.js` from their bundle and read their words from an env file. They could find neither. A step is now written as a oneshot unit from the same writer as a daemon's, so it gets the same working directory, environment, environment files and user. It is then started with `systemctl start`, which waits for the step to finish and fails when it fails. The unit is never enabled, has no restart, and has no install section. A changed declaration or a restart-on file reruns it, as before. Test: the step's unit carries all four settings, the step is started and not run directly or enabled, and a failed step fails the apply. The test fails on main and passes here. The full suite passes.
mesh-admin added 1 commit 2026-10-03 22:29:04 +00:00
A step was run directly: in the host's own working directory, without its env, env files or
user. A module step moved out of its container (node bootstrap/index.js) could find neither its
code nor its words. A oneshot unit carries all four as a daemon's does, and starting it waits.
mesh-admin merged commit a24670d77c into main 2026-10-03 22:29:11 +00:00
mesh-admin deleted branch fix/a-run-once-step-runs-where-and-as-declared 2026-10-03 22:29:11 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-host#85