From a485a1f060406e9f2d36483ff1e057fa157a62eb Mon Sep 17 00:00:00 2001 From: Arvinth C <54614142+ArvinthC3000@users.noreply.github.com> Date: Wed, 29 Nov 2023 15:56:07 +0530 Subject: [PATCH] Remvoing config patch for old configs in upgrade and add/remove node (#8296) * Remoing config patch for old configs in upgrade and add/remove node Signed-off-by: Arvinth C * Trigger build Signed-off-by: Arvinth C * Stash for save and sync config for upgrade flow Signed-off-by: Arvinth C * Removing stash Signed-off-by: Arvinth C --------- Signed-off-by: Arvinth C --- components/automate-backend-deployment/habitat/plan.sh | 1 - .../automate-cli/cmd/chef-automate/initConfigHaTmpl.go | 3 +++ .../modules/automate/templates/provision.sh.tpl | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/automate-backend-deployment/habitat/plan.sh b/components/automate-backend-deployment/habitat/plan.sh index 287903d77c6..8da10b6f088 100644 --- a/components/automate-backend-deployment/habitat/plan.sh +++ b/components/automate-backend-deployment/habitat/plan.sh @@ -27,7 +27,6 @@ pkg_deps=( chef/automate-ha-cluster-ctl ) - pkg_build_deps=( core/gcc ) diff --git a/components/automate-cli/cmd/chef-automate/initConfigHaTmpl.go b/components/automate-cli/cmd/chef-automate/initConfigHaTmpl.go index 0e7cf7be73d..3892617199d 100644 --- a/components/automate-cli/cmd/chef-automate/initConfigHaTmpl.go +++ b/components/automate-cli/cmd/chef-automate/initConfigHaTmpl.go @@ -64,6 +64,8 @@ instance_count = "" # automate_setup_type = "automate" # teams_port = "" + +# config_file will be deprecated config_file = "configs/automate.toml" # Set enable_custom_certs = true to provide custom certificates during deployment @@ -396,6 +398,7 @@ instance_count = "" ## === === # teams_port = "" +# config_file will be deprecated config_file = "configs/automate.toml" # Set enable_custom_certs = true to provide custom certificates during deployment diff --git a/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl b/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl index a073ab563da..7f3211db4b6 100644 --- a/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl +++ b/terraform/a2ha-terraform/modules/automate/templates/provision.sh.tpl @@ -294,8 +294,10 @@ if [ -e "/hab/user/deployment-service/config/user.toml" ]; then wait_for_upgrade - echo "Applying /etc/chef-automate/config.toml" - chef-automate config patch /etc/chef-automate/config.toml + # Below command is commented as patch is not required during upgrade and add/remove node + # Also when it is being applied, it was reverting patched configs (automate) to the older ones + # echo "Applying /etc/chef-automate/config.toml" + # chef-automate config patch /etc/chef-automate/config.toml echo "MAINTENANCE MODE OFF" chef-automate maintenance off