feat: alert on Sia hostd usage instead of df for /mnt/sia #34

Merged
jared merged 2 commits from feat/lxc-managed-volume-usage into main 2026-11-06 13:03:03 -05:00
2 Commits
Author SHA1 Message Date
jaredandClaude Opus 5.5 99d4350f4d fix: filter hostd volumes in Python to avoid building SQL from a string
Lint / Python (flake8) (push) Successful in 1m35s
Lint / Notify on failure (push) Skipped
Lint / Python (flake8) (pull_request) Successful in 1m30s
Lint / Notify on failure (pull_request) Skipped
Security / Python Security (bandit) (push) Successful in 1m33s
Test / Python Tests (pytest) (push) Successful in 1m46s
Security / Python Security (bandit) (pull_request) Successful in 1m9s
Test / Python Tests (pytest) (pull_request) Successful in 1m16s
Bandit 1.9.4 in CI flagged the query (B608). Select every volume with a
static query and match the mountpoint in Python instead. Also stops a
mount like /mnt/sia-other from matching /mnt/sia.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 12:57:52 -05:00
jaredandClaude Opus 5.5 d8f707ade7 feat: alert on Sia hostd usage instead of df for /mnt/sia
Lint / Python (flake8) (push) Successful in 2m6s
Lint / Notify on failure (push) Skipped
Security / Python Security (bandit) (push) Failing after 2m8s
Lint / Python (flake8) (pull_request) Successful in 1m22s
Lint / Notify on failure (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Failing after 1m24s
Test / Python Tests (pytest) (pull_request) Successful in 1m21s
Test / Python Tests (pytest) (push) Successful in 1m19s
hostd allocates its whole data.dat over time and then reuses freed slots,
so df on the mount is expected to read nearly full and says nothing about
real usage. Alert on hostd's used/total sectors for mounts listed in
LXC_MANAGED_VOLUMES, and keep a critical free-space floor for a real
out-of-space risk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 12:36:22 -05:00