You are deploying a one-off data processing job to Azure Container Instances. The container should run to completion. If the process exits with code 0, it should not restart. If it fails with a non-zero exit code, it should automatically restart to retry. Which restart policy should you set?
Choose an answer
Tap an option to check your answer.
Correct answer: OnFailure.
Why this is the answer
The OnFailure restart policy is correct because it aligns with the requirement for the container to restart only if it fails (exits with a non-zero code). If the process completes successfully (exit code 0), it will not restart, fulfilling the "run to completion" aspect without unnecessary retries. Always would restart the container regardless of the exit code, even after successful completion, which is not desired. Never would prevent any restarts, even upon failure, contradicting the requirement for automatic retries. Manual is not a valid restart policy option for Azure Container Instances; restart policies are automated settings.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed