由于CPU单元不足和部分时间超时,ECS部署失败



我刚刚使用 pip install ecs-deploy 安装了 ecs-deploy。当我尝试部署时出现错误,例如

我第一次得到:

Deploying based on task definition: task-demo:2
Creating new task definition revision
Successfully created revision: 3
Updating service
Successfully changed task definition to: task-demo:3
Deploying new task definition..........
2020-01-26 14:12:57.563000+00:00
ERROR: (service demo-service) was unable to place a task because no container instance met all of its requirements. The closest matching (container-instance ba93b620-89fa-4970-bf54-535a373d1aba) has insufficient CPU units available. For more information, see the Troubleshooting section of the Amazon ECS Developer Guide.
Deployment failed

从第二次开始:

Deploying based on task definition: task-demo:5
Creating new task definition revision
Successfully created revision: 6
Updating service
Successfully changed task definition to: task-demo:6
Deploying new task definition...................................................................................................................................................................................................................................................................................................
Deployment failed due to timeout. Please see: https://github.com/fabfuel/ecs-deploy#timeout

如果用于任务放置的最匹配的容器实例没有足够的 CPU 单元来满足任务定义的要求,则可能会收到此错误消息。

您需要检查容器实例上的剩余 CPU 单元,并进行调整以满足 CPU 要求。

以下是解决此问题的资源:

https://aws.amazon.com/premiumsupport/knowledge-center/ecs-container-instance-cpu-error/

关于超时问题,请注意,ecs命令的部署和缩放操作允许通过 --timeout 参数定义超时(以秒为单位(。这将指示 ECS 部署在给定的秒数内等待 ECS 完成部署。

请参阅 https://github.com/fabfuel/ecs-deploy#deployment-timeout

首先尝试修复 CPU 问题。超时问题很可能是相关的。

最新更新