Trace the release path OPS-2211

OpenShell basics · Easy · Do · about 10 min ·Linux

Lab machine

A private Linux machine with the problem already set up. Sessions last up to 60 minutes.
Ivo Petrov opened OPS-2211 at 09:31task

Ivo found two files called deploy and nearly ran the wrong one. Before the 10:00 release he wants to know which file the runbook actually runs.

The deploy runbook says to run srv/current/bin/deploy --check before every release. Ivo searched for the script by name and found two: one under srv/releases/… and an old copy in srv/old-bin.

"I was one tab-complete away from running the 2026-09-20 build. Can someone tell me which file the runbook path really resolves to, and confirm it works?"

srv/current is a symbolic link. The release tool moves it on every deploy, so the path in the runbook is an alias. The question is what it points at today.

Your task

Resolve srv/current/bin/deploy to the real file and write its absolute path on one line into reports/deploy-path.txt. Then run the readiness check the way the runbook says, through the stable path, with --check. Do not move the srv/current link.

On the machine

  • srv/current, a symlink into srv/releases/
  • Four release directories and a stale srv/old-bin/deploy
  • docs/runbooks/deploy.md
  • srv/deploy.log, which records every run of any deploy script with the path it was run as

Timeline

09:20Ivo runs find / -name deploy and gets two hits.
09:24He asks in #platform which one is live. Nobody is sure.
09:31OPS-2211 is assigned to you.
10:00Release window opens.

Done when

  1. reports/deploy-path.txt holds the absolute path of the real deploy file behind srv/current.
  2. srv/current/bin/deploy --check has been run through the stable path.
  3. srv/current still points at the same release.

Hints

Hint 1

ls -l srv shows where current points.

Hint 2

readlink -f follows every symlink and prints the absolute path.

Hint 3

Write it with: readlink -f srv/current/bin/deploy > reports/deploy-path.txt

Hint 4

Then run srv/current/bin/deploy --check from the lab directory.

Show the solution

readlink -f srv/current/bin/deploy > reports/deploy-path.txt, then srv/current/bin/deploy --check.