NETWAYS / NETWAYS/ansible-collection-elasticstack

[Bug]: elasticsearch_heap is ignored unless set to 1 (broken `| bool` gate)

Open
#492 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

breaking-change bug component:elasticsearch
Dominant language
Jinja
Stars
14
Forks
11
Avg merge
1d 47m
Merged PRs (30d)
6

Description

elasticsearch_heap is meant as a string (heap size in GB) in this role, but the when: elasticsearch_heap | bool condition of the Set jvm heap size task in roles/elasticsearch/tasks/main.yml treats it as a boolean. This only works when elasticsearch_heap is 1, or false (to disable): any value >= 2 is interpreted as false, so the task is skipped and the heap is not set.

Solution: introduce a new variable elasticsearch_manage_heap to control whether the heap is managed by the role or by Elasticsearch/the JVM itself. When true, the value of elasticsearch_heap is used.

Relates to #396.

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 in roles/elasticsearch/tasks/main.yml at the Set jvm heap size task and inspect its current condition and the elasticsearch_heap variable. Add the new management control described in the issue so the heap value is used only when management is enabled, and verify that values greater than 1 no longer skip the task.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, elasticsearch
Domain
devops, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.