- 单元状态
- 单元状态
单元状态
单元状态
通过单元状态可以了解单元发生了什么。可以使用tsuru app-info -a <appname>
去查看单元状态:
$ tsuru app-info -a tsuru-dashboard
Application: tsuru-dashboard
Repository: git@localhost:tsuru-dashboard.git
Platform: python
...
Units: 1
+------------+---------+
| Unit | State |
+------------+---------+
| 9cf863c2c1 | started |
+------------+---------+
单元的状态流是:
+----------+ start +---------+
| building | +---------------------+| stopped |
+----------+ | +---------+
^ | ^
| | |
deploy unit | stop
| | |
+ v RegisterUnit +
+---------+ app unit +----------+ SetUnitStatus +---------+
| created | +---------> | starting | +-------------> | started |
+---------+ +----------+ +---------+
+ ^ +
| | |
SetUnitStatus | |
| | |
v | |
+-------+ SetUnitStatus | |
| error | +-------------------+ |
+-------+ <---------------------+
created
: 单元的初始状态。building
: 是分配者在分配单元时的状态,比如在部署的过程中。error
: 是因为应用错误单元启动失败时的状态。starting
: 当容器在docker中被启动后,单元的状态。started
: 是单元在启动运行时的情况。stopped
: 单元被停止的情况。
原文: http://doc.oschina.net/tsuru-paas?t=52830