diff --git a/salt/setup/virt/soinstall.map.jinja b/salt/setup/virt/soinstall.map.jinja index a589250df..566b27445 100644 --- a/salt/setup/virt/soinstall.map.jinja +++ b/salt/setup/virt/soinstall.map.jinja @@ -14,8 +14,7 @@ {% 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': salt['cmd.run']('hostname')}) %} +{% do DATA.update({'LSHOSTNAME': grains.id.split("_") | first}) %} {# this replicates the function es_heapsize in so-functions #} {% if total_mem < 8000 %} @@ -33,12 +32,12 @@ {% do DATA.update({'ES_HEAP_SIZE': ES_HEAP_SIZE}) %} {% if total_mem >= 32000 or nodetype in ['managersearch','heavynode','standalone'] %} -{% set LS_HEAP_SIZE="1000m" %} +{% set LSHEAP="1000m" %} {% elif nodetype == 'eval' %} -{% set LS_HEAP_SIZE="700m" %} +{% set LSHEAP="700m" %} {% else %} -{% set LS_HEAP_SIZE="500m" %} +{% set LSHEAP="500m" %} {% endif %} -{% do DATA.update({'LS_HEAP_SIZE': LS_HEAP_SIZE}) %} +{% do DATA.update({'LSHEAP': LSHEAP}) %} {% endif %}