-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postgres STS fails to start - mkdir: cannot create directory ‘/bitnami/postgresql/data’ #522
Comments
Did you ever create PVC to interact with Postgres manually? This may cause different file permission since your reclaim policy of storage class is If the data is only for test, try:
|
I have tried the above but the same issue occurs. I am happy to use the fix i did as per my issue., I wanted to raise it as a potential issue others using Tekton Results may run into. |
I'm a little curious what's the environment difference make you encounter this problem.
It would be weird If the directory belongs to root. The deployment configuration never uses root privilege. Then could be ebs default file permission. Another approach would be modifying StorageClass mountOptions:
|
Looks like root ownership is correct and is the root cause of the issue:
I guess that is how ebs volumes are permissioned by default. Is that something you want to cater for in your default release manifest? Whilst I probably wont be using the postgres created via the Results release manifest, for users that want to try Results, it may be worthwhile putting something in to handle this permission issue incase? Either way, happy to close the issue from my side if there is not something further you want me test. |
The default Results release does require right file permissions in volume implicitly.
Yes, agreed with you. Especially for users want to try out in environment provided by cloud providers, the default file permission strategy varies depending on which storage they use. It would be appreciated if you could make a PR for it, document this potential permission issue and handle the permission (of course you cloud let me do it if you don't want to). We could close this issue after merging that PR. |
I am not going to be around until next Wednesday so happy for you to do the PR. To add, once you mentioned that the postgres is running as user 1001, I realised I could just set |
Ok let me do it. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
The same happens for the logs PV:
|
Can we get this implemented, please? |
Expected Behavior
Postgres created as part of the release manifests would start up successfully.
Actual Behavior
The postgres pod does not become healthy. The pod fails and enters crashloopbackoff with the following error in the logs:
This appears similar to this issue: bitnami/charts#1210
Investigating the recommendation here i added an init container that looks as follows which resolves the issue:
I took the above from the output of running the below (with slight modifications):
Note that I am using EKS with ebs volumes and a storage class as below if useful:
Steps to Reproduce the Problem
Additional Info
Kubernetes version:
Output of
kubectl version
:The text was updated successfully, but these errors were encountered: