Files
Robert CronkandClaude Fable 5.1 8e2c2f27c4 fix(installer): check mount propagation and ports before installing
The installer created /opt/project-nomad, generated credentials, and started
pulling images before it could tell whether the host was able to run the
management stack at all. An incompatible root mount propagation or an already
occupied published port surfaced only as an opaque Compose failure, after the
installer had already written to the host and after the user had answered every
prompt.

Add a side-effect-free host preflight that runs after the environment checks and
immediately before create_nomad_directory. It derives the propagation-sensitive
host mounts and every published host port from the management Compose file
instead of hardcoding 8080 and 9999, inspects them with findmnt and ss, reports
every failed check together with its remediation, and exits nonzero before any
installation resource exists. The Compose file fetched for the preflight is
reused for the installation rather than downloaded a second time.

Wrap the top-level call sequence in a guarded main so the script can be sourced
by tests without performing an installation.

Add install/tests/install_nomad_preflight_test.sh, a dependency-free harness
covering Compose parsing, shared, slave, private and undetectable propagation,
free, occupied and undetectable ports, the existing-install port warning, call
order, Compose reuse, and failure before the installation directory is created.

Refs #1320

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-17 22:18:25 +00:00
..