【问题标题】:Ecs deploy fail due to insufficient cpu units and some times time out由于 cpu 单元不足和某些超时,ecs 部署失败
【发布时间】:2020-01-27 02:10:46
【问题描述】:

我刚刚使用 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

【问题讨论】:

  • @Rodrigo M 你能帮忙吗

标签: amazon-web-services amazon-ec2 amazon-ecs


【解决方案1】:

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

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

这是解决此问题的资源:

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

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

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

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

【讨论】:

  • 嗨,我遇到了这个问题,但在一个奇怪的情况下,如果我尝试配置管道以进行自动部署,则会出现该错误,但如果我手动重新启动集群任务(从cluser UI)它运行完美,CPU单元也是正确的......我使用的CPU单元少于我的实例可用的CPU单元总数。这可能与另一个问题有关吗?谢谢
猜你喜欢
  • 2016-07-03
  • 2022-01-19
  • 2021-07-08
  • 2016-05-17
  • 2017-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多