fix(ansible): move pgBackRest spool-path off the 10GB root volume#2312
Draft
hunleyd wants to merge 2 commits into
Draft
Conversation
spool-path was never set explicitly, so pgBackRest defaulted to /var/spool/pgbackrest, which lands on the AMI's root volume (10GB, shared with the OS/systemd/journal) rather than the /data EBS volume PGDATA lives on. archive-get's async replica-catch-up queue can hold several 16MB+ WAL segments at once; once archive-async is enabled fleet-wide (INDATA-996) that risks filling the root volume and taking the instance down. Points spool-path at /data/pgbackrest_spool instead, and updates the directory-creation task to match. Global option, set once at provisioning — no supabase-admin-agent changes needed.
…est.yml The pgbackrest spool directory path is now split across two files (pgbackrest.conf's spool-path and this task's dir-creation loop); add a why-comment so a future edit to one doesn't silently drift from the other.
|
Found 1 test failure on Blacksmith runners: Failure
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spool-path(used by asyncarchive-push/archive-getto queue transient data) was never set explicitly, so it defaulted to/var/spool/pgbackrest— which sits on the AMI's 10GB root volume, not/data(the dedicated EBS data volume PGDATA lives on).spool-path = /data/pgbackrest_spoolin the ansible-managed[global]pgbackrest.conf, and updates the directory-creation task to create that path instead./datais the volume that survives pause/restore, pg_upgrade, resize-compute, and restore-to-new-project — any event that can throw away the existing EC2 instance and its root volume. The root volume does not survive those events, so anything written there is lost/reset along with it.[global]-scope pgBackRest option, set once at provisioning — nosupabase-admin-agentchanges needed. Split out of feat(sudoers): let supabase-admin-agent invoke pgbackrest reconcile as root #2291 (sudoers grant forpgbackrest reconcile) since the two are unrelated concerns: one is a privilege-escalation grant, this one is a storage-location fix, and neither depends on the other.Why this is safe
archive-asyncfleet-wide,archive-get's replica-catch-up queue can hold several 16MB+ WAL segments at once — on the 10GB root volume (which also holds the OS/systemd/journal) that risks filling it and taking the instance down.spool-pathcontents aren't durable state —archive-pushrechecks each WAL segment against the repo andarchive-getrebuilds its queue on loss. No migration needed, and pgBackRest isn't fleet-deployed yet (still "Wire up the deployment" milestone).pgbackrest:postgres) already applied to every other entry in the same directory-creation loop.Test plan
ansible-playbook --syntax-checkon the full playbook — clean/data/pgbackrest_spoolexists withpgbackrest:postgresownership after provisioning, andarchive-get/archive-pushoperate against itResolves INDATA-1038