do not offer the ballast on a dev machine, and route its alerts through one place
Servers only now. On a machine you sit at, a filling disk announces itself — the editor refuses to save, the browser complains — and you are there to deal with it. The reserve is for the box nobody is watching, where the first sign is a service that stopped working hours ago. Skipped rather than asked, but said out loud with the reason and recorded in the summary. A section that silently produces no output is indistinguishable from one that failed. The cron this section installs was already there and is unchanged: /etc/cron.d runs the checker as root every ten minutes, and it deletes the ballast when free space falls under the threshold. What changed is where its message goes. Both alerts now run through one notify() inside the generated checker rather than calling logger directly, so there is a single place to add a second channel. Today it is still syslog only — the message lands in the journal and nowhere else, so nobody learns about it until they go looking, which is precisely the wrong moment. Push, mail or Officer's own notify sidecar hook in there. It also echoes to stderr now, so running the checker by hand shows the message instead of appearing to do nothing. Verified: dev reports not-applicable and asks nothing, vps still asks and records a refusal, and the regenerated checker parses and reports status. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -427,7 +427,19 @@ fi
|
||||
# recommendation points.
|
||||
|
||||
step "Emergency disk ballast"
|
||||
if ! skip; then
|
||||
# Servers only. On a machine you sit at, the disk filling up announces itself —
|
||||
# the editor refuses to save, the browser complains — and you are there to deal
|
||||
# with it. The reserve is for the box nobody is watching, where the first sign is
|
||||
# a service that stopped working hours ago. Skipped rather than offered, but said
|
||||
# out loud, so a silent gap in the run is never left unexplained.
|
||||
if ! skip && ! is_server; then
|
||||
echo ""
|
||||
info "Emergency disk ballast — not offered on a ${MACHINE_ROLE} machine"
|
||||
echo " The reserve is for a box nobody is watching. You are sitting at"
|
||||
echo " this one, so a filling disk tells you itself."
|
||||
SUMMARY+=("Disk ballast: not applicable on ${MACHINE_ROLE}")
|
||||
step_ok
|
||||
elif ! skip; then
|
||||
echo ""
|
||||
info "Emergency disk ballast — a reserve you can burn when the disk fills up"
|
||||
echo " A file holding nothing, whose only job is to be deleted. A root cron"
|
||||
@@ -438,11 +450,6 @@ if ! skip; then
|
||||
echo " own."
|
||||
echo ""
|
||||
echo " It is a one-shot valve: once spent, run this again to recreate it."
|
||||
if is_server; then
|
||||
echo " Worth having on ${MACHINE_ROLE} — a full disk on an unattended box is the bad case."
|
||||
else
|
||||
echo " Less useful on ${MACHINE_ROLE} — you are sitting at this machine and will notice."
|
||||
fi
|
||||
|
||||
if [[ -f "${USER_HOME}/${BALLAST_NAME}" ]]; then BALLAST_FILE="${USER_HOME}/${BALLAST_NAME}"; fi
|
||||
[[ -f "${OFFICER_ROOT}/${BALLAST_NAME}" ]] && BALLAST_FILE="${OFFICER_ROOT}/${BALLAST_NAME}"
|
||||
|
||||
Reference in New Issue
Block a user