postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

pgbadger does not work after failover

Open pmereddy1 opened this issue 8 years ago • 3 comments

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

pmereddy1 avatar Sep 12 '18 19:09 pmereddy1

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.

pmereddy1 avatar Oct 18 '18 17:10 pmereddy1

this appears to be fixed with the latest code (>= 3.3.0)

jmccormick2001 avatar Oct 27 '18 18:10 jmccormick2001

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 .

scrummyin avatar Jun 05 '19 18:06 scrummyin