Skip to content

ACI containers crash on startup: missing AZURE_UAMI_RESOURCE_ID env var + failed containers leak quota #355

@jathavaan

Description

@jathavaan

Problem

Two bugs cause every ACI benchmark run to fail:

  1. Missing env var: AZURE_UAMI_RESOURCE_ID is required by Config at import time (_require_env), but _create_container_instance in main.py never forwards it to the container's --environment-variables. Containers crash immediately on startup with OSError: Required environment variable 'AZURE_UAMI_RESOURCE_ID' is not set.

  2. Quota cascade: When a container fails, _check_container_state raises and _delete_container_instance on the next line never executes. Failed containers keep holding ACI cores, and subsequent batches hit ContainerGroupQuotaReached (Usage: 42, Limit: 40).

Fix

  • Forward AZURE_UAMI_RESOURCE_ID to containers via --environment-variables
  • Wrap _check_container_state in try/finally so cleanup always runs

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions