opensearch-project / opensearch-project/security-analytics

[BUG] Cluster dead because detector shard stuck initializing

Open
#1,235 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
111
Forks
111
Avg merge
1d 17h
Merged PRs (30d)
13

Description

What is the bug?
Upgraded a cluster from 2.11.1 to 2.15.0 and the cluster is in red status because the .opensearch-sap-network-detectors-queries-000007 shard is stuck initializing.

{
    'current_node': {
        'attributes': {'shard_indexing_pressure_enabled': 'true'},
        'id': 'zLNHMkpeReSxfbVn99y1Sw',
        'name': 'opensearch-node1',
        'transport_address': '172.19.0.3:9300',
    },
    'current_state': 'initializing',
    'explanation': 'the shard is in the process of initializing on node [opensearch-node1], wait until initialization has completed',
    'index': '.opensearch-sap-network-detectors-queries-000007',
    'primary': True,
    'shard': 0,
    'unassigned_info': {
        'at': '2024-07-24T12:00:27.551Z',
        'last_allocation_status': 'throttled',
        'reason': 'CLUSTER_RECOVERED',
    },
}

How can one reproduce the bug?
Steps to reproduce the behavior:
No idea. Create cluster at 2.11, add detection rules, upgrade to 2.15 and observe error.

What is the expected behavior?
My cluster to not die because a stupid feature can't start.
If anomaly detection is broken, then only let that feature be broken, not my entire cluster!!!!!! FFS
Separate user indices from system indices. The fact that this isn't done and that they are treated identical is a super stupid decision.

What is your host/environment?

  • Docker container for 2.15

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by investigating the reported upgrade path from 2.11.1 to 2.15.0 with detection rules and inspect the shard-allocation state for .opensearch-sap-network-detectors-queries-000007. Confirm why the detector shard remains initializing and define completion as the cluster staying available even when this feature cannot start.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.