Skip to content

Failed deployment of ECS tasks

0

Hello, I have a question about how the ECS task implementation works. In the service definitions, its status shows the number of desired tasks, as configured in the task definition, which is correct.

However, on this day, I'm experiencing a series of problems deploying this service after an update to its task definitions.

According to the ECS update policy, its normal behavior would be to launch two new tasks (200%) and, once they have been correctly deployed and are available for use, it would close the 02 instances with their previous revision index.

What I can't understand is: Having said that, why is ECS only showing 01 task running, if the minimum number of tasks should be respected (02)?

Consider that the customer has not enabled the circuit breaker as deployment failure detection.

The settings defined in “Configuration and networking”, in the service settings, the number of desired tasks, minimum and maximum, are different from what is defined in the Capacity Provider.

If you compare the settings of the Auto Scaling Group associated with the Capacity Provider, the numbers are even more different.

Could someone tell me why this is different and how it takes into account what is defined - whether from the Auto Scaling Group or the Capacity Provider?

Enter image description here Enter image description here Enter image description here Enter image description here Enter image description here Enter image description here Enter image description here

asked 2 years ago388 views

3 Answers
0

Hello Fernando!

The issues you're experiencing with ECS deployments may stem from discrepancies between the service configuration and the settings defined in the Auto Scaling Group (ASG) and Capacity Provider. ECS typically launches the desired number of tasks (in your case, 2) according to the deployment policy. However, if there is a mismatch between the desired tasks and the ASG's minimum/maximum capacity, it could cause ECS to run fewer tasks than expected.

To resolve this, ensure that the desired capacity in your ECS service matches the configuration in your ASG and Capacity Provider. The ASG's capacity should support the number of tasks defined in the ECS service to avoid under-provisioning. Additionally, check that all network and scaling settings are consistent across the service, capacity provider, and ASG.

I'm here to help!

EXPERT

answered 2 years ago

0

Hi, thanks for the feedback.

I understand what you've said, however, these figures often (or almost never) reflect the symmetry between the services (ASG, Tasks and Services), as the demand for each is different.

What I set out to question is that the numbers or values reported there are not configured in any of the declared services - they are not configured in the ASG, Tasks or services.

My question is: where are these values being retrieved from, since they are not the same as those configured in the related services/components?

answered 2 years ago

0

For example, I'm showing the ASG and task logs of another service in the same cluster:

ASG settings:

Enter image description here

Task definitions:

Enter image description here

In the window of the selected service, when you select the tab labeled “Configuration and Networking”, in the section labeled “Auto Scaling”, the values you see are different from the ones I mentioned above:

Enter image description here

I haven't provided an image of the Capacity Provider, because the number of tasks and/or instances is not configured in it.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.