export-bundle resulted in invalid machine placements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Unassigned |
Bug Description
i exported an openstack bundle
$ juju export-bundle --filename juju_bundle-
and found these errors when trying to prepare a new overload
$ juju deploy ./juju_
ERROR cannot deploy bundle: the provided bundle has the following errors:
invalid placement syntax ""
invalid placement syntax ""
I thought there was an issue in the "to:" field of my overlay, but it turns out the original bundle contained two applications with this in the to field:
nova-compute:
charm: cs:nova-compute-309
num_units: 96 <-- this is wrong, it should be 95
to:
- "187"
- "188"
- "189"
- "190"
- "191"
- "192"
- "193"
- "" <-- this is wrong, it shouldn't be there
- "115"
- "196"
- "197"
- "198"
- "201"
I believe this occurred after removing a unit from this app which didn't complete machine allocation.
juju status shows
nova-compute 17.0.13 active 95 nova-compute jujucharms 309 ubuntu
Changed in juju: | |
milestone: | 2.8.7 → 2.8.8 |
Changed in juju: | |
milestone: | 2.8.8 → 2.8.9 |
Changed in juju: | |
milestone: | 2.8.9 → 2.8.10 |
Changed in juju: | |
milestone: | 2.8.10 → 2.8.11 |
An issue here is that when the units are read from the model for export, all units are included, even ones which are dying or dead. These should be excluded I think.
The "--to" is empty because the unit's assigned machine id is empty. But this is set at the time the unit is deployed so it's not clear at this point how it got to be empty. Maybe it is reset as part of the cleanup process done when removing the unit or the machine to which it was deployed.