Linux Labs

SRE practices: SLOs, incidents, redundancy / Stage 4 of 8

A runbook and the first ten minutes

Not running Starting usually ~20 s
Leave the lesson

Step 6 of 7 · lab · 20 minmedium

The site broke after a release

After the latest release the bookshop answers error 500 at every address. Put the site back on the previous working release without the visitors noticing the switch, and keep the failed release for the review.

Situation

An alert came in: the books.lab.test bookshop answers with error 500. The home page, the catalogue pages, even the style files — everything returns 500. Visitors are on the site right now.

The site is static content on nginx. CI deploys it: every release is unpacked into its own directory /srv/books/releases/<version>, and nginx serves the files from /srv/books/current.

Task

Bring the site back first; the cause will be reviewed later.

  1. The site runs again on the release that served the pages before the failure: /srv/books/current is a link to that release.
  2. Every address of http://books.lab.test/ answers 200.
  3. The visitors do not lose a single answer: nginx is not restarted or stopped.
  4. The failed release stays in releases/ untouched — the failure will be reviewed from it.

Constraints

  • Don't change the nginx configuration: the site is still served from /srv/books/current.
  • Don't edit the release files.

The nginx logs are read with sudo. There is no internet on the machine.

Lab · on your own

No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.

Goals

0 of 4
  • /srv/books/current is a link to the release that was live before the failed rollout — not done yet
  • A series of requests to http://books.lab.test/ during the check — every answer is 200, the pages come from that release — not done yet
  • nginx was not restarted or stopped — only reloaded; the site configuration is unchanged — not done yet
  • The failed release stays in releases/ untouched — for the review — not done yet
Ctrl+Enter
Starts the machine node1 · Ubuntu 24.04

The machine is starting

Hints

0 of 3

Lab goals

0 of 4
  • /srv/books/current is a link to the release that was live before the failed rollout — not done yet
  • A series of requests to http://books.lab.test/ during the check — every answer is 200, the pages come from that release — not done yet
  • nginx was not restarted or stopped — only reloaded; the site configuration is unchanged — not done yet
  • The failed release stays in releases/ untouched — for the review — not done yet
node1 Ubuntu 24.04

Lab goals

0 of 4
  • /srv/books/current is a link to the release that was live before the failed rollout — not done yet
  • A series of requests to http://books.lab.test/ during the check — every answer is 200, the pages come from that release — not done yet
  • nginx was not restarted or stopped — only reloaded; the site configuration is unchanged — not done yet
  • The failed release stays in releases/ untouched — for the review — not done yet
Loading…