From d146f1ccd795215ff4a4b1a46c7f67924ddcbbd6 Mon Sep 17 00:00:00 2001 From: Minseong Choi Date: Mon, 20 Jul 2026 18:30:19 +0900 Subject: [PATCH] fix(bootstrap): keep the install alive on a host with only felis-api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit restart_existing_control_plane ended in an and-list per deployment: [ "$had_api" = "1" ] && kube ... rollout restart deployment/felis-api [ "$had_operator" = "1" ] && kube ... rollout restart deployment/felis-operator As the LAST command of a function, an and-list whose test is false returns 1, and that becomes the function's exit status. The call site is bare, so under `set -Eeuo pipefail` the installer dies there — after the bundle has been applied and before the rollout wait, leaving a half-finished upgrade and no message naming the cause. It fires on any host carrying one control-plane deployment but not the other: felis-api present without felis-operator restarts the api, then exits 1 on the second test. Both present, or neither, happened to work, which is why it survived. Rewritten as explicit `if` statements, which return 0 when the test is false. Verified out of tree against all four had_api/had_operator combinations. --- deploy/bootstrap.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy/bootstrap.sh b/deploy/bootstrap.sh index 8d76eac..083de90 100644 --- a/deploy/bootstrap.sh +++ b/deploy/bootstrap.sh @@ -1425,8 +1425,12 @@ restart_existing_control_plane() { [ "$had_api$had_operator" != "00" ] || return 0 log "restarting existing control-plane deployments to pick up ${FELIS_IMAGE}" - [ "$had_api" = "1" ] && kube -n "$CONTROL_NS" rollout restart deployment/felis-api - [ "$had_operator" = "1" ] && kube -n "$CONTROL_NS" rollout restart deployment/felis-operator + # `if`, not `[ test ] && cmd`: as the LAST command of the function the and-list returns 1 + # when the test is false, which becomes the function's exit status and kills the whole + # install under `set -Eeuo pipefail` — right after the bundle is applied and before the + # rollout wait. Fires on any host carrying felis-api without felis-operator. + if [ "$had_api" = "1" ]; then kube -n "$CONTROL_NS" rollout restart deployment/felis-api; fi + if [ "$had_operator" = "1" ]; then kube -n "$CONTROL_NS" rollout restart deployment/felis-operator; fi } # The login/lobby images use local mutable tags. Importing a replacement updates