Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/postgresql] data directory "/bitnami/postgresql/data" has invalid permissions #20923

Closed
acim opened this issue Feb 21, 2020 · 9 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@acim
Copy link
Contributor

acim commented Feb 21, 2020

Describe the bug
After upgrade from 8.3.4 to 8.4.0 pod is crashing with message:

postgresql 12:46:44.18 INFO  ==> ** Starting PostgreSQL **
2020-02-21 12:46:44.204 GMT [1] FATAL:  data directory "/bitnami/postgresql/data" has invalid permissions
2020-02-21 12:46:44.204 GMT [1] DETAIL:  Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).

Version of Helm and Kubernetes:

Helm 3.1.1
Kubernetes 1.17.3

Which chart:

stable/postgresql 8.4.0

What happened:

Crash.

What you expected to happen:

Run.

How to reproduce it (as minimally and precisely as possible):

Just upgrade from 8.3.4 to 8.4.0.

Anything else we need to know:

Init container init-chmod-data seems to be removed and it seems it is still needed.

@jim-barber-he
Copy link

I just hit this myself.
The default for volumePermissions.enabled changed from true to false.
Setting it to true should get things going again.

@jim-barber-he
Copy link

It was broken by this change I think.
#20910

@javsalgar
Copy link
Collaborator

Hi,

Good to know that it was just enabling the volumePermissions container. As stated in the PR, this is not compatible with all platforms that's why we're setting it to false by default. Do not hesitate to open a new ticket if you find any other issue.

@acim
Copy link
Contributor Author

acim commented Feb 24, 2020

It worked, but I had to uninstall the chart first and then install again. It seems this init is not executed on each start (I didn't look at the code).

@jim-barber-he
Copy link

FYI, for us, we have a pretty vanilla install of Kubernetes provisioned into an AWS environment using Kops.
I would have thought that would be a reasonably common scenario, so not sure why it broke for us.

@stale
Copy link

stale bot commented Mar 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 26, 2020
@stale
Copy link

stale bot commented Apr 9, 2020

This issue is being automatically closed due to inactivity.

@stale stale bot closed this as completed Apr 9, 2020
@kuisathaverat
Copy link

kuisathaverat commented Oct 14, 2020

it happens from time to time when we run helm upgrade without changes, when it happens we uninstall the helm chart and install it again, it is an old issue thing recurrent and unresolved bitnami/charts#1649 https://github.com/bitnami/bitnami-docker-postgresql/issues/176 #13651 #14538 bitnami/charts#1210

@T1loc
Copy link

T1loc commented Nov 24, 2020

Same here. With this values :

---
image:
  tag: 10.6.0
persistence:
  size: 8Gi
postgresqlPassword: {{ secrets.postgresql.POSTGRES_PASSWORD }}
volumePermissions:
  enabled: true

Running :

kubectl exec -it postgresql-postgresql-0 -- chmod 700 /bitnami/postgresql -R 

As a temporary fix...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

5 participants