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

Doc change: Added troubleshooting section for knife search #8724

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions components/docs-chef-io/content/automate/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,39 @@ max_shards_per_node = 1000
```

Once done, run the chef-automate config patch `</path/to/your-file.toml>` to deploy your change.

## Issue: Knife Search Limits at 10000 Records

### Details

The knife node list and knife node search commands are inconsistent in terms of the number of records they return. Specifically, knife search is limited to a maximum of **10000** records by default.

### Fixes

This happens because OpenSearch, by default, limits the maximum number of records (or documents) returned in a single query to **10000**. This is a safeguard to prevent large queries from overloading the system. If you are trying to retrieve more than **10000** records, this approach will do that.

Change the max_result_window to accommodate more than **10000** records.

```bash
curl -XPUT "http://127.0.0.1:10144/chef/_settings" \
-d '{
"index": {
"max_result_window": 50000
}
}' \
-H "Content-Type: application/json"
```
Changes can be verified by doing:

```bash
curl http://127.0.0.1:10144/_settings?pretty
```

To set the value of tracking total hits in OpenSearch, patch the following configuration in the `.toml` file.

```bash
[erchef.v1.sys.index]
track_total_hits = true
```

Once done, run the chef-automate config patch `</path/to/your-file.toml>` to deploy your change.
Loading