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

pgbackrest-toggle-archiving is not idempotent #17

Open
mbanck opened this issue Jul 6, 2020 · 1 comment
Open

pgbackrest-toggle-archiving is not idempotent #17

mbanck opened this issue Jul 6, 2020 · 1 comment

Comments

@mbanck
Copy link
Contributor

mbanck commented Jul 6, 2020

AFAICT, systemctl start pgbackrest-toggle-archiving@<cluster-name> turns archiving on or off, depending on the previous state.

That makes it really difficult to handle with Ansible, as running something like

- name: Enable pgBackrest archiving
  systemd:
    name: pgbackrest-toggle-archiving@{{ postgresql_cluster }}
    state: started

Will turn archiving on or off for each run, making the Ansible runs non-idempotent.

Is there a way to circumvent that? Conceptually, running systemctl enable/disable pgbackrest-archiving@<cluster-name> would be the best from a UX perspective, but systemd won't invoke the /usr/share/elephant-shed/pgbackrest-toggle-archiving script in this case but bail out.

@mbanck
Copy link
Contributor Author

mbanck commented Feb 27, 2024

This has been partially addressed by also providing a es_ctlcluster <cluster> enable-backup feature, which makes sure that archiving is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant