change to LSHEAP. LSHOSTNAME from id grain

This commit is contained in:
m0duspwnens
2024-08-28 16:59:24 -04:00
parent 267d1a27ac
commit 0766a5da91

View File

@@ -14,8 +14,7 @@
{% if nodetype == "searchnode" %} {% if nodetype == "searchnode" %}
{# we can't use the host grain here because the grain may not be updated yet from the hostname change #} {% do DATA.update({'LSHOSTNAME': grains.id.split("_") | first}) %}
{% do DATA.update({'LSHOSTNAME': salt['cmd.run']('hostname')}) %}
{# this replicates the function es_heapsize in so-functions #} {# this replicates the function es_heapsize in so-functions #}
{% if total_mem < 8000 %} {% if total_mem < 8000 %}
@@ -33,12 +32,12 @@
{% do DATA.update({'ES_HEAP_SIZE': ES_HEAP_SIZE}) %} {% do DATA.update({'ES_HEAP_SIZE': ES_HEAP_SIZE}) %}
{% if total_mem >= 32000 or nodetype in ['managersearch','heavynode','standalone'] %} {% if total_mem >= 32000 or nodetype in ['managersearch','heavynode','standalone'] %}
{% set LS_HEAP_SIZE="1000m" %} {% set LSHEAP="1000m" %}
{% elif nodetype == 'eval' %} {% elif nodetype == 'eval' %}
{% set LS_HEAP_SIZE="700m" %} {% set LSHEAP="700m" %}
{% else %} {% else %}
{% set LS_HEAP_SIZE="500m" %} {% set LSHEAP="500m" %}
{% endif %} {% endif %}
{% do DATA.update({'LS_HEAP_SIZE': LS_HEAP_SIZE}) %} {% do DATA.update({'LSHEAP': LSHEAP}) %}
{% endif %} {% endif %}