-
Notifications
You must be signed in to change notification settings - Fork 60
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
[BUG] Terraform apply fails when index is created and configured to use ISM rollover policy #83
Comments
Hey @sharathganga I assume you are using the latest version of the provider https://registry.terraform.io/providers/opensearch-project/opensearch/2.0.0 |
@prudhvigodithi I'm using the provider version 1.0.0. |
@sharathganga @prudhvigodithi once the rollover happens, the index created using terraform will no longer have is_write_index true, using plan and apply again will throw the more than one write index error. ignore_changes can be used to ignore the changes. |
Hey @rblcoder can you please take a look at the provider code to make this change? Please let me know I can assign this bug to you. |
@rblcoder, I've already tried using lifecycle policy with |
The following steps work for me - |
@rblcoder , I'm using AWS Opensearch 1.3 and provider version 1.0.0. When I tried using the provider version 2.0.0, it gave me a different error while creating
|
Can you please try with index specified as follows?
|
@rblcoder |
We've just migrated from phillbaker's project to this project and started facing the same issue. At phillbaker's library, this fix has been implemented for following the write index from ISM/ILM. |
@malaquf We have specified
for number_of_replicas |
Interesting, in our case, we do have number_of_replicas specified, and we still face the issue. We are on v2.2.1. |
@malaquf I created a policy using Terraform code for the following example Output of GET /log after rollover
|
We migrated from phillbaker's project to this project and after this we started to see this issue as soon as the first index was deleted due to rollover policy. This behavior didn't occur when using phillbaker's project. Is someone still facing this issue? The error is: Our Terraform code is:
|
i'd like to see that implemented. or any other solution |
What is the bug?
I've created an initial index test-logs-000001 which has
is_write_index = true
property set and this index is managed byopensearch_index_template
resource and configured to rollover using ISM policy resource.But as the rollover occurs, the index test-logs-000002, test-logs-000003...etc, the latest index becomes the write enabled index, and so when I subsequently run terraform plan and apply, it throws the error as below:
Error: elastic: Error 500 (Internal Server Error): alias [test-logs] has more than one write index [test-logs-000001,test-logs-00010] [type=illegal_state_exception]
How can one reproduce the bug?
is_write_index=true
What is your host/environment?
The text was updated successfully, but these errors were encountered: