-
Notifications
You must be signed in to change notification settings - Fork 23
[MISC] Set Pgbackrest spool dir to archive mount #1025
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
base: 16/edge
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 16/edge #1025 +/- ##
===========================================
+ Coverage 72.33% 72.35% +0.01%
===========================================
Files 14 14
Lines 3680 3682 +2
Branches 524 524
===========================================
+ Hits 2662 2664 +2
Misses 821 821
Partials 197 197 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -1813,7 +1813,8 @@ def test_render_pgbackrest_conf_file(harness, tls_ca_chain_filename): | |||
storage_path=harness.charm._storage_path, | |||
user="backup", | |||
retention_full=30, | |||
process_max=max(cpu_count() - 2, 1), | |||
process_max=2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why hardcoded 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be getting the number of available cores from get_available_resources()
in case of fractional limits and the output of it is patched above.
@@ -1184,6 +1185,7 @@ def _render_pgbackrest_conf_file(self) -> bool: | |||
# Open the template pgbackrest.conf file. | |||
with open("templates/pgbackrest.conf.j2") as file: | |||
template = Template(file.read()) | |||
cpu_count, _ = self.charm.get_available_resources() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get CPU from the helper to manage fractional limits.
Please excuse me, I was wrong, we need put spool dir to the same volume as WAL dir, but not inside WAL dir. |
Set spool path in Pgbackrest config to use the archive volume when restoring
Checklist