pgbadger does not work after failover
I'm submitting a ...
- [x ] bug report
- [ ] feature request
- [ ] support request
Do you want to request a feature or report a bug? Bug report
What is the current behavior? After failover, I cannot get pgbadger reports from the new primary.
If the current behavior is a bug, please provide the steps to reproduce: create a cluster using operator 3.2 with pgbadger enabled. Create a route for badger service. visiting route url/api/badgergenerate generated the report. Scale the cluster and perform a failover, After this, pgbadger route stopped working.
This is the error message i get. 502 Bad Gateway The server returned an invalid or incomplete response.
What is the expected behavior? See pgbadger report
What is the motivation or use case for changing the behavior?
Other information (e.g. detailed explanation, related issues, suggestions how to fix, etc) pgbadger container keeps restarting if i try to generate report after failover. Before failover, I did not see this issue.
Please tell us about your environment:
- Operating System: centos7
- Container Image Tag: 10.5-2.1.0
- Operator Version: 3.2.0
- PostgreSQL Version: 10.5
- Platform (Docker, Kubernetes, OpenShift): openshift
- Platform Version: 3.9.x
Additional information: After failover, visiting the pgbadger URL (IP:10000/api/badgergenerate) is causing the pod to restart. There are no log messages from badger container.
this appears to be fixed with the latest code (>= 3.3.0)
I think this bug should be re-opened. It seems that pgbadger on replicas is targeting the primary's pgdata directory and this bug is still present. I have a proposed patch for the 3.x line. I also believe this same issue is affecting collect, but I have not patched that. Please see #803 .