Question 740
For this Linux administration lab: A service is enabled and active, but the actual application fails after boot because a required mount is not available in time. Which safety and lifecycle check best prevents the same problem returning?
Explanation
Correct Answer
Test full cold-boot readiness, not just whether a unit says active. This guards against recurrence of: Systemd service ordering and filesystem availability are separate dependencies. Confirm the lab's final state by: After a controlled reboot, the mount is available when the service starts and the application reads its data.
Incorrect Answers
Choose service accounts and privileges deliberately for each recurring job. That control is best suited to a separate scenario: A recurring cron script runs as root because it was inserted into the system crontab, while it should run as a least-privilege reporting account. It is not the best safeguard for the current mechanism: Systemd service ordering and filesystem availability are separate dependencies.
Implement bounded restart behavior and investigate recurring failure events promptly. That control is best suited to a separate scenario: A service starts but restarts endlessly because `Restart=always` masks a broken configuration, filling logs. It is not the best safeguard for the current mechanism: Systemd service ordering and filesystem availability are separate dependencies.
Record both the configuration file change and observed runtime source. That control is best suited to a separate scenario: A change updates `/etc/chrony.conf` but the running chronyd service continues querying the retired time source. It is not the best safeguard for the current mechanism: Systemd service ordering and filesystem availability are separate dependencies.