Azure bootstrap fails when 'location' and 'storage-account-name' are not in the same region

Bug #1236136 reported by Antonio Rosales on 2013-10-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Medium
Unassigned

Bug Description

The Juju Azure provider is currently configured to have the user specify the location in which they wish to deploy instances to, and the storage account to use with that deployed instances. Specifically, the environments.yaml keys are:

    # Location for instances, e.g. West US, North Europe.
    location: West US
    # Windows Azure Storage info.
    storage-account-name: juju0useast0

If the storage account is not in the same region as the instance than an error will occur. For example if the storage account is set up in West US but the user is trying to deploy instances to East US the user will get the following error:

 2013-10-07 01:49:03 ERROR juju supercommand.go:282 cannot start bootstrap instance: POST request failed: BadRequest - The location or affinity group West US specified for source image b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_3-LTS-amd64-server-20131003-en-us-30GB is invalid. The source image must reside in same affinity group or location as specified for hosted service East US. (http code 400: Bad Request)

This is due to Azure trying to set an affinity group[0] and requires the storage and the instance be in the same region. A work around is to instruct the user to set up a storage account in each region they need to deploy to. One possible fix is to have Juju create the storage account for the user based on the region instances are being deployed to.

Example --debug bootstrap:
http://pastebin.ubuntu.com/6203266/

[0] http://msdn.microsoft.com/en-us/library/windowsazure/jj156085.aspx

-thanks,
Antonio

Antonio Rosales (a.rosales) wrote :

Forgot to mention these commands were run 1.15.1

arosales@x230:~$ juju --version
1.15.1-raring-amd64

-Thanks,
Antonio

Kapil Thangavelu (hazmat) wrote :

This should probably be checked/verified during environment config validation, namely that storage group region matches to env config region and warn appropriately else.

Ian Booth (wallyworld) on 2013-10-11
Changed in juju-core:
importance: Undecided → High
status: New → Triaged
Curtis Hovey (sinzui) on 2013-10-14
tags: added: bootstrap
Curtis Hovey (sinzui) on 2013-11-27
tags: added: azure-provider
removed: azure
Antonio Rosales (a.rosales) wrote :

Re comment 2 from Kapil T. I am in full agreement. Juju should check the storage and image are in the same region and if not output a yaml config error on bootstrap in Azure.

-Thanks,
Antonio

Changed in juju-core:
importance: High → Medium
Andrew Wilkins (axwalk) wrote :

I think we should automatically create the storage account like we do for the control bucket in ec2. This would allow us to fix lp:1291201, and would simplify the config.

Curtis Hovey (sinzui) wrote :

This bug is implicitly fixed in 1.21.0 because local storage is used.

Changed in juju-core:
milestone: none → next-stable
status: Triaged → Fix Committed
milestone: next-stable → 1.21-alpha2
Curtis Hovey (sinzui) on 2014-10-23
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers