-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Self-Hosted Version
24.2.0
CPU Architecture
x86_64
Docker Version
25.0.3
Docker Compose Version
v2.23.3
Steps to Reproduce
Two ways this will not work:
- Use an 'off site' postgres configuring
DATABASES
insentry.conf.py
- Use different user then
postgres
in postgres (also viasentry.conf.py
andPOSTGRES_USER
env)
For the 'off site postgres' you could argue it's not a 'supported feature'; but without recent changes it worked fine.
To limit resource usage we also disabled the postgres service by using a docker-compose.override.yml
:
services:
postgres:
restart: ''
image: alpine
command: sh -c "while true; do sleep 60; done"
entrypoint: []
healthcheck:
test: 'echo "Running"'
start_period: 0s
In sentry.conf.py
:
DATABASES = {
"default": {
"ENGINE": "sentry.db.postgres",
"NAME": "sentry",
"USER": "sentry",
"PASSWORD": "superseret",
"HOST": "somehost.ofours.com",
"PORT": "1337",
}
}
install.sh
wlll fail because it cannot exe into the postgres service here;
self-hosted/install/set-up-and-migrate-database.sh
Lines 11 to 12 in 8d2da22
$dc exec postgres psql -qAt -U postgres -c "ALTER TABLE IF EXISTS sentry_groupedmessage DROP CONSTRAINT IF EXISTS sentry_groupedmessage_project_id_id_515aaa7e_uniq;" | |
$dc exec postgres psql -qAt -U postgres -c "DROP INDEX IF EXISTS sentry_groupedmessage_project_id_id_515aaa7e_uniq;" |
Expected Result
- Using Django to execute database changes
- Not using 'hard coded' exec like this.
I understand this is due to a Django bug and is (being?) fixed. So I wonder if recent changes in install/set-up-and-migrate-database.sh
are still needed.
Actual Result
▶ Setting up / migrating database ...
Container sentry-self-hosted-postgres-1 Creating
Container sentry-self-hosted-postgres-1 Created
Container sentry-self-hosted-postgres-1 Starting
Container sentry-self-hosted-postgres-1 Started
Waiting for postgres server, 5 remaining attempts...
Waiting for postgres server, 4 remaining attempts...
Waiting for postgres server, 3 remaining attempts...
Waiting for postgres server, 2 remaining attempts...
Waiting for postgres server, 1 remaining attempts...
OCI runtime exec failed: exec failed: unable to start container process: exec: "psql": executable file not found in $PATH: unknown
Error in install/set-up-and-migrate-database.sh:11.
'$dc exec postgres psql -qAt -U postgres -c "ALTER TABLE IF EXISTS sentry_groupedmessage DROP CONSTRAINT IF EXISTS sentry_groupedmessage_project_id_id_515aaa7e_uniq;"' exited with status 126
-> ./install.sh:main:35
--> install/set-up-and-migrate-database.sh:source:11
Event ID
No response
roockBYK
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
No status
Status
No status