LSHEAP and pipeline workers for virt

This commit is contained in:
m0duspwnens
2024-08-28 10:09:42 -04:00
parent 301894f6e8
commit 9ddccba780
4 changed files with 18 additions and 4 deletions

View File

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

View File

@@ -19,7 +19,7 @@ create_pillar:
NODETYPE: {{ DATA.NODETYPE }}
CORECOUNT: {{ DATA.CORECOUNT }}
LSHOSTNAME: {{ DATA.LSHOSTNAME }}
LSHEAP: {{ DATA.LSHEAP }}
LS_HEAP_SIZE: {{ DATA.LSHEAP }}
CPUCORES: {{ DATA.CPUCORES }}
IDH_MGTRESTRICT: {{ DATA.IDH_MGTRESTRICT }}
IDH_SERVICES: {{ DATA.IDH_SERVICES }}