Unit states
The unit status is the way to know what is happening with a unit. You can use the tsuru app info -a <appname> to see the unit status:
$ tsuru app info -a tsuru-dashboard
Application: tsuru-dashboard
Platform: python
...
Units: 1
+---------------------------------------+-------+
| Unit | State |
+------------------------------------- -+-------+
| tsuru-dashboard-web-9cf863c2c1-63c2c1 | ready |
+---------------------------------------+-------+
The unit state flow is:
+----------+ start +---------+
| building | +---------------------+| stopped |
+----------+ | +---------+
^ | ^
| | |
deploy | stop
| | |
+ assigned v +
+---------+ to node +----------+ +---------+ healthcheck ok +-------+
| created | +---------> | starting | +-------------> | started | +---------------> | ready |
+---------+ +----------+ +---------+ +-------+
+ ^ +
| | |
| | |
| | |
v | |
+-------+ | |
| error | +-------------------+ |
+-------+ <---------------------+
created: is the initial status of an unit.
building: is the status for units being provisioned by the provisioner, like during deployment.
error: is the status for units that failed to start, because of an application error.
starting: is set when the container is started in docker.
started: is for cases where the unit is up and running.
ready: is for cases where the unit is up and running and healthcheck is working.
stopped: is for cases where the unit has been stopped.