[ norboten ]
rhcsa · lab rhcsa-02

The API That Vanishes on Reboot

· about 30 minutes · runs on rocky-10 · unrated

An unrated lab. It runs on your machine with no account and no network, and everything about it — the faults, the checks, the hints and the reference solution — is in the repository. An attempt on it is recorded on your profile and never moves a rating: only rated labs do. Rated and unrated labs.

The briefing

The internal inventory API answers on port 8081 (curl localhost:8081/health). Its config is prepared at boot by a helper unit, config-sync.

What people report:

  • When an admin starts the API by hand, it works — until the next reboot. After a reboot it is never running, and systemctl start on its unit fails.
  • The runbook says this server boots to multi-user.target. It no longer does.
  • Someone "temporarily disabled" something last month and nobody remembers what.

What is expected, and graded:

  1. inventory-api.service runs after every boot without anyone touching it, and /health answers.
  2. The default boot target is multi-user.target.
  3. No Norboten-lab unit is masked.
  4. Starting the API pulls in config-sync.service — the ordering alone is not enough.
  5. The unit starts the right program.

You have root through sudo. Everything must still hold after a reboot.

What is graded

The machine is checked, rebooted, and checked again. A check passes only if it passes both times.

CheckObjective
01_api_running_after_bootStart and stop services; configure automatic startup
02_default_target_multi_userConfigure systems to boot into specific targets automatically
03_no_masked_unitsStart and stop services; configure automatic startup
04_config_sync_pulled_inStart and stop services; configure automatic startup
05_execstart_is_validLocate and interpret system log files and journals

Start it

  1. 2Labs
  2. rhcsa-02select this one
  3. udownload it
  4. sstart the machine

Reading

Where the lab's hints send you, level by level, as you ask for them (h, then l opens a journal section in the TUI).

Theory for this lab

4 questions on the same topic, in the lab's Theory tab. They never affect the lab's grade. Three of them, to answer here:

Question 1

Unit A has `After=B.service` and nothing else about B. What happens when A starts at boot?

Question 2

What does `systemctl mask foo.service` do?

Question 3

Which command shows a unit's effective definition, including every drop-in?