contrib-helm-chart
contrib-helm-chart copied to clipboard
Upgrade PostgreSQL chart version
When deploying Redash using default configuration I get the following log and Postgres errors and does not start. The recommendation here is to upgrade Postgres version. Has anyone seen this issue? Is there a workaround? Does something need fixing?
postgresql 06:30:20.13
postgresql 06:30:20.13 Welcome to the Bitnami postgresql container
postgresql 06:30:20.13 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-postgresql
postgresql 06:30:20.13 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-postgresql/issues
postgresql 06:30:20.13 Send us your feedback at [email protected]
postgresql 06:30:20.13
postgresql 06:30:20.14 INFO ==> ** Starting PostgreSQL setup **
postgresql 06:30:20.19 INFO ==> Validating settings in POSTGRESQL_* env vars..
postgresql 06:30:20.19 INFO ==> Loading custom pre-init scripts...
postgresql 06:30:20.20 INFO ==> Initializing PostgreSQL database...
postgresql 06:30:20.20 INFO ==> postgresql.conf file not detected. Generating it...
postgresql 06:30:20.21 INFO ==> pg_hba.conf file not detected. Generating it...
postgresql 06:30:20.21 INFO ==> Generating local authentication configuration
postgresql 06:30:20.22 INFO ==> Deploying PostgreSQL with persisted data...
postgresql 06:30:20.22 INFO ==> Configuring replication parameters
postgresql 06:30:20.24 INFO ==> Configuring fsync
postgresql 06:30:20.25 INFO ==> Loading custom scripts...
postgresql 06:30:20.25 INFO ==> Enabling remote connections
postgresql 06:30:20.26 INFO ==> Stopping PostgreSQL...
postgresql 06:30:20.26 INFO ==> ** PostgreSQL setup finished! **
postgresql 06:30:20.31 INFO ==> ** Starting PostgreSQL **
FATAL: data directory "/bitnami/postgresql/data" has group or world access
DETAIL: Permissions should be u=rwx (0700).
Please see #46
@grugnog The thread linked above offers two solutions:
- Disable persistence (doesn't work for a production environment)
- Set postgressql volumnePermissions to true:
postgresql:
postgresqlPassword: pEeB5yQI63tlOr3SEu5Ba3rFjbVqcrlMcfC2kNLK
volumePermissions:
enabled: true
which results in:
FATAL: "/bitnami/postgresql/data" is not a valid data directory
DETAIL: File "/bitnami/postgresql/data/PG_VERSION" does not contain valid data.
HINT: You might need to initdb.
The only thing I have found so far that works is updating the Postgres image version:
postgresql:
image:
tag: "14.4.0-debian-11-r13"
Relatedly there is an additional problem: the requirements.lock file refers to a bitnami chart that is no longer available. See here: https://github.com/bitnami/charts/issues/10539 One way to resolve this would be to upgrade Postgres. The workaround for now is:
I had to update the requirements.lock to:
dependencies:
- name: redis
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
version: 10.9.0
- name: postgresql
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
version: 8.10.14
digest: sha256:23af5a9e93d3bc31eaf566828e8547ab666603ce1a15a4488cddd1355e71e707
generated: "2020-09-30T18:46:10.906371529-07:00"
@georgewfisher thanks for looking into this, much appreciated. I would rather not override the image version in the chart defaults (since charts often make assumptions about the version they are running with), but I think it would be reasonable to upgrade the chart versions.
We would need to take this 1 major version at a time (perhaps Redis also, if needed) to give users time to test the upgrade path (the 8->9 upgrade notes for the PostgreSQL chart suggest manually deleting the statefulset may be needed, for instance). It looks like we would need to move to the archive-full-index until we are caught up with versions in the production index also.
@arikfr I wonder if it would be a good idea to start updating the postgresql image versions listed in the main repo and the setup repos? The current versions listed - 9.5 and 9.6 are now out of support status now, so it would be good to test with newer versions if possible.
This would be greatly appreciated, any word on this?
Oh, that's interesting. I'm looking at the PostgreSQL upgrade piece, and likely to get it done some time this week.
My plan so far has been to just upgrade our PostgreSQL to version 15.3, as that's the latest PostgreSQL release, so would give us the longest time span until it hits End-of-Life itself.
But, I'm not wedded to that version by any means.
Being that I don't personally use Helm at all, what should I be taking into account with updating PostgreSQL so it doesn't go badly for yourselves?
upgraded dependency charts in #162 will be available in a next release