Files
esh-pfi-infrastructure/playbooks/fv-ml1-pool-health.yaml
T
vh 87d7555fcf fv-ml1: the playbook + homepage body edits the rename commit missed
A zsh glob failure in the staging step of 91bda3c meant the five renamed
playbooks went in as pure renames with their bodies still saying ana-ml2 and
10.250.50.54, and the homepage docker.yaml direct-connection edit from 17586ab
did not stage either. Same content, just the half that got dropped.
2026-09-12 22:04:20 -07:00

45 lines
1.6 KiB
YAML

# fv-ml1 pool-health actions (operator-approved 2026-09-09, "all 3 on clean context").
#
# 1. kick a scrub of `tank` (2 CKSUM on nvme7n1 after the 09-05 boot resilver,
# no scrub since 04-12) — polled separately; `zpool clear` only after a
# clean pass, by hand, never in this playbook.
# 2. install nvme-cli so nvme7's SMART counters can be read.
# 3. reclaim zroot (91%): dangling images + build cache ONLY. Never `prune -a`
# here — tagged idle images include rollback seats.
#
# Rerunnable: a second run shows the scrub step skipped (in progress / done
# within the hour is not detected — the guard is "not already scrubbing"),
# nvme-cli ok, prunes ok with 0 B reclaimed.
steps:
- name: Start scrub of tank (skip if one is already running)
shell: zpool scrub tank
sudo: true
when: "! zpool status tank | grep -q 'scrub in progress'"
- name: Install nvme-cli
shell: DEBIAN_FRONTEND=noninteractive apt-get install -y -q nvme-cli
sudo: true
creates: /usr/sbin/nvme
- name: Prune dangling docker images (NOT -a)
shell: docker image prune -f | tail -1
sudo: true
- name: Prune docker build cache
shell: docker builder prune -f | tail -1
sudo: true
verify:
- name: Scrub is in progress or already completed today
shell: "zpool status tank | grep -Eq 'scrub in progress|scrub repaired .* on .*$(date +%b\\ *%e)'"
changed_when: "false"
- name: nvme binary present
shell: test -x /usr/sbin/nvme
changed_when: "false"
- name: zroot usage after prune
shell: df -h / | tail -1
changed_when: "false"