Regressed Talisman.wait_for_status() - containers not considered
freeekanayaka opened this issue · comments
It looks like this change has broken deployments that use containers:
For example given this status output like the one below, wait_for_status() will loop forever and eventually timeout, because the line:
machine = status['machines'].get(unit.get('machine'), {})
doesn't take into account the 'containers' sub-tree.
==== status yaml output ====
environment: maas
machines:
"0":
agent-state: started
agent-version: 1.24.6
dns-name: shawmut.scapestack
instance-id: /MAAS/api/1.0/nodes/node-32fdcb12-546c-11e4-b3f2-2c59e54ace74/
series: trusty
containers:
0/lxc/7:
agent-state: started
agent-version: 1.24.6
dns-name: 10.96.5.15
instance-id: juju-machine-0-lxc-7
series: trusty
hardware: arch=amd64
0/lxc/8:
agent-state: started
agent-version: 1.24.6
dns-name: 10.96.5.150
instance-id: juju-machine-0-lxc-8
series: trusty
hardware: arch=amd64
0/lxc/9:
agent-state: started
agent-version: 1.24.6
dns-name: 10.96.9.249
instance-id: juju-machine-0-lxc-9
series: trusty
hardware: arch=amd64
0/lxc/10:
agent-state: started
agent-version: 1.24.6
dns-name: 10.96.9.247
instance-id: juju-machine-0-lxc-10
series: trusty
hardware: arch=amd64
hardware: arch=amd64 cpu-cores=4 mem=16384M tags=ssd
state-server-member-status: has-vote
services:
haproxy:
charm: cs:trusty/haproxy-10
can-upgrade-to: cs:trusty/haproxy-13
exposed: true
service-status:
current: unknown
since: 11 Oct 2015 06:44:39-07:00
relations:
peer:
- haproxy
reverseproxy:
- landscape-server
units:
haproxy/0:
workload-status:
current: unknown
since: 11 Oct 2015 06:44:39-07:00
agent-status:
current: idle
since: 11 Oct 2015 06:46:32-07:00
version: 1.24.6
agent-state: started
agent-version: 1.24.6
machine: 0/lxc/7
open-ports:
- 80/tcp
- 443/tcp
- 10000/tcp
public-address: 10.96.5.15
landscape-server:
charm: local:trusty/landscape-server-5
exposed: false
service-status:
current: unknown
since: 11 Oct 2015 06:46:13-07:00
relations:
amqp:
- rabbitmq-server
db:
- postgresql
website:
- haproxy
units:
landscape-server/0:
workload-status:
current: unknown
since: 11 Oct 2015 06:46:13-07:00
agent-status:
current: idle
since: 11 Oct 2015 06:48:33-07:00
version: 1.24.6
agent-state: started
agent-version: 1.24.6
machine: 0/lxc/8
public-address: 10.96.5.150
postgresql:
charm: cs:trusty/postgresql-27
can-upgrade-to: cs:trusty/postgresql-28
exposed: false
service-status:
current: unknown
since: 11 Oct 2015 06:45:32-07:00
relations:
db-admin:
- landscape-server
replication:
- postgresql
units:
postgresql/0:
workload-status:
current: unknown
since: 11 Oct 2015 06:45:32-07:00
agent-status:
current: idle
since: 11 Oct 2015 06:46:30-07:00
version: 1.24.6
agent-state: started
agent-version: 1.24.6
machine: 0/lxc/9
open-ports:
- 5432/tcp
public-address: 10.96.9.249
rabbitmq-server:
charm: cs:trusty/rabbitmq-server-26
can-upgrade-to: cs:trusty/rabbitmq-server-37
exposed: false
service-status:
current: unknown
since: 11 Oct 2015 06:45:42-07:00
relations:
amqp:
- landscape-server
cluster:
- rabbitmq-server
units:
rabbitmq-server/0:
workload-status:
current: unknown
since: 11 Oct 2015 06:45:42-07:00
agent-status:
current: idle
since: 11 Oct 2015 06:46:43-07:00
version: 1.24.6
agent-state: started
agent-version: 1.24.6
machine: 0/lxc/10
open-ports:
- 5672/tcp
public-address: 10.96.9.247
networks:
maas-br0:
provider-id: maas-br0
cidr: 10.96.0.0/17
provider-cisco1-vlan:
provider-id: provider-cisco1-vlan
cidr: 169.254.0.0/16
provider-osmgmt-flat:
provider-id: provider-osmgmt-flat
cidr: 1.1.1.0/24