add-model fails erroneously when a cloud is specified and a credential is specified and needs to be uploaded.

Bug #1625657 reported by Martin Hilton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Horacio Durán

Bug Description

if you try to add a model using a command like:

juju add-model --credential cred test-model google/europe-west1

Then this results in the error message:

ERROR region "google/europe-west1" not found (expected one of ["asia-east1" "europe-west1" "us-central1" "us-east1"])

Some digging around shows that this correctly resolves the region the first time, but it tries to do it again when retrieving the credential from local storage to upload it to the controller. At this point it uses the originally specified region and finds it doesn't match any of the regions valid for the cloud.

For reference the error details are:

(error details: [{github.com/juju/juju/cmd/juju/controller/addmodel.go:201: } {github.com/juju/juju/cmd/juju/controller/addmodel.go:437: } {github.com/juju/juju/cmd/modelcmd/credentials.go:76: } {github.com/juju/juju/cloud/clouds.go:224: region "google/europe-west1" not found (expected one of ["asia-east1" "europe-west1" "us-central1" "us-east1"])}])

Changed in juju:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Alexis Bruemmer (alexis-bruemmer)
milestone: none → 2.0-rc2
Changed in juju:
assignee: Alexis Bruemmer (alexis-bruemmer) → Horacio Durán (hduran-8)
status: Triaged → In Progress
Revision history for this message
Horacio Durán (hduran-8) wrote :
Changed in juju:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.