CRITICAL: framework re-seed (install.sh keep mode / mosaic update) WIPES ~/.config/mosaic/fleet/roster.yaml #631

Closed
opened 2026-06-22 20:13:46 +00:00 by jason.woltje · 0 comments
Owner

DISCOVERED LIVE 2026-06-22 (recovered by reconstruction). The installer PRESERVE list does not include fleet/ user-data. A sync-only re-seed — which mosaic update runs AUTOMATICALLY (#610) — replaces ~/.config/mosaic/fleet/ wholesale with the framework version (README + examples/ + roles/ + roster.schema.json + run/), DESTROYING the user's live roster.yaml AND any backups stored under fleet/.

Impact: ANY user who runs mosaic update loses their entire fleet roster. High severity (data-loss in the routine update path).

Repro: create ~/.config/mosaic/fleet/roster.yaml, run MOSAIC_SYNC_ONLY=1 MOSAIC_INSTALL_MODE=keep bash framework/install.sh (or mosaic update) -> roster.yaml is gone.

Fix: the framework must NEVER overwrite user-authored fleet files. Seed only examples/ + roles/ + roster.schema.json into fleet/; add fleet/roster.yaml (+ any fleet/*.yaml not shipped by the framework, and fleet/run/) to PRESERVE_PATHS / treat fleet/ as user-data merge, not replace. Add a test that a roster.yaml survives a keep-mode sync.

Secondary: sync-only updates the framework systemd unit copy (/.config/mosaic/systemd/user/) but does NOT re-install it into the systemd-active dir (/.config/systemd/user/), so unit fixes (e.g. #627) don't take effect until manually copied. Re-seed should also refresh the active units (or symlink).

DISCOVERED LIVE 2026-06-22 (recovered by reconstruction). The installer PRESERVE list does not include fleet/ user-data. A sync-only re-seed — which `mosaic update` runs AUTOMATICALLY (#610) — replaces ~/.config/mosaic/fleet/ wholesale with the framework version (README + examples/ + roles/ + roster.schema.json + run/), DESTROYING the user's live roster.yaml AND any backups stored under fleet/. Impact: ANY user who runs `mosaic update` loses their entire fleet roster. High severity (data-loss in the routine update path). Repro: create ~/.config/mosaic/fleet/roster.yaml, run `MOSAIC_SYNC_ONLY=1 MOSAIC_INSTALL_MODE=keep bash framework/install.sh` (or `mosaic update`) -> roster.yaml is gone. Fix: the framework must NEVER overwrite user-authored fleet files. Seed only examples/ + roles/ + roster.schema.json into fleet/; add fleet/roster.yaml (+ any fleet/*.yaml not shipped by the framework, and fleet/run/) to PRESERVE_PATHS / treat fleet/ as user-data merge, not replace. Add a test that a roster.yaml survives a keep-mode sync. Secondary: sync-only updates the framework systemd unit copy (~/.config/mosaic/systemd/user/) but does NOT re-install it into the systemd-active dir (~/.config/systemd/user/), so unit fixes (e.g. #627) don't take effect until manually copied. Re-seed should also refresh the active units (or symlink).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#631