filtering juju status by machine id gives inconsistent results
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
I often find myself running `juju status <id>` to obtain a view of every unit running on a specific machine. This works great, except that it sometimes returns units from unrelated machines. I have not been able to find a pattern to this, sometimes it's `juju status 0` that returns too much, sometimes it's `juju status 8` or some other id.
This can easily be reproduced by deploying basically any model and iterating through all machine ids: several will return too many entries.
For example, in a bionic-queens openstack-on-lxd deployment:
$ juju status 4
Model Controller Cloud/Region Version SLA Timestamp
aieri-openstack lxd localhost/localhost 2.7.0 unsupported 08:35:04Z
App Version Status Scale Charm Store Rev OS Notes
ceph-osd 12.2.12 active 1 ceph-osd jujucharms 294 ubuntu
openstack-dashboard 13.0.2 active 1 openstack-dashboard jujucharms 297 ubuntu
Unit Workload Agent Machine Public address Ports Message
ceph-osd/0* active idle 4 10.0.8.64 Unit is ready (1 OSD)
openstack-
Machine State DNS Inst id Series AZ Message
4 started 10.0.8.64 juju-c3090d-4 bionic Running
21 started 10.0.8.53 juju-c3090d-21 bionic Running
Here are some stats:
$ for i in `seq 0 23`; do juju status $i | grep -A1000 '^Machine' | grep -vE 'Machine|^$' | wc -l; done | sort | uniq -c
17 1
4 2
2 3
1 6
Basically, in my deployment filtering is correct for 17 out of 24 machines, but fails for the remaining 7, which return 2, 3, or even 6 entries.
Here is the worst one:
$ juju status 8
Model Controller Cloud/Region Version SLA Timestamp
aieri-openstack lxd localhost/localhost 2.7.0 unsupported 08:48:18Z
App Version Status Scale Charm Store Rev OS Notes
ceph-radosgw 12.2.12 active 1 ceph-radosgw jujucharms 283 ubuntu
cinder 12.0.7 active 1 cinder jujucharms 297 ubuntu
cinder-ceph 12.0.7 active 0 cinder-ceph jujucharms 251 ubuntu
gnocchi 4.2.5 active 1 gnocchi jujucharms 30 ubuntu
heat 10.0.2 active 1 heat jujucharms 271 ubuntu
nova-cloud-
openstack-dashboard 13.0.2 active 1 openstack-dashboard jujucharms 297 ubuntu
Unit Workload Agent Machine Public address Ports Message
ceph-radosgw/0* active idle 7 10.0.8.37 80/tcp Unit is ready
cinder/0* active idle 8 10.0.8.70 8776/tcp Unit is ready
cinder-ceph/0* active idle 10.0.8.70 Unit is ready
gnocchi/0* active idle 12 10.0.8.42 8041/tcp Unit is ready
heat/0* active idle 13 10.0.8.18 8000/tcp,8004/tcp Unit is ready
nova-cloud-
openstack-
Machine State DNS Inst id Series AZ Message
7 started 10.0.8.37 juju-c3090d-7 bionic Running
8 started 10.0.8.70 juju-c3090d-8 bionic Running
12 started 10.0.8.42 juju-c3090d-12 bionic Running
13 started 10.0.8.18 juju-c3090d-13 bionic Running
19 started 10.0.8.81 juju-c3090d-19 bionic Running
21 started 10.0.8.53 juju-c3090d-21 bionic Running
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Medium |
...sorry for the mangled output. Here it is again in a pastebin: https:/ /pastebin. canonical. com/p/PWfnrkxjV 9/