Comments (2)
Hey @mausch, I was able to replicate the issue you are seeing with a full disk. After the disk filled up, Postgres stopped working, but the pod was still ready.
We use the Patroni GET /readiness
endpoint to determine whether the pod is ready or not. If you take a look at the Patroni API docs for that endpoint, it will return 200
when "the Patroni node is running as the leader OR when PostgreSQL is up and running." In a single instance, when the database goes down, there isn't another instance to take leadership if the current leader becomes unhealthy. Like you have found, this gets into a case where the database is inaccessible, but the pods are still ready.
As it stands now, if Patroni thinks that the cluster is ready then the pods will be ready. There is likely some work we could do to augment the Patroni readiness endpoint and I will be happy to get a story in our backlog.
from postgres-operator.
Hi, thanks for looking into this.
Shouldn't the liveness probe (rather than readiness) apply here?
The Patroni docs say:
GET /health: returns HTTP status code 200 only when PostgreSQL is up and running.
GET /liveness: returns HTTP status code 200 if Patroni heartbeat loop is properly running and 503 if the last run was more than ttl seconds ago on the primary or 2*ttl on the replica. Could be used for livenessProbe.
GET /readiness: returns HTTP status code 200 when the Patroni node is running as the leader or when PostgreSQL is up and running. The endpoint could be used for readinessProbe when it is not possible to use Kubernetes endpoints for leader elections (OpenShift).
I don't have a pgo cluster at hand to check but presumably Patroni's /liveness is already mapped to the pod liveness?
from postgres-operator.
Related Issues (20)
- Citus integration guidance HOT 1
- Incorrect regular expression in CRDs for spec.userInterface.pgAdmin.dataVolumeClaimSpec.resources.requests.storageClassName HOT 1
- Getting error ERROR: [078]: unable to remap invalid link 'pg_wal' for standby cluster creation of Postgres HOT 4
- How to collect non postgres database metrics via pgmonitor HOT 4
- Cannot set `use_endpoints: false` for PGO HOT 4
- Allow annotations to be added to services HOT 1
- Unable to get metrics for ccp_backrest_* query HOT 2
- Postgres Cluster (Restore) is able to be created with name that causes pod to have label longer than 63 characters. HOT 4
- pgAdmin4 not working with PG15 and PG16 HOT 5
- Make terms of usage for production more clear HOT 1
- Large memory usage on the replica pod HOT 3
- PGAdmin image upgrade resulted in (13)Permission denied: AH00091: httpd: could not open error log file HOT 2
- PGO upgrade caused PG13 backups to fail HOT 3
- PGUpgrade images & version support HOT 4
- pgbouncer operator setup with external postgresql host HOT 1
- How to set ulimit (stack size) with a larger value HOT 2
- registry.developers.crunchydata.com not availible anymore.. HOT 2
- how to create groups or run SQL files using crunchy postgres operator yaml without deleting the Postgres cluster HOT 1
- Basic Steps/Tutorial On how to use the Operator? HOT 3
- 5.5.1 broken upgrade HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgres-operator.