Skip to content

Guard nightly sync against disk exhaustion and blocked index writes - #26

Merged
ewlarson merged 1 commit into
developfrom
feature/nightly-disk-preflight
Oct 29, 2026
Merged

ewlarson merged 1 commit into
developfrom
feature/nightly-disk-preflight

Conversation

@ewlarson

Copy link
Copy Markdown
Collaborator

The October 28–29 nightly syncs spent over an hour harvesting before every repository's search synchronization failed. The shared production filesystem reached 98% usage, causing Elasticsearch's flood-stage read-only block even while cluster health remained green. Redis image-cache use remained about 232 MiB; inactive Wherehence development runs and build outputs accumulated on the same disk.

Add a read-only preflight before repository discovery/harvesting. CI streams the checked-out standard-library Python script to the SSH host, so it takes effect without rebuilding the application image. It requires 15% available disk on the host and Elasticsearch filesystems, checks the target index's write/read-only/metadata blocks, and fails closed if Elasticsearch cannot be inspected. It neither removes data nor disables disk protections.

Validation: seven focused regression tests pass, Ruff passes, and deployment invariants pass. A live preflight correctly reports the low disk reserve and read_only_allow_delete block. Operational recovery archives 13 explicitly approved inactive Wherehence run trees to the existing private Storage Box, checks SHA-256 and a full downloaded archive comparison, then removes unchanged local copies. Live databases and application mounts are excluded. Full nightly recovery verification follows disk recovery.

@ewlarson
ewlarson merged commit 22c0daa into develop Oct 29, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant