Step 6 of 7 · lab · 20 min
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.
- The site runs again on the release that served the pages before the failure:
/srv/books/currentis a link to that release. - Every address of
http://books.lab.test/answers 200. - The visitors do not lose a single answer: nginx is not restarted or stopped.
- 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
The machine is starting
Hints
0 of 3Lab 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
Goals are checked on the machine after every command.