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

[Backport 2.17] Update rollover.md #9004

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 9c50165 from #8998.

Option doesn't exist:

```
Could not rollover datastream ds-test1 status code: 400 response: {"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[1:34] [conditions] unknown field [max_primary_shard_size]"}],"type":"x_content_parse_exception","reason":"[1:60] [rollover] failed to parse field [conditions]","caused_by":{"type":"x_content_parse_exception","reason":"[1:34] [conditions] unknown field [max_primary_shard_size]"}},"status":400}
```

```
print(f"Rollover datastream {datastream}")

            body =  {
                "conditions": {
                    "max_age": "5d",
                    "max_primary_shard_size": "50gb"
                }
            }

            response = self.requests.post(f"{self.base_url}/{datastream}/_rollover", json=body)
            if response.status_code == 200:
                print(f"Rollover datastream {datastream} successful")
            else:
                print(f"Could not rollover datastream {datastream} status code: {response.status_code} response: {response.text}")
```

max_size does work.

Signed-off-by: Sander van de Geijn <[email protected]>
(cherry picked from commit 9c50165)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the backport-automerge Added by backport workflow for automerge label Jan 3, 2025
Copy link

github-actions bot commented Jan 3, 2025

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@github-actions github-actions bot merged commit 65049fd into 2.17 Jan 3, 2025
7 checks passed
@github-actions github-actions bot deleted the backport/backport-8998-to-2.17 branch January 3, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-automerge Added by backport workflow for automerge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant