200-901 exam dumps

200-901 practice question 158 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 158

Single answer

You are a developer tasked with managing a microservices application deployed on a Linux-based server. The application consists of multiple services, each running as a systemd service. You need to make changes to the configuration of a specific service and restart it to apply the new settings. What sequence of steps should you follow to achieve this?

  1. A

    Edit the service configuration file, run 'systemctl reload ', and verify the status using 'systemctl status '

  2. B

    Stop the service using 'systemctl stop ', edit the configuration file, start the service using 'systemctl start ', and verify the status using 'systemctl status '

  3. C

    Edit the service configuration file, then restart the service using 'systemctl restart ', and verify the status using 'systemctl status '

  4. D

    Stop the service using 'systemctl stop ', edit the configuration file, reload the service using 'systemctl reload ', and verify the status using 'systemctl status '

Show answer and explanation

Correct answer: C

Explanation

To apply configuration changes to a systemd-managed service, you should first edit the service's configuration file, then restart the service using 'systemctl restart ' to apply the changes. Verifying the service status with 'systemctl status ' ensures the service is running as expected with the new configuration. This method is efficient and minimizes downtime compared to stopping and starting the service separately.

  • A. Incorrect.

    'systemctl reload' is used to reload the service's configuration without stopping the service, but this may not apply to all services. If the service does not support reloading, this step will fail.

  • B. Incorrect.

    Stopping and starting the service may work, but it introduces unnecessary downtime and is not an efficient way to apply configuration changes when 'restart' can handle this in one step.

  • C. Correct.

    This is the correct process. Editing the configuration file, restarting the service using 'systemctl restart', and verifying its status ensures the new configuration is applied and the service is running correctly.

  • D. Incorrect.

    'systemctl reload' is not appropriate after stopping a service. Reloading applies only to running services, and this sequence would fail.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam