Skip to content
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

WAL archiving disables after leader changes #614

Open
Zvirovyi opened this issue Aug 6, 2024 · 1 comment
Open

WAL archiving disables after leader changes #614

Zvirovyi opened this issue Aug 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Zvirovyi
Copy link
Contributor

Zvirovyi commented Aug 6, 2024

This is the same bug I've encountered in VM version of this charm.

Steps to reproduce

  1. juju deploy s3-integrator and configure it
  2. juju deploy postgresql-k8s --config profile=testing --channel edge --trust -n 4
  3. juju integrate s3-integrator postgresql-k8s
  4. juju ssh --container postgresql postgresql-k8s/0 cat /var/lib/postgresql/data/patroni.yml | grep archive
    For each unit, it will show archive_command: 'pgbackrest --stanza=dev.patroni-postgresql-k8s archive-push %p'
    Screenshot
  5. juju scale-application postgresql-k8s 2 (leader and primary changes)
  6. Wait until cluster stabilizes
  7. Do the step 4, but now see archive_command: /bin/true in the output for each unit
    Screenshot

Expected behavior

Archiving is still enabled after leader changes.

Actual behavior

Archiving is disables after leader changes.

Versions

Operating system: Ubuntu 24.04 LTS

Juju CLI: 3.5.3-genericlinux-amd64

Juju agent: 3.5.3

Charm revision: 347

microk8s: MicroK8s v1.30.1 revision 6843

Log output

Juju debug log: debug-log

Additional context

This is related to the leader change or peer relation changed events, i think, because when i do the same test, but instead of removing 2 units (including leader / primary) i just use curl -X POST -d '{"leader": "postgresql-k8s-0", "candidate": "postgresql-k8s-1"}' -H "Content-Type: application/json" http://localhost:8008/switchover (snippet from the integration tests), all the units remain archiving enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant