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

[BUG] Index creation fails when index.replication.type is not mentioned while cluster setting cluster.remote_store.enabled is true #9249

Closed
ashking94 opened this issue Aug 11, 2023 · 0 comments · Fixed by #9264
Labels
bug Something isn't working Storage:Durability Issues and PRs related to the durability framework Storage Issues and PRs relating to data and metadata storage v2.10.0

Comments

@ashking94
Copy link
Member

Describe the bug
As the title says, the index creation in a remote store enabled cluster fails when the index.replication.type is not mentioned. The index.replication.type index setting is implied to be SEGMENT when cluster.remote_store.enabled is set to true in opensearch.yml before the bootstrap.

Response when we try to create an index without specifying index.replication.type on a remote enabled cluster -

➜  opensearch curl -X PUT "localhost:9200/test-index?pretty" -H 'Content-Type: application/json' -d'
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 1,
    "index.remote_store.translog.buffer_interval" : "300ms"
  }
}
'
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "To enable index.remote_store.enabled, index.replication.type should be set to SEGMENT"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "To enable index.remote_store.enabled, index.replication.type should be set to SEGMENT"
  },
  "status" : 400
}

To Reproduce
Steps 1 - Update the opensearch.yml with below settings -

  1. cluster.remote_store.enabled=true
  2. cluster.remote_store.segment.repository=<valid_repo>
  3. cluster.remote_store.translog.repository=<valid_repo>

Step 2 - Register the <valid_repo> as mentioned in above step.

Step 3 - Create index as mentioned in Describe the bug section.

Expected behavior
The index creation should pick the SEGMENT replication implicitly and not fail index creation.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@ashking94 ashking94 added bug Something isn't working Storage:Durability Issues and PRs related to the durability framework v2.10.0 Storage Issues and PRs relating to data and metadata storage labels Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Storage:Durability Issues and PRs related to the durability framework Storage Issues and PRs relating to data and metadata storage v2.10.0
Projects
None yet
2 participants