My ECS cluster is stuck in “The specified cluster is in a busy state. Cluster attachments must be in UPDATE_COMPLETE or UPDATE_FAILED state before they can be updated. Wait and try again.” for 2 days.
I tried to make some changes in the capacity provider, which seems to have brought the entire cluster into a stuck “updating” state.
I've read a few answers here that indicate that this would fix itself within a few minutes or hours, but nothing seems to be happening.
When I run aws ecs describe-clusters --clusters <redacted_cluster_arn> --include ATTACHMENTS --query clusters\[\].attachmentsStatus
I get:
[
"UPDATE_IN_PROGRESS"
]
This cluster has no services or tasks. I tried removing everything – registered instances, ASG, services, to no avail. At this point, I'd just like to delete the cluster but can't. Can someone point me in the right direction to erase these blocked resources from my organisation?
Update: here is the cluster description
{
"clusters": [
{
"clusterArn": [REDACTED],
"clusterName": "ecs-cluster-name",
"status": "ACTIVE",
"registeredContainerInstancesCount": 0,
"runningTasksCount": 0,
"pendingTasksCount": 0,
"activeServicesCount": 0,
"statistics": [],
"tags": [],
"settings": [],
"capacityProviders": [
"cp-external-ecs"
],
"defaultCapacityProviderStrategy": [],
"attachments": [
{
"id": [REDACTED],
"type": "as_policy",
"status": "CREATED",
"details": [
{
"name": "capacityProviderName",
"value": "cp-external-ecs"
},
{
"name": "scalingPolicyName",
"value": "ECSManagedAutoScalingPolicy-[REDACTED]"
}
]
}
],
"attachmentsStatus": "UPDATE_IN_PROGRESS"
}
],
"failures": []
}
Hi! Thank you for the quick answer. I have not, I have created it using Terraform, and unfortunately I do not see it in CloudFormation.
Is it also not possible to delete a cluster from the AWS CLI? https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/delete-cluster.html
I've also tried the AWS CLI, I get the "UpdateInProgressException. Wait and try again”. There is an answer that mentions this, but I do not seem to be the first person with this issue since there is an unanswered follow-up question where this state never updates: https://repost.aws/knowledge-center/ecs-capacity-provider-create-update#COLRuAtah4QviY-0HRY6sj9w
It seems that the capacity provider is linked to the cluster, but is it not possible to delete the capacity provider? https://repost.aws/knowledge-center/ecs-capacity-provider-error
That is correct Riku, thank you very much for the comments. The capacity provider is linked to the cluster, but cannot be updated/modified/deleted since the cluster is stuck. I've read some suggestions that this might happen when "FARGATE" and "FARGATE_SPOT" are not in the list of capacity providers. I've tried to add/modify the list of cluster capacity providers, but the cluster state blocks every attempt.