Soru

Zorluk: KolayConfigure Azure Container Instances (ACI)

An administrator needs to deploy a containerized script to Azure Container Instances (ACI) that performs a one-time database backup. The script must run, complete the backup, and then stop. If the backup process fails, the container must attempt to run again. Which restart policy should the administrator configure for the container group?

  1. OnFailureCevap
  2. B
    Always
  3. C
    Never
  4. D
    Unless-Stopped

Cevap

OnFailure
The correct answer is the restart policy that ensures the container runs to completion, stops upon success, and restarts only when a failure is encountered. In Azure Container Instances, this behavior is controlled by the 'OnFailure' restart policy.

Adım Adım Çözüm

1
Identify the container workload type.
The workload is a task-based (run-to-completion) database backup script rather than a long-running service.
To select the correct restart policy, you must first determine if the container is intended to run indefinitely or terminate after completing a specific job.
2
Determine the failure handling requirement.
The container must retry if the process fails, but must stop upon successful completion.
This rules out the 'Never' policy, which would not retry on failure, and the 'Always' policy, which would keep restarting the container even after success.
3
Map the requirements to the supported Azure Container Instances restart policies.
The 'OnFailure' policy matches these requirements.
ACI supports 'Always', 'Never', and 'OnFailure'. Since we need a restart only on failure, 'OnFailure' is the correct configuration.

Anahtar Kavram

Configuring the restart policy for Azure Container Instances (ACI) based on workload requirements.
Bu soruyu puanla