mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-07-24 09:45:40 +02:00
Add default esheap value so nodes highstate without the pillar value
Previously salt/vars/elasticsearch.map.jinja read the elasticsearch heap
size via a raw pillar access (INIT.PILLAR.elasticsearch.esheap). If the
esheap key was missing from a minion pillar, building GLOBALS raised
'dict object has no attribute esheap', cascading into every state that
imports GLOBALS (elasticsearch.enabled, logstash.config, telegraf.config,
etc.) and blocking highstate entirely.
Add an esheap default ('600m', matching the es_heapsize() floor) to
elasticsearch/defaults.yaml and fall back to it via dict .get() so a
missing pillar value degrades gracefully. The per-node pillar value still
wins when present.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
elasticsearch:
|
elasticsearch:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
esheap: '600m'
|
||||||
version: 9.3.7
|
version: 9.3.7
|
||||||
index_clean: true
|
index_clean: true
|
||||||
data_retention_method: DLM
|
data_retention_method: DLM
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{% import 'vars/init.map.jinja' as INIT %}
|
{% import 'vars/init.map.jinja' as INIT %}
|
||||||
|
{% import_yaml 'elasticsearch/defaults.yaml' as ELASTICSEARCHDEFAULTS %}
|
||||||
|
|
||||||
{%
|
{%
|
||||||
set ELASTICSEARCH_GLOBALS = {
|
set ELASTICSEARCH_GLOBALS = {
|
||||||
'elasticsearch': {
|
'elasticsearch': {
|
||||||
'es_cluster_name': INIT.PILLAR.elasticsearch.config.cluster.name,
|
'es_cluster_name': INIT.PILLAR.elasticsearch.config.cluster.name,
|
||||||
'es_heap': INIT.PILLAR.elasticsearch.esheap
|
'es_heap': INIT.PILLAR.elasticsearch.get('esheap', ELASTICSEARCHDEFAULTS.elasticsearch.esheap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|||||||
Reference in New Issue
Block a user