The release entry point vanished INC-2420

OpenShell basics · Medium · Boss incident · about 30 min ·Linux

Lab machine

A private Linux machine with the problem already set up. Sessions last up to 60 minutes.
Dmitri Vos opened INC-2420 at 17:40SEV-2

17:40, end of your first day. The 18:00 release is blocked. `current/bin/deploy` says No such file or directory, the script is right there in releases/, and Dmitri swears nobody touched current.

Dmitri runs every release from current/bin/deploy. current is a symlink into releases/, and switching releases means moving it. Every afternoon at 17:30 bin/prune-releases deletes old releases to save disk.

"It worked yesterday. Nobody touched current. Ship 2026-09-27, it's the one I approved; whatever else is in releases/ is not." (Dmitri)

A link whose target is gone is called dangling: the name exists, the file it leads to does not. Find out why it is dangling today, and make sure it is not dangling again tomorrow.

Your task

Point current at the release Dmitri approved without copying or chmod-ing anything, and change the prune so it never deletes the release current points at.

On the machine

  • ls -l, readlink: where current points
  • releases/*/RELEASE_STATUS and var/log/releases.log: which release Dmitri approved
  • bin/prune-releases and var/log/release-prune.log: what deleted 2026-09-26
  • TICKET.md

Timeline

17:30bin/prune-releases keeps the two newest names and deletes 2026-09-26, the live release.
17:38Dmitri runs the release check: "No such file or directory".
17:40INC-2420 opened. Release window at 18:00.
18:00Release window.

Done when

  1. current/bin/deploy prints "deploy: ready" for the release Dmitri approved.
  2. The deploy script keeps mode 750 and is not copied anywhere.
  3. Tonight's prune cannot do this again. After bin/prune-releases runs, current still works.

Hints

Hint 1

`ls -l current` shows where the link points. Does that directory exist?

Hint 2

The newest directory in releases/ is not necessarily the one to ship. Every release says its status.

Hint 3

`ln -sfn <target> current` replaces the link itself. Without -n, ln writes inside the old target.

Hint 4

bin/prune-releases keeps the two newest names and deletes the rest. Which release must it never delete?

Show the solution

Run `ls -l current`. It points at the pruned 2026-09-26. Check `var/log/releases.log`: 2026-09-27 is approved, while the newer candidate and the nightly are not. Run `ln -sfn releases/2026-09-27 current`, then `current/bin/deploy`. In bin/prune-releases, read the live release with `live="$(basename "$(readlink -f "$root/current")")"` and skip it in the loop (`[ "$old" = "$live" ] && continue`).