Usage of 'blocked' status

Mark Shuttleworth mark at ubuntu.com
Thu Oct 6 00:42:32 UTC 2016


Hi folks

Just a reminder to please use 'waiting' for cases where your charm is
waiting for an existing relation to become active, and 'blocked' only
when a human is needed to manipulate the model, for config or relations.
So if your app needs a database, and there is a relation to a database,
but the database is simply not yet 'active', then you are 'waiting' not
'blocked'. If the relation does not exist at all, then fine, you are
blocked, because an operator needs to connect you to a database in the
model. Config could be a reason for being blocked too - if a config is
inconsistent and needs operator intervention, then one is 'blocked' too.

I saw this today:

MODEL  CONTROLLER  CLOUD/REGION         VERSION
hdp    ms-gcp-eu   google/europe-west1  2.0-rc2

APP                   VERSION  STATUS   SCALE  CHARM                
STORE       REV  OS      NOTES
ganglia-node                   unknown      1  ganglia-node         
jujucharms    1  ubuntu 
rsyslog-forwarder-ha           unknown      1  rsyslog-forwarder-ha 
jujucharms    0  ubuntu 
slave                          blocked      1  hadoop-slave         
jujucharms    1  ubuntu 

UNIT                      WORKLOAD  AGENT  MACHINE  PUBLIC-ADDRESS 
PORTS  MESSAGE
slave/2                   blocked   idle   3       
104.155.69.17          missing required namenode and/or resourcemanager
relation
  ganglia-node/1          unknown   idle            104.155.69.17         
  rsyslog-forwarder-ha/1  unknown   idle            104.155.69.17         

MACHINE  STATE    DNS            INS-ID         SERIES  AZ
3        started  104.155.69.17  juju-52a5ca-3  xenial  europe-west1-b

RELATION         PROVIDES              CONSUMES              TYPE
juju-info        client                ganglia-node          subordinate
juju-info        client                rsyslog-forwarder-ha  subordinate
node             ganglia               ganglia-node          regular
juju-info        ganglia-node          slave                 regular
juju-info        namenode              ganglia-node          subordinate
juju-info        namenode              rsyslog-forwarder-ha  subordinate
namenode         namenode              slave                 regular
resourcemanager  resourcemanager       slave                 regular
syslog           rsyslog               rsyslog-forwarder-ha  regular
juju-info        rsyslog-forwarder-ha  slave                 regular
juju-info        slave                 ganglia-node          subordinate
juju-info        slave                 rsyslog-forwarder-ha  subordinate

Clearly the slave/2 unit *does* have the relation, it's just waiting for
its counterparts to come up. So the status should be 'waiting' not blocked.

Mark





More information about the Juju mailing list