migrate_node_to_cinc: don't let needrestart hang the migration #719

Merged
greg merged 1 commits from fix/migrate-cinc-noninteractive into master 2026-12-04 13:23:44 +00:00
+6
View File
@@ -42,6 +42,12 @@ remote="$(mktemp)"; trap 'rm -f "$remote"' EXIT
cat >"$remote" <<EOF
set -euo pipefail
# No TTY over this SSH connection: keep package tooling from prompting.
# needrestart's apt hook would otherwise run interactively (via debconf)
# after installing/removing packages and hang.
export DEBIAN_FRONTEND=noninteractive
export NEEDRESTART_SUSPEND=1
# 1. Cinc Client (Chef -> Cinc migration, or fresh).
# Install the current stable release for this platform. omnitruck resolves the
# right build per OS (so 20.04 and 22.04+ each get their latest supported