feat: validate Linux enrollment fixture prerequisites before persisting retry-safe node identity in the join checker

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Matthew Meszaros
2026-10-10 08:08:02 +00:00
co-authored by Devin AI
parent a9d1865a69
commit e9a819e552
+6
View File
@@ -224,6 +224,12 @@ printf '%s\n' "$local_body" | awk '
|| fail "ensure_local_env must test for an existing file before writing one, or a re-join truncates the operator's file"
ok "an existing local override file is never truncated"
if ! command -v flock >/dev/null 2>&1; then
fail "enrollment fixture requires util-linux flock"
fi
[ -r /proc/sys/kernel/random/uuid ] \
|| fail "enrollment fixture requires /proc/sys/kernel/random/uuid"
join_fixture=$(mktemp -d)
trap 'rm -rf "$join_fixture"' EXIT HUP INT TERM
sed '$d' "$SCRIPT" > "$join_fixture/functions.sh"