不同的 ECS 停止时间是什么意思?

What do the different ECS stop times mean?

来自 https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Task.html一个任务有多个“停止”时间

stoppedAt

The Unix timestamp for when the task was stopped (the task transitioned from the RUNNING state to the STOPPED state).

stoppingAt

The Unix timestamp for when the task stops (transitions from the RUNNING state to STOPPED).

executionStoppedAt

The Unix timestamp for when the task execution stopped.

这些描述看起来和我很相似。它们分别是什么意思?具体


例如,为最近停止的任务调用 describe-tasks 得到:

"executionStoppedAt": 1568462761.0,
"stoppingAt":         1568462761.499,
"stoppedAt":          1568462817.635,

另一个任务给出了

"executionStoppedAt": 1568464247.0,
"stoppingAt":         1568464246.39,
"stoppedAt":          1568464300.417,

有趣的是,不同的时间并不总是按相同的顺序排列。

如果检查 lifecycle 的 ECS 任务,它包含停止任务之前的完整周期,因为 ECS 代理涉及此生命周期。

生命周期状态 以下是每个任务生命周期状态的描述。

配置

Amazon ECS has to perform additional steps before the task is launched. For example, for tasks that use the awsvpc network mode, the elastic network interface needs to be provisioned.

待定

This is a transition state where Amazon ECS is waiting on the container agent to take further action.

正在激活

Amazon ECS has to perform additional steps after the task is launched but before the task can transition to the RUNNING state. For example, for tasks that have service discovery configured, the service discovery resources must be created. For tasks that are part of a service that is configured to use multiple Elastic Load Balancing target groups, the target group registration occurs during this state.

运行

The task is successfully running.

正在停用

Amazon ECS has to perform additional steps before the task is stopped. For example, for tasks that are part of a service that is configured to use multiple Elastic Load Balancing target groups, the target group deregistration occurs during this state.

正在停止

This is a transition state where Amazon ECS is waiting on the container agent to take further action.

正在取消配置

Amazon ECS has to perform additional steps after the task has stopped but before the task transitions to the STOPPED state. For example, for tasks that use the awsvpc network mode, the elastic network interface needs to be detached and deleted.

已停止

The task has been successfully stopped.