Step 5 of 6 · lab · 20 min
The pricing service is down
After a night-time restart the pricing service does not start. Its settings live under git, and several people have edited them. Bring back the working settings without losing yesterday's needed change and without rewriting the history.
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
- The
lab-pricingservice is running and answers:curl http://127.0.0.1:8180/health. pricing.iniholds the settings the service was running with before the restart, and the Kazan warehouse is in them.- The history is not rewritten: the fix is a new commit on the
mainbranch, and your colleagues' commits stay on it. In the endgit statusis clean. - Do not change the service code or its unit.
The
/etc/pricingdirectory belongs to root, so run git in it withsudo:sudo git -C /etc/pricing log. 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-
The lab-pricing service is running and answers http://127.0.0.1:8180/health — not done yet
-
The pricing.ini settings are the ones the service ran with before the restart — not done yet
-
The Kazan warehouse from yesterday's change is still in the settings — not done yet
-
The history is not rewritten — the fix is a new commit on main, git status is clean — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 4-
The lab-pricing service is running and answers http://127.0.0.1:8180/health — not done yet
-
The pricing.ini settings are the ones the service ran with before the restart — not done yet
-
The Kazan warehouse from yesterday's change is still in the settings — not done yet
-
The history is not rewritten — the fix is a new commit on main, git status is clean — not done yet
Goals are checked on the machine after every command.