Linux Labs

Automation: Git and Ansible / Stage 1 of 6 · step 5 of 6

The pricing service is down

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

Situation

The lab-pricing service gives the shop front its prices and the list of warehouses. After a night-time restart it did not come back, and the shop front says "prices unavailable". The service settings live in /etc/pricing. That directory is a git repository: whoever edits the settings commits the change right there.

Yesterday Oleg added the Kazan warehouse to the settings. The shop front already shows it to customers, so this change is needed.

Task

  1. The lab-pricing service is running and answers: curl http://127.0.0.1:8180/health.
  2. pricing.ini holds the settings the service was running with before the restart, and the Kazan warehouse is in them.
  3. The history is not rewritten: the fix is a new commit on the main branch, and your colleagues' commits stay on it. In the end git status is clean.
  4. Do not change the service code or its unit.

The /etc/pricing directory belongs to root, so run git in it with sudo: sudo git -C /etc/pricing log. There is no internet on the machine.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 4
  • The lab-pricing service is running and answers http://127.0.0.1:8180/health — not checked yet
  • The pricing.ini settings are the ones the service ran with before the restart — not checked yet
  • The Kazan warehouse from yesterday's change is still in the settings — not checked yet
  • The history is not rewritten — the fix is a new commit on main, git status is clean — 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…