From 8faf7665eaa2c80f7cb58cfc04cd699012bccd73 Mon Sep 17 00:00:00 2001 From: Aylei Date: Fri, 18 Oct 2019 21:03:25 +0800 Subject: [PATCH] Suspend ReplaceUnhealthy process for AWS tikv auto-scaling-group (#1014) * Suspend process for AWS tikv auto-scaling-group * Suspend ReplaceUnhealthy process for AWS tikv auto-scaling-group * Revert variables.tf Signed-off-by: Aylei --- deploy/modules/aws/tidb-cluster/local.tf | 1 + deploy/modules/aws/tidb-cluster/workers.tf | 1 + 2 files changed, 2 insertions(+) diff --git a/deploy/modules/aws/tidb-cluster/local.tf b/deploy/modules/aws/tidb-cluster/local.tf index 7a92d2a75f..0b96c67937 100644 --- a/deploy/modules/aws/tidb-cluster/local.tf +++ b/deploy/modules/aws/tidb-cluster/local.tf @@ -74,6 +74,7 @@ locals { asg_max_size = var.tikv_count + 2 pre_userdata = file("${path.module}/pre_userdata") # additional_userdata = file("userdata.sh") + suspended_processes = ["ReplaceUnhealthy"] }, { name = "${var.cluster_name}-tidb" diff --git a/deploy/modules/aws/tidb-cluster/workers.tf b/deploy/modules/aws/tidb-cluster/workers.tf index 1fab065160..4c02e9cdb8 100644 --- a/deploy/modules/aws/tidb-cluster/workers.tf +++ b/deploy/modules/aws/tidb-cluster/workers.tf @@ -29,6 +29,7 @@ resource "aws_autoscaling_group" "workers" { protect_from_scale_in = false count = local.worker_group_count placement_group = "" # The name of the placement group into which to launch the instances, if any. + suspended_processes = lookup(local.tidb_cluster_worker_groups[count.index], "suspended_processes", []) tags = concat( [