-
Notifications
You must be signed in to change notification settings - Fork 600
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
patroni.exceptions.PatroniFatalException: 'Failed to bootstrap cluster' #3039
Comments
related to #3011 |
Hello @soroshsabz, in the linked issue, the user solved the problem by using a different cluster (switching from Talos to k3s). I am also curious what platform you're running on (e.g., AWS, k3s, etc.) and if you've tried another platform? I cannot reproduce this problem on the platforms I use for testing, so I wonder if it's platform dependent. Alternatively, in looking into this problem, I found a similar issue raised with Patroni: patroni/patroni#1393 There a user seems to have solved their error by turning huge_files off (I believe huge_files defaults to "try"); you can change that setting through the spec:
I would be curious to see if that solves the error, especially since I cannot reproduce it. |
@benjaminjb Hi, I do not use any external platform, I create my cluster in on-premise lab Thanks |
@soroshsabz this is due to a known issue in Kubernetes: And as described by @benjaminjb, you should be able to work around this issue by setting spec:
patroni:
dynamicConfiguration:
postgresql:
parameters:
huge_pages: "off" |
As per postgres docs, there should be Anyway, for me setting it to off did not work, neither PGO: 5.2.0 PG: 14.5 Did some investigating and tried to set limits with hugepages for the instance: resources:
limits:
memory: 500Mi
hugepages-2Mi: 500Mi and it seemed to work. In my case, I needed to enable hugepage support on nodes for other software. More info:
Related: |
The workaround to enable hugepages isn't going to work when you are required to disable hugepages. This file needs to change to turn it off. initdb uses that file instead of the standard config file. |
When the system has huge_pages turned on initdb is using the "postgresql.conf.sample" file causing the process to crash in Kubernetes. Turning off huge pages in this file would resolve the issue. Here are some links for further information Crunchydata CrunchyData/postgres-operator#3477 CrunchyData/postgres-operator#3039 CrunchyData/postgres-operator#2258 CrunchyData/postgres-operator#3126 CrunchyData/postgres-operator#3421 Bitnami bitnami/charts#7901
Actually setting what @andrewlecuyer suggested above works without setting |
ITNOA
Overview
I try to create postgresql cluster from your example in https://github.com/CrunchyData/postgres-operator-examples (kustomize/postgres), but after I run it with some modification I see below error
Environment
Please provide the following details:
Kubernetes
1.23.3
registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi8-5.0.4-0
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.5-0
Steps to Reproduce
REPRO
Provide steps to get to the error condition:
kubectl apply -k postgres/
(I write mykustomization.yaml
in end of issue, and I do not edit any things inpostgres.yaml
)kubectl get pods -n pgo
EXPECTED
I expected see three pods with Running in Status
ACTUAL
Logs
Additional Information
My
kustomization.yaml
file is like belowI checked my pvc and I hope all of things is good
The text was updated successfully, but these errors were encountered: