Azure-Samples / openai-aca-lb

Smart load balancing for Azure OpenAI endpoints
MIT License
41 stars 17 forks source link

Postprovision fails because container isn't found #15

Open diberry opened 6 months ago

diberry commented 6 months ago

@andredewes

  1. az login
  2. azd auth login
  3. azd up - picked sweden

Immediately deployed again - azd up and it worked.

@diberry ➜ /workspaces/openai-aca-lb (main) $ azd up
? Enter a new environment name: diberry-aca-lb-2
? Select an Azure Subscription to use: 22. Azure Dev Platform Services Content Team (2123cb08-23fa-4a80-afec-4ec9e015433f)
? Select an Azure location to use: 29. (Europe) Sweden Central (swedencentral)

Packaging services (azd package)

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.

Subscription: Azure Dev Platform Services Content Team (2123cb08-23fa-4a80-afec-4ec9e015433f)
Location: Sweden Central

  You can view detailed progress in the Azure Portal:
  https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2F2123cb08-23fa-4a80-afec-4ec9e015433f%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fdiberry-aca-lb-2-1715441470

  (✓) Done: Resource group: diberry-aca-lb-2-rg
  (✓) Done: Log Analytics workspace: diberry-aca-lb-2-sb2lxn4dxalwc-loganalytics
  (✓) Done: Application Insights: diberry-aca-lb-2-sb2lxn4dxalwc-appinsights
  (✓) Done: Azure OpenAI: openai3-sb2lxn4dxalwc
  (✓) Done: Azure OpenAI: openai2-sb2lxn4dxalwc
  (✓) Done: Portal dashboard: diberry-aca-lb-2-sb2lxn4dxalwc-appinsights-dashboard
  (✓) Done: Azure OpenAI: openai1-sb2lxn4dxalwc
  (✓) Done: Container Registry: diberryacalb2sb2lxn4dxalwcregistry
  (✓) Done: Container Apps Environment: diberry-aca-lb-2-sb2lxn4dxalwc-containerapps-env
  (✓) Done: Container App: diberry-aca-lb-2-sb-ca
Building openai-aca-lb:latest...
Packing source code into tar to upload...
Excluding '.gitignore' based on default ignore rules
Uploading archived source code from '/tmp/build_archive_89dfeaef0f5646ebbc3f612cab41dc47.tar.gz'...
Sending context (5.814 KiB) to registry: diberryacalb2sb2lxn4dxalwcregistry...
Queued a build with ID: dt1
Waiting for an agent...
2024/05/11 15:36:39 Downloading source code...
2024/05/11 15:36:39 Finished downloading source code
2024/05/11 15:36:39 Using acb_vol_2194378a-e5fa-46f9-bd1f-26128dc97bac as the home volume
2024/05/11 15:36:39 Setting up Docker configuration...
2024/05/11 15:36:40 Successfully set up Docker configuration
2024/05/11 15:36:40 Logging in to registry: diberryacalb2sb2lxn4dxalwcregistry.azurecr.io
failed to login, ran out of retries: failed to set docker credentials: Error response from daemon: Get "https://diberryacalb2sb2lxn4dxalwcregistry.azurecr.io/v2/": dial tcp: lookup diberryacalb2sb2lxn4dxalwcregistry.azurecr.io on 168.63.129.16:53: no such host
: exit status 1
Run ID: dt1 failed after 5s. Error: failed during run, err: exit status 1
Run failed
(InvalidParameterValueInContainerTemplate) The following field(s) are either invalid or missing. Field 'template.containers.main.image' is invalid with details: 'Invalid value: "diberryacalb2sb2lxn4dxalwcregistry.azurecr.io/openai-aca-lb:latest": GET https:: MANIFEST_UNKNOWN: manifest tagged by "latest" is not found; map[Tag:latest]';.

ERROR: error executing step command 'provision': failed running post hooks: 'postprovision' hook failed with exit code: '1', Path: 'azd-hooks/postprovision.sh'. : exit code: 1
andredewes commented 6 months ago

It seemed to be a temporary issue with logging with AZ (failed to login, ran out of retries: failed to set docker credentials: Error response from daemon: Get "https://diberryacalb2sb2lxn4dxalwcregistry.azurecr.io/v2/": dial tcp: lookup diberryacalb2sb2lxn4dxalwcregistry.azurecr.io on 168.63.129.16:53: no such host). I tried to reproduce it but could not. Can you please create a new Codespace and check if it persists?