bug: AcrPull role not assigned to container app managed identity — image pull 401 on partial first deploy
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- azure
- 領域
- cloud, infrastructure
調査の方向性
説明されている Azure 環境で devclaw up に続けて devclaw deploy を実行して失敗を再現し、その後、ACR とコンテナー アプリをプロビジョニングする Bicep リソースを調査します。マネージド ID、ACR スコープ、AcrPull ロールの割り当て、依存関係の順序を検証します。最初のデプロイが部分的に完了した後に deploy を実行すると、ACR 401 が発生せずにコンテナーが起動することを完了条件とします。
索引モデルが issue の本文から書いたものです。
説明
Summary
On a first devclaw up where the ACA revision activation times out (Operation expired), the container app's system-assigned managed identity never gets the AcrPull role on ACR. Subsequent devclaw deploy calls push the image successfully but the container fails to start with a persistent 401.
Error seen in container system logs
Failed to construct registry secret for registry 'acrXXXXX.azurecr.io'
Error: ACR token exchange endpoint returned error status: 401
Steps to reproduce
- Run
devclaw upin a region/subscription where ACA revision activation times out on first run (e.g.southindiawith a cold ACA environment, or any restricted corporate subscription) - Provision completes (ACR ✓, OpenAI ✓, Storage ✓, ACA env ✓) but revision fails with
Operation expired - Run
devclaw deploy— image is pushed to ACR but container immediately fails with ACR 401
Root cause
Bicep provisions ACR with adminUserEnabled: false (correct) and the container app is configured to pull via system-assigned managed identity — but the AcrPull role assignment on ACR for the container app's principalId is either missing or not yet propagated when the first revision activation is attempted. When the first azd up doesn't complete cleanly, this RBAC gap is never resolved.
Expected behaviour
Bicep should create an explicit AcrPull role assignment resource scoped to the ACR for the container app's managed identity, with correct dependsOn sequencing so the role is in place before the first revision is activated.
Manual workaround
PRINCIPAL_ID=$(az containerapp show -n <app> -g <rg> --query 'identity.principalId' -o tsv)
ACR_ID=$(az acr show -n <acr> -g <rg> --query 'id' -o tsv)
az role assignment create \
--assignee-object-id $PRINCIPAL_ID \
--assignee-principal-type ServicePrincipal \
--role AcrPull \
--scope $ACR_ID
Environment
- Region:
southindia - Restricted corporate subscription with Azure Policy assignments active
azdversion: latest,azCLI: latest
- 主要言語
- Shell
- スター
- 25
- フォーク
- 3
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/openclaw-dev のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
microsoft/openclaw-dev#34 ·
-
bug: BOOTSTRAP.md write fails in ephemeral fallback mode (SKIP_STORAGE=true / no Azure Files mount)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/openclaw-dev#24 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
microsoft/openclaw-dev#35 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
microsoft/openclaw-dev#23 ·
microsoft/openclaw-dev の issue をすべて見る
似ている issue
-
PacReq: mangowcオープンpackage request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pacstall/pacstall-programs#9475 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 71/100
t4t5/omdrop-owl#14 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信