You are deploying a database schema migration task to Azure Container Instances (ACI). If the migration script fails during execution, running it a second time automatically could result in data corruption. You must ensure that the container does not restart under any circumstances once it stops. Which restart policy should you configure for the container group?
- NeverCevap
- BAlways
- COnFailure
- DNone
Cevap
Never
The 'Never' restart policy guarantees that the container will execute exactly once. It will not attempt to restart regardless of whether the process finishes successfully (zero exit code) or fails with an error (non-zero exit code). This is ideal for tasks like database migrations where automatic retries could corrupt data.
Adım Adım Çözüm
Anahtar Kavram
Azure Container Instances (ACI) Restart Policies