fix(manage-server): upgrade.sh dies silently under set -e when app container is missing #26
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
primatekuntech/triton-install!26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/upgrade-sh-set-e-missing-app-container"
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?
Sync of triton#986/triton#986 (fixed on the source-of-truth repo first,
per the standing installer-scripts-sync rule in triton's CLAUDE.md).
Summary
DB_STATUS/APP_STATUS=$(container_status ...)are bare commandsubstitutions in a plain assignment, not guarded inside a conditional.
container_status()'s2>/dev/nullonly silencespodman/docker inspect's stderr — it still exits non-zero when the container doesn'texist. Under
set -e, that kills the whole script immediately, silently,before either intended message ever gets a chance to print:
die "... has install.sh been run on this host?"recovery upgrades"
Found live while deploying manage-server/v1.2.0-rc.7 to a staging box: a
transient state where the app container had already been removed left
upgrade.sh --image ...exiting 125 with zero error output, requiring amanual
podman-compose up -d --no-deps manage-serverto recover.Fix
Add
|| trueto both assignments, matching the file's own existingconvention for exactly this failure mode. Bumped
SCRIPT_VERSIONto2026-09-06.1.Test plan
bash -n manage-server/upgrade.sh— syntax OKscripts/deploy/manage-server/upgrade.sh(except this repo's own path)