--persistent ownership check runs after the host is already mutated #3
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
carvers/silta#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
--persistentroot-ownership check runs last, after the interface, addresses, and /etc/hosts block are already created (src/setup.rs:227 onward). A refusal leaves setup half-applied, and a corrected re-run is rejected because the interface now exists.Failure scenario: user runs
sudo silta setup --persistentwith the binary still in target/release. The interface is created, addresses added, and /etc/hosts written, theninstall_daemonbails on the ownership check and the command exits nonzero. After installing the binary to /usr/local/bin and re-running,apply_setupbails with "feth99 already exists. run silta teardown first", forcing a teardown (killing any live forwards) and a second setup just to add the daemon.Fix direction: validate the persistence preconditions (binary/config ownership) before mutating any host state.
Source: high-effort code review, CONFIRMED. Area: setup.