juju 2.3 incorrectly colocates apps on machine 0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
When specifying machine placement for a given application (eg, to: '0') , the first unplaced application with a name earlier in the alphabet will be colocated on machine 0.
Reproduce:
---------------
$ cat test.yaml
series: xenial
applications:
a:
charm: "cs:xenial/ubuntu"
num_units: 1
z:
charm: "cs:xenial/ubuntu"
num_units: 1
to:
- "0"
machines:
"0":
series: "xenial"
$ juju deploy test.yaml
Resolving charm: cs:xenial/ubuntu
Resolving charm: cs:xenial/ubuntu
Executing changes:
- upload charm cs:ubuntu-12 for series xenial
- deploy application a on xenial using cs:ubuntu-12
- deploy application z on xenial using cs:ubuntu-12
- add new machine 0
- add unit a/0 to new machine 1
- add unit z/0 to new machine 0
Deploy of bundle completed.
---------------
The above output looks good and makes you think you'll be getting machines 0 and 1. However, status shows that both apps are colocated on 0:
Unit Workload Agent Machine Public address Ports Message
a/0 waiting allocating 0 34.239.108.85 waiting for machine
z/0 waiting allocating 0 34.239.108.85 waiting for machine
Let's do that again, but this time, with the names reversed so 'a' is placed and 'z' is not:
---------------
$ cat test.yaml
series: xenial
applications:
z:
charm: "cs:xenial/ubuntu"
num_units: 1
a:
charm: "cs:xenial/ubuntu"
num_units: 1
to:
- "0"
machines:
"0":
series: "xenial"
$ juju deploy test.yaml
Resolving charm: cs:xenial/ubuntu
Resolving charm: cs:xenial/ubuntu
Executing changes:
- upload charm cs:ubuntu-12 for series xenial
- deploy application a on xenial using cs:ubuntu-12
- deploy application z on xenial using cs:ubuntu-12
- add new machine 0
- add unit a/0 to new machine 0
- add unit z/0 to new machine 1
Deploy of bundle completed.
---------------
Again the output looks good, and this time, status shows each app on a separate machine:
Unit Workload Agent Machine Public address Ports Message
a/0 waiting allocating 0 52.91.88.217 waiting for machine
z/0 waiting allocating 1 54.85.145.142 waiting for machine
Changed in juju: | |
assignee: | nobody → Tim Penhey (thumper) |
tags: | added: 4010 cpe-onsite |
Wow... good catch. Very weird behaviour.