Soru

Zorluk: KolayConfigure Azure Container Instances (ACI)

You plan to deploy a containerized batch job to Azure Container Instances (ACI) to process imported data. You need to ensure that the container does not restart after a successful execution. Which of the following restart policies can you configure to prevent restarts after a successful execution? (Select two.)

  1. NeverCevap
  2. OnFailureCevap
  3. C
    Always
  4. D
    OnError

Cevap

To prevent a container from restarting after a successful execution in Azure Container Instances, you can configure either the Never or OnFailure restart policies.
For containerized tasks that run once and should not restart upon successful completion, both the Never policy (which prohibits restarts under any condition) and the OnFailure policy (which only restarts the container if the process exits with an error code) are valid configuration choices.

Adım Adım Çözüm

1
Identify the container behavior requirement.
The container must run a batch job and must not restart if the execution is successful.
Understanding the desired lifecycle prevents deploying a policy that triggers infinite restart loops.
2
Evaluate the supported restart policies in Azure Container Instances.
ACI supports three valid restart policies: Always, Never, and OnFailure.
This allows filtering out invalid policy names and identifying correct options.
3
Determine which valid policies satisfy the requirement.
The Never policy prevents all restarts. The OnFailure policy only restarts on a non-zero exit code (failure) and prevents restarts on exit code 0 (success). Therefore, both policies satisfy the requirement.
Both choices successfully prevent the container from restarting after a successful run.

Anahtar Kavram

Azure Container Instances supports three restart policies: Always, Never, and OnFailure. For workloads that run to completion and should not run again after a successful execution, both Never and OnFailure are valid choices.
Bu soruyu puanla