Skip to content

Unhelpful error messages if location is incorrect #28

@GraemeMeyerGT

Description

@GraemeMeyerGT

I've been getting an odd collection of seemingly randomly alternating error messages, which seems to have been caused by an incorrect location setting.

I was getting a weird mix of these two errors:

WARNING: The public access to all blobs or containers in the storage account will be disallowed by default in the future, which means default value for --allow-blob-public-access is still null but will be equivalent to false.ERROR: (StorageAccountOperationInProgress) An operation is currently performing on this storage account that requires exclusive access.Code: StorageAccountOperationInProgressMessage: An operation is currently performing on this storage account that requires exclusive access. Error: The process '/usr/bin/az' failed with exit code 1

Error: failed to get latest image version: request uri https://management.azure.com/subscriptions/***/providers/Microsoft.Compute/locations/UK%20South/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-jammy/skus/22_04-lts/versions?$orderby=name%20desc&$top=1&api-version=2018-06-01: Error: 400

This was with my location set to UK South, which is apparently incorrect. Setting my location to uksouth seems to have resolved the errors. I would suggest clarifying the error messages a little to make it clearer what's going on when this field is incorrect.

My Action config, based on the provided example:

    - name: Build and Distribute Custom VM Image      
      uses: azure/build-vm-image@v0
      with:        
        resource-group-name: 'Az-VM-Image-Test'
        location: 'uksouth'
        managed-identity: 'ImageBuilderManagedIdentity'
        source-os-type: 'linux'
        source-image-type: 'PlatformImage'
        source-image: Canonical:0001-com-ubuntu-server-jammy:22_04-lts:latest
        customizer-source: ${{ GITHUB.WORKSPACE }}/workflow-artifacts
        customizer-script: |
          sudo mkdir /buildArtifacts
          sudo cp -r /tmp/ /buildArtifacts/
          sh /buildArtifacts/workflow-artifacts/install-world.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions