Juju is creating containers with the wrong series in bundles where the charm series is specified in the charm url, rather than explicitly with a series label. Only charm-store charms can specify series in the charm url when specified by the user (not internal to juju).
juju deploy ~/notes/TestDeployBundleMachinesUnitsPlacement.yaml
Located charm "mysql" in charm-store, channel stable
Located charm "wordpress" in charm-store, channel stable
Executing changes:
- upload charm mysql from charm-store with architecture=amd64
- deploy application sql from charm-store using mysql
- upload charm wordpress from charm-store with architecture=amd64
- deploy application wp from charm-store using wordpress
- add new machine 0 (bundle machine 1)
- add new machine 1 (bundle machine 2)
- add unit wp/0 to new machine 0
- add lxd container 1/lxd/0 on new machine 1
- add lxd container 0/lxd/0 on new machine 0
- add new machine 2
- add unit sql/0 to 0/lxd/0 to satisfy [lxd:wp/0]
ERROR cannot deploy bundle: cannot add unit for application "sql": acquiring machine to host unit "sql/0": cannot assign unit "sql/0" to machine 0/lxd/0: series does not match
Model Controller Cloud/Region Version SLA Timestamp
default thursday-snap localhost/localhost 2.9.11 unsupported 16:45:22Z
App Version Status Scale Charm Store Channel Rev OS Message
sql waiting 0/1 mysql charmstore stable 58 ubuntu waiting for machine
wp error 1 wordpress charmstore stable 0 ubuntu hook failed: "install"
Unit Workload Agent Machine Public address Ports Message
sql/0 waiting allocating waiting for machine
wp/0* error idle 0 10.74.147.39 hook failed: "install"
Machine State DNS Inst id Series AZ Message
0 started 10.74.147.39 juju-c2d5ce-0 xenial Running
0/lxd/0 pending juju-c2d5ce-0-lxd-0 focal Container started
1 started 10.74.147.97 juju-c2d5ce-1 xenial Running
1/lxd/0 pending juju-c2d5ce-1-lxd-0 focal Container started
2 started 10.74.147.76 juju-c2d5ce-2 focal Running
$ cat ~/notes/TestDeployBundleMachinesUnitsPlacement.yaml
applications:
wp:
charm: cs:xenial/wordpress
num_units: 2
to:
- 1
- lxd:2
sql:
charm: cs:xenial/mysql
num_units: 2
to:
- lxd:wp/0
- new
machines:
1:
series: xenial
2:
series: xenial
Does not happen if you change 'cs:xenial/' to 'cs:' and add 'series: xenial' for each charm.
I think with charm-store on the way out, we can let this bug go.