bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.04k stars 9.22k forks source link

[bitnami/postgresql] crashlooping #30441

Open rwlove opened 1 week ago

rwlove commented 1 week ago

Name and Version

bitnami/postgresql:16.0.0

What architecture are you using?

amd64

What steps will reproduce the bug?

I am using the Postgresql chart from within the immich chart.

I am using the following configuration in my values file and my pod is repeatedly CrashLoopBackOff. I am seeing a chmod: changing permissions of '/var/run/postgresql': Operation not permitted and FATAL: could not write lock file "postmaster.pid": No space left on device in the container logs, as shown below.

    postgresql:
      enabled: true
      primary:
         containerSecurityContext:
           readOnlyRootFilesystem: false

What do you see instead?

$ home-ops git:(main) ✗ kubectl -n media logs immich-postgresql-0 -f
Defaulted container "postgresql" out of: postgresql, volume-exposer-ephemeral-y20js (ephem)
chmod: changing permissions of '/var/run/postgresql': Operation not permitted

PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-11-13 13:38:10.680 UTC [1] FATAL:  could not write lock file "postmaster.pid": No space left on device
$ home-ops git:(main) ✗ kubectl -n media logs immich-postgresql-0 -c volume-exposer-ephemeral-y20js
Running as ephemeral
Agent pid 8
Server listening on 0.0.0.0 port 2137.
Server listening on :: port 2137.
Identity added: /dev/fd/63 (/dev/fd/63)
Warning: Permanently added '[10.42.9.117]:6666' (ED25519) to the list of known hosts.

Additional information

I initially filed a defect against the immich charts, but I think my problem is with the Postgresql chart.

https://github.com/immich-app/immich-charts/issues/144

I'm unsure how to debug further but I'd be happy to do any tests/debug to figure this out if anyone has some suggestions for me.

javsalgar commented 3 days ago

Hi,

Are you able to reproduce the issue using the regular bitnami/postgresql chart? This would help us to understand that, indeed, the issue in on this chart and not in immich-charts

rwlove commented 2 days ago

That is a good idea. I will give it a shot. I might not be able to get to it before the weekend though.