Linux Labs

SRE practices: SLOs, incidents, redundancy / Stage 5 of 8 · step 5 of 6

Event intake has stalled and restarts are off-limits

medium ~30 min
Not running Starting usually ~20 s
Report a problem

Situation

The lab-ingest service takes events from the shop front-ends — five per second, non-stop. It keeps accepted events in memory and every two seconds saves them as a batch to its volume /srv/ingest (the spool/ directory), and it writes every event to the log /srv/ingest/log/ingest.log.

An alert: curl localhost:8090/healthz answers 503, events no longer reach the disk and pile up in memory. The on-call engineer before you already "cleaned up" the volume, but no space showed up.

Don't restart lab-ingest: the events waiting in memory would be lost on a restart.

Task

  1. The /srv/ingest volume has room again: less than half is used. It is the same volume — don't grow it or swap it.
  2. The service runs as the same process as during the failure.
  3. Event intake is back: new events are accepted (202), the in-memory queue is written to disk.
  4. The service writes its log to /srv/ingest/log/ingest.log, and no deleted but open files remain on the volume.
  5. The log will not eat the volume again: a logrotate rule rotates ingest.log as soon as it is larger than 10 MiB, keeps three archives at most, and after rotation the service writes to the new file without a restart. logrotate runs every hour on this machine.

Constraints

  • Don't restart or stop lab-ingest and lab-clients, and don't change their programs or units.

Some facts are visible only with sudo. There is no internet on the machine.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 5
  • The /srv/ingest volume has room again — less than half is used, the volume is the same — not checked yet
  • The lab-ingest service was not restarted — the same process as during the failure keeps running — not checked yet
  • Event intake is back — the check's events are accepted and the in-memory queue is written to disk — not checked yet
  • The service writes its log to /srv/ingest/log/ingest.log, no deleted open files remain on the volume — not checked yet
  • A logrotate rule rotates ingest.log by size (10 MiB at most, 3 archives at most), and after rotation the service writes to the new file without a restart — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…