Skip to content

fix(install): create the PostgreSQL volume without --name - #4613

Merged
aldy505 merged 2 commits into
getsentry:masterfrom
pcbeingused333:fix/upgrade-postgres-volume-create-podman
Nov 6, 2026
Merged

aldy505 merged 2 commits into
getsentry:masterfrom
pcbeingused333:fix/upgrade-postgres-volume-create-podman

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Fixes #4567

install/upgrade-postgres.sh creates the replacement volume with volume create --name sentry-postgres in both the 9.6 → 14 and 14 → 18 branches. Podman's volume create has no --name flag (the name is positional), so on Podman the command exits 125 right after volume rm sentry-postgres, leaving the upgraded data only in sentry-postgres-new.

This switches both places to the positional form volume create sentry-postgres, which Docker and Podman both accept.

A new _unit-test/upgrade-postgres-volume-create-test.sh stubs the container engine so that volume create --name fails the way Podman does, runs the 14 → 18 branch and asserts the positional form is used. It fails on master (exit 125) and passes with the change.

This change was prepared with help from an AI coding assistant (Claude Code).

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Podman's `volume create` takes the name as a positional argument and has no
--name flag, so the volume swap in upgrade-postgres.sh aborted with exit 125
after the old sentry-postgres volume was already removed. Docker accepts the
positional form too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@aminvakil aminvakil left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this for podman environments, please remove the unit test, it's unnecessary.

@aldy505
aldy505 merged commit 22b9612 into getsentry:master Nov 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

upgrade-postgres.sh: 'volume create --name' fails on Podman after the old sentry-postgres volume was already removed (14 → 18 upgrade)

3 participants