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

Allow create-backup on non-primary even when no TLS configured #716

Open
hloeung opened this issue Jan 9, 2025 · 2 comments
Open

Allow create-backup on non-primary even when no TLS configured #716

hloeung opened this issue Jan 9, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@hloeung
Copy link
Contributor

hloeung commented Jan 9, 2025

Steps to reproduce

  1. juju deploy postgresql --channel 14/stable
  2. juju add-unit postgresql -n 2
  3. `juju run $(juju status postgresql | grep '^postgresql/' | grep -v 'Primary' | head -n1 | awk '{ print $1 }' | cut -d'*' -f1) create-backup

Expected behavior

Backup successfully runs

Actual behavior

Action id 68 failed: Unit cannot perform backups as TLS is not enabled

Versions

Operating system: Ubuntu

Juju CLI: 3.6.1-ubuntu-amd64

Juju agent: 3.6.1

Charm revision: 468

Additional context

Per the docs - https://charmhub.io/postgresql/docs/h-create-backup

Tip: To avoid unnecessary service downtime, always use non-primary units for the action create-backup

However:

Keep in mind that:

When TLS is enabled, create-backup can only run on replicas (non-primary)
When TLS is not enabled, create-backup can only run in the primary unit

Why is it that when TLS is not enabled, we can't trigger the backups on the non-primary unit? This limitation means we can't try to avoid unnecessary service downtime by running backups on the non-primary per the Tip.

@hloeung hloeung added the bug Something isn't working label Jan 9, 2025
Copy link

Thank you for reporting your feedback to us!

The internal ticket has been created: https://warthogs.atlassian.net/browse/DPE-6291.

This message was autogenerated

@hloeung
Copy link
Contributor Author

hloeung commented Jan 13, 2025

This will let us have a more consistent backup story where with our various Discourse deployments, they're only consumed and used by units within the same Juju model so TLS is not enabled. Whereas with other places where we offer the database for consumption via cross-model relations and from other Juju models, TLS is 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