Skip to content

Commit

Permalink
upgrade-postgresql: Swap order of cleanup steps in trap.
Browse files Browse the repository at this point in the history
We need to remove the container before removing the volume, otherwise
the cleanup will fail because the volume is in use.
  • Loading branch information
alexmv authored and timabbott committed Feb 21, 2023
1 parent accea23 commit 8823d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upgrade-postgresql
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ temp_container=$(
--health-interval 10s \
"zulip/zulip-postgresql:$new_version"
)
trap 'docker volume rm --force "$full_new_volume"; docker rm --force "$temp_container"' EXIT
trap 'docker rm --force "$temp_container"; docker volume rm --force "$full_new_volume"' EXIT

# Wait for the new PostgreSQL container to become available
tries=0
Expand Down

0 comments on commit 8823d78

Please sign in to comment.