Public: anyone can read this; the crew can change it.

Sentinel: disk-red was degraded 83 minutes today: The check machine's disk was full when 5 checks failed: 9% free, under the 10% floor — the machine's red, not the pulls… #6946

opened this

Merged 39d 2h ago, live in production

This change only partly addresses the issue: it frees checkout space before a check runs on a full disk. I haven't found what filled the disk, so I can't say it would have prevented the 83 minutes. The new test and the type check pass.

Notes

opened this

This change only partly addresses the issue: it frees checkout space before a check runs on a full disk. I haven't found what filled the disk, so I can't say it would have prevented the 83 minutes. The new test and the type check pass. I did not run the full suite.

What changed: The disk-red card means the check machine had under 10% free disk while checks were failing. Checkouts left behind by a crash were only cleaned up when the forge booted, so they could sit on a full disk for hours.

The new reclaimIfFull in src/checks/service.ts runs just before each check's checkout. If free disk is under the floor, it runs the existing sweepCheckouts and logs "disk under its free floor: swept unused checkouts" to the check's log. Checkouts with a live run are left alone.

Test: test/checks-disk-red.test.ts checks that an unowned checkout is removed under the floor and kept above it.

What I left out:

  • I didn't find what else filled the disk (check cache, looks, snapshots), so I left those alone.
  • The card still shows for as long as the disk is under 10% and a failed check from the last hour exists.
  • If the next disk-red still lasts, the cause is probably something other than leaked checkouts. Check /settings/capacity for what is large.

To try it: bun test test/checks-disk-red.test.ts.

Closes #6945

commented

This change only partly addresses the issue: it frees checkout space before a check runs on a full disk. I haven't found what filled the disk, so I can't say it would have prevented the 83 minutes. The new test and the type check pass. I did not run the full suite.

What changed: The disk-red card means the check machine had under 10% free disk while checks were failing. Checkouts left behind by a crash were only cleaned up when the forge booted, so they could sit on a full disk for hours.

The new reclaimIfFull in src/checks/service.ts runs just before each check's checkout. If free disk is under the floor, it runs the existing sweepCheckouts and logs "disk under its free floor: swept unused checkouts" to the check's log. Checkouts with a live run are left alone.

Test: test/checks-disk-red.test.ts checks that an unowned checkout is removed under the floor and kept above it.

What I left out:

  • I didn't find what else filled the disk (check cache, looks, snapshots), so I left those alone.
  • The card still shows for as long as the disk is under 10% and a failed check from the last hour exists.
  • If the next disk-red still lasts, the cause is probably something other than leaked checkouts. Check /settings/capacity for what is large.

To try it: bun test test/checks-disk-red.test.ts.

commented

A check that starts while the machine's disk is under its 10% free floor now first deletes the checkouts no running check owns. This only partly addresses #6945, because I never found what filled the disk. The new service test, the existing disk-red tests and tsc pass; I did not run the full suite.

What changed

  • reclaimIfFull in src/checks/service.ts runs just before a check's checkout. Under the floor it runs the existing sweepCheckouts and logs "disk under its free floor: swept unused checkouts" to the check's log.
  • A checkout whose run is running with a fresh lease is left alone.

Review feedback addressed

  • Wiring test: test/check-reclaim-full-disk.test.ts runs a real check through the service with the disk reading under the floor. An orphan directory and a live running run's checkout sit in checks/. It asserts the orphan is gone, the live one survives, and the log line is present. With the call disabled it fails, so it covers the wiring.
  • Cleanup: the unit test in test/checks-disk-red.test.ts now removes its temp directory in finally.
  • Follow-up: #6947 asks what actually fills the disk: check-cache, install caches, looks, run logs and snapshots. This pull should not close #6945 as solved. Leave #6945 open until #6947 lands, or until disk-red stays out of the degraded list for a day.

Not done: I did not trim any cache or other store; that is for #6947.

To try it: bun test test/check-reclaim-full-disk.test.ts test/checks-disk-red.test.ts.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs