Skip to content

Feat/graylog assert#197

Open
ebuerki-lf wants to merge 10 commits intomainfrom
feat/graylog_assert
Open

Feat/graylog assert#197
ebuerki-lf wants to merge 10 commits intomainfrom
feat/graylog_assert

Conversation

@ebuerki-lf
Copy link
Copy Markdown
Contributor

No description provided.

@ebuerki-lf ebuerki-lf marked this pull request as draft February 17, 2026 16:47
@ebuerki-lf ebuerki-lf force-pushed the feat/graylog_assert branch from c0dd49d to aeb2286 Compare March 27, 2026 14:38
@ebuerki-lf ebuerki-lf marked this pull request as ready for review April 13, 2026 10:29
@ebuerki-lf ebuerki-lf force-pushed the feat/graylog_assert branch from 7009d9e to a2dcb75 Compare April 13, 2026 10:51
Copy link
Copy Markdown
Member

@NavidSassan NavidSassan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget to update the CHANGELOG as well

- name: 'Validate that graylog_datanode__node_search_cache_size follows OpenSearch Bytes format'
ansible.builtin.assert:
that:
- 'graylog_datanode__node_search_cache_size | regex_search("^[0-9]+(b|kb|mb|gb|tb|pb)$")'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'graylog_datanode__node_search_cache_size | regex_search("^[0-9]+(b|kb|mb|gb|tb|pb)$")'
- 'graylog_datanode__node_search_cache_size | ansible.builtin.regex_search("^[0-9]+(b|kb|mb|gb|tb|pb)$")'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also please fix the inconsistent indentation

ansible.builtin.assert:
that:
- 'graylog_datanode__node_search_cache_size | regex_search("^[0-9]+(b|kb|mb|gb|tb|pb)$")'
fail_msg: '"{{ graylog_datanode__node_search_cache_size }}" does not follow OpenSearch Bytes format'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fail_msg: '"{{ graylog_datanode__node_search_cache_size }}" does not follow OpenSearch Bytes format'
fail_msg: '`graylog_datanode__node_search_cache_size: {{ graylog_datanode__node_search_cache_size }}` does not follow OpenSearch Bytes format'

graylog_datanode__opensearch_data_location: '/var/lib/graylog-datanode/opensearch/data'
graylog_datanode__opensearch_heap: '{{ [((ansible_facts["memtotal_mb"] * 0.5) | int), 31744] | min }}m'
graylog_datanode__mongodb_uri: 'mongodb://127.0.0.1/graylog'
graylog_datanode__path_repo: []
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use plural for lists.

Suggested change
graylog_datanode__path_repo: []
graylog_datanode__path_repos: []

# indexer_jwt_auth_token_expiration_duration = 180s

opensearch_heap = {{ graylog_datanode__opensearch_heap }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont forget to update the timestamp in the header of the templates

#### Data Tiering Properties

node_search_cache_size = {{ graylog_datanode__node_search_cache_size }}
path_repo = {{ graylog_datanode__path_repo | join(',') }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work if graylog_datanode__path_repo is an empty list?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and is it really comma separated?

Comment on lines +10 to +13
tags:
- 'graylog_server'
- 'graylog_server:configure'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just use the always tag here (see CONTRIBUTING)

Comment on lines +105 to +106
`graylog_datanode__raw`
* Multiline string. Raw content which will be appended to the `datanode.conf` config file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing empty newline

`graylog_datanode__node_search_cache_size`

* Cache size for searchable snaphots. This space will be automatically reserved if `graylog_datanode__path_repo` is configured. See [docs.opensearch.org - Supported Units](https://docs.opensearch.org/latest/api-reference/units/) for a list of possible options.
* Type: String
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a . at the end of the line to be consistent with the roles/example/README.md and the other entries in this file


`graylog_datanode__node_search_cache_size`

* Cache size for searchable snaphots. This space will be automatically reserved if `graylog_datanode__path_repo` is configured. See [docs.opensearch.org - Supported Units](https://docs.opensearch.org/latest/api-reference/units/) for a list of possible options.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace - make sure you have the pre-commit installed!

* Type: String.
* Default: `'mongodb://127.0.0.1/graylog'`

`graylog_datanode__node_search_cache_size`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new variables are missing in the example block at the bottom of this section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants