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] OpenSearch sink is not resuming after failures #4932

Open
dlvenable opened this issue Sep 10, 2024 · 2 comments
Open

[BUG] OpenSearch sink is not resuming after failures #4932

dlvenable opened this issue Sep 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dlvenable
Copy link
Member

Describe the bug

We have noticed that failures writing to the OpenSearch sink may result in the opensearch sink failing to continue to write, even after the issue is resolved.

To Reproduce

  1. Create this pipeline
opensearch-retry-pipeline:
  workers: 2
  delay: 100
  source:
    http:

  sink:
    - opensearch:
        hosts: [ "https://opensearch:9200" ]
        insecure: true
        username: admin
        password: admin
        index: test_forbidden
  1. Write a message.
curl http://localhost:2021/log/ingest -X POST -H 'Content-Type: application/json' -d '[{"test": "hello"}]'
  1. Search - the new document is available
GET test_forbidden/_search
{
  "query": {
    "match_all": {}
  }
}
  1. Add a write block
PUT test_forbidden/_block/write?timeout=30m
  1. Write more messages
curl http://localhost:2021/log/ingest -X POST -H 'Content-Type: application/json' -d '[{"test": "hello2"}]'
curl http://localhost:2021/log/ingest -X POST -H 'Content-Type: application/json' -d '[{"test": "hello3"}]'
curl http://localhost:2021/log/ingest -X POST -H 'Content-Type: application/json' -d '[{"test": "hello4"}]'
  1. Search - no new documents
GET test_forbidden/_search
{
  "query": {
    "match_all": {}
  }
}

Also, see Data Prepper logs

data-prepper           | 2024-09-10T18:24:11,693 [opensearch-retry-pipeline-sink-worker-2-thread-2] WARN  org.opensearch.dataprepper.plugins.sink.opensearch.BulkRetryStrategy - operation = Index, error = index [test_forbidden] blocked by: [FORBIDDEN/8/index write (api)];
  1. Remove the write block
PUT test_forbidden/_settings
{
  "index.blocks.read_only_allow_delete": null
}
  1. Search
GET test_forbidden/_search
{
  "query": {
    "match_all": {}
  }
}

At this point, we should see new documents. But, they are not present.

Expected behavior

At step 8, we should see the documents.

Environment (please complete the following information):

Data Prepper 2.9.0

@dlvenable dlvenable added bug Something isn't working untriaged and removed untriaged labels Sep 10, 2024
@kkondaka
Copy link
Collaborator

I have investigated this. And made the "timeout" just 5m and also issued

PUT test_forbidden/_settings
{
  "index.blocks.read_only_allow_delete": null
}

But the write is not returning success. Is the command to enable writing back correct? I know that Opensearch sink is retrying but failing with the same error. It doesn't look like the issue is with the sink

@kkondaka
Copy link
Collaborator

kkondaka commented Oct 7, 2024

I think the command to turn off the block is

PUT test_forbidden/_settings
{
  "index.blocks.write": false
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants