Repository navigation
Disable ECS AZ rebalancing so binpack placement applies - #264
Merged
Merged
Conversation
Contributor
|
Terraform plan in terraform Plan: 0 to add, 10 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~ update in-place
Terraform will perform the following actions:
# module.civic-tech-index.module.backend_prod_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/civic-tech-index-backend-prod"
name = "civic-tech-index-backend-prod"
tags = {
"project" = "civic-tech-index"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.civic-tech-index.module.backend_stage_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/civic-tech-index-backend-stage"
name = "civic-tech-index-backend-stage"
tags = {
"project" = "civic-tech-index"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/civic-tech-jobs-fullstack-stage"
name = "civic-tech-jobs-fullstack-stage"
tags = {
"project" = "civic-tech-jobs"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.home-unite-us.module.prod_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/home-unite-us-fullstack-prod"
name = "home-unite-us-fullstack-prod"
tags = {
"project" = "home-unite-us"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.home-unite-us.module.qa_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/home-unite-us-fullstack-qa"
name = "home-unite-us-fullstack-qa"
tags = {
"project" = "home-unite-us"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.people-depot.module.backend_dev_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/people-depot-backend-dev"
name = "people-depot-backend-dev"
tags = {
"project" = "people-depot"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.vrms.module.backend_dev_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-backend-dev"
name = "vrms-backend-dev"
tags = {
"project" = "vrms"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.vrms.module.backend_prod_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-backend-prod"
name = "vrms-backend-prod"
tags = {
"project" = "vrms"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.vrms.module.frontend_dev_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-frontend-dev"
name = "vrms-frontend-dev"
tags = {
"project" = "vrms"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
# module.vrms.module.frontend_prod_service.aws_ecs_service.fargate[0] will be updated in-place
!~ resource "aws_ecs_service" "fargate" {
!~ availability_zone_rebalancing = "ENABLED" -> "DISABLED"
id = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-frontend-prod"
name = "vrms-frontend-prod"
tags = {
"project" = "vrms"
}
# (18 unchanged attributes hidden)
!~ ordered_placement_strategy {
!~ field = "attribute:ecs.availability-zone" -> "memory"
!~ type = "spread" -> "binpack"
}
- ordered_placement_strategy {
- field = "instanceId" -> null
- type = "spread" -> null
}
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 10 to change, 0 to destroy.✅ Plan applied in Terraform apply (OIDC) #105 |
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #255. Fixes the failed apply from #263.
#263's apply rejected all ten ECS service updates: "Availability Zone Rebalancing only supports availability zone spread as task placement strategy." Every service has AZ rebalancing enabled, which allows only AZ-spread placement, so the new
binpackwas refused. The launch template change in the same apply succeeded (version 10,t3a.medium). The services were left untouched and still serve normally.This sets
availability_zone_rebalancing = "DISABLED"onaws_ecs_service. The cluster is one host in one Availability Zone, so there is nothing to rebalance across. Comments that cited AZ rebalancing as the reasondeployment_maximum_percentstays at 200 now give the real reason: production starts its new task before stopping the old one.Expected plan: 0 to add, 10 to change, 0 to destroy. Each ECS service is updated in place, with
availability_zone_rebalancinggoing toDISABLEDand the placement strategy going tobinpackonmemory.The provider sends both changes in one
UpdateServicecall. If ECS still rejects the placement because rebalancing has to be off first, the apply fails the same harmless way as #263's, and the fallback is a PR that changes only the rebalancing setting.