Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Being able to remove dedicated master node tier #463

Closed
kunisen opened this issue Apr 8, 2022 · 3 comments
Closed

Being able to remove dedicated master node tier #463

kunisen opened this issue Apr 8, 2022 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@kunisen
Copy link
Collaborator

kunisen commented Apr 8, 2022

Overview

For example, when configuring more than 6 nodes, the dedicated master nodes will be added automatically.
But it's not possible to remove it via TF config.

Possible Implementation

Testing

Context

Your Environment

@kunisen kunisen added the enhancement New feature or request label Apr 8, 2022
@Kushmaro Kushmaro changed the title Make it possible to submit the whole deployment plan topology to customize the architecture (i.e. add/remove dedicated master noes) Being able to remove dedicated master node tier Apr 11, 2022
@linyaru linyaru added this to the 0.7.0 milestone Sep 26, 2022
@jguay
Copy link

jguay commented Dec 15, 2022

This issue seems duplicated with #343 - can we close this issue ?

@kunisen
Copy link
Collaborator Author

kunisen commented Dec 19, 2022

Thanks @jguay Close it with your comment

@kunisen kunisen closed this as completed Dec 19, 2022
@kunisen
Copy link
Collaborator Author

kunisen commented Dec 19, 2022

FYI, here's the way to repro the issue:

Info

  • Version: tf ec provider 0.5.0

First, create a deployment with the dedicated master node:

# create deployment

terraform {
  required_version = ">= 0.12.29"

  required_providers {
    ec = {
      source  = "elastic/ec"
      version = "0.5.0"
    }
  }
}

provider "ec" {}

resource "ec_deployment" "kuni_tftest" {
  region                 = "ap-northeast-1"
  version                = "7.17.7"
  deployment_template_id = "aws-cpu-optimized-arm" # other arm "aws-general-purpose-arm"
  name                   = "kuni_tftest"

  elasticsearch {
    autoscale = "false"

    topology {
      id            = "hot_content"
      size          = "120g"
      zone_count    = "3"
      size_resource = "memory"
    }

    topology {
      id            = "master"
      size          = "8g"
      zone_count    = "3"
      size_resource = "memory"
    }
  }

  kibana {}

  apm {}

  enterprise_search {}
}

Next, shrink it to a fewer nodes to remove dedicated master node

# dimish deployment
terraform {
  required_version = ">= 0.12.29"

  required_providers {
    ec = {
      source  = "elastic/ec"
      version = "0.5.0"
    }
  }
}

provider "ec" {}

resource "ec_deployment" "kuni_tftest" {
  region                 = "ap-northeast-1"
  version                = "7.17.7"
  deployment_template_id = "aws-cpu-optimized-arm"
  name                   = "kuni_tftest"

  elasticsearch {
    autoscale = "false"

    topology {
      id            = "hot_content"
      size          = "60g"
      zone_count    = "1"
      size_resource = "memory"
    }
  }

  kibana {}

  apm {}

  enterprise_search {}
}

Then the following error will be observed:

ec_deployment.kuni_tftest: Modifying... [id=1d03e500ad81a9550ce7301978f4f48d]
╷
│ Error: failed updating deployment: 1 error occurred:
│ 	* api error: clusters.cluster_invalid_plan: Cluster must contain at least a master topology element and a data topology element. 'master' node type is missing,'master' node type exists in more than one topology element (resources.elasticsearch[0].cluster_topology)
│ 
│ 
│ 
│   with ec_deployment.kuni_tftest,
│   on deployment.tf line 16, in resource "ec_deployment" "kuni_tftest":
│   16: resource "ec_deployment" "kuni_tftest" {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants