Model migrations fail if cloud names don't match
Bug #1650251 reported by
Menno Finlay-Smits
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Christian Muirhead |
Bug Description
Users can define their own clouds and model migrations can fail a cloud names isn't defined on the target even if they underlying substrate is actually the same.
When trying to migrate a LXD based model (using the "localhost" cloud) to another LXD controller using the "lxd" cloud the following error resulted:
ERROR juju.worker.
description: | updated |
Changed in juju: | |
status: | New → In Progress |
assignee: | nobody → Christian Muirhead (2-xtian) |
Changed in juju: | |
milestone: | 2.1.0 → 2.1-rc1 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Looking in the database, the clouds collection for each controller has one item, named "localhost" or "lxd" depending on how it was bootstrapped. When a model exported from the lxd controller is imported to the localhost one, the import code tries to find the lxd cloud and can't. Rather than trying to fix it at this point where there's not really enough context, it would make more sense to ensure that both controllers get a cloud named "localhost" whether they were bootstrapped with "localhost" (the cloud name) or "lxd" (the provider name).
The bootstrap code tries to find the cloud by the name given (which fails for lxd) and then tries it as the provider name. If it finds the provider by name, it should ask the provider for the default cloud name (similar to what it does for regions) and use that instead of just passing on the provider name as the cloud name.