mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Extend template loading to 24 attempts and a total of ~2 minutes
This commit is contained in:
@@ -50,7 +50,7 @@ if [ ! -f /opt/so/state/estemplates.txt ]; then
|
|||||||
for i in *; do
|
for i in *; do
|
||||||
TEMPLATE=$(echo $i | cut -d '.' -f1)
|
TEMPLATE=$(echo $i | cut -d '.' -f1)
|
||||||
echo "$TEMPLATE-mappings"
|
echo "$TEMPLATE-mappings"
|
||||||
retry 5 5 "so-elasticsearch-query _component_template/${TEMPLATE}-mappings -d@$i -XPUT | grep '{\"acknowledged\":true}'" || fail "Could not load template: $TEMPLATE-mappings"
|
retry 24 5 "so-elasticsearch-query _component_template/${TEMPLATE}-mappings -d@$i -XPUT | grep '{\"acknowledged\":true}'" || fail "Could not load template: $TEMPLATE-mappings"
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ if [ ! -f /opt/so/state/estemplates.txt ]; then
|
|||||||
for i in $component_pattern; do
|
for i in $component_pattern; do
|
||||||
TEMPLATE=${i::-5}
|
TEMPLATE=${i::-5}
|
||||||
echo "$TEMPLATE"
|
echo "$TEMPLATE"
|
||||||
retry 5 5 "so-elasticsearch-query _component_template/$TEMPLATE -d@$i -XPUT | grep '{\"acknowledged\":true}'" || fail "Could not load template: $TEMPLATE"
|
retry 24 5 "so-elasticsearch-query _component_template/$TEMPLATE -d@$i -XPUT | grep '{\"acknowledged\":true}'" || fail "Could not load template: $TEMPLATE"
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ if [ ! -f /opt/so/state/estemplates.txt ]; then
|
|||||||
for i in *; do
|
for i in *; do
|
||||||
TEMPLATE=$(echo $i | cut -d '.' -f1);
|
TEMPLATE=$(echo $i | cut -d '.' -f1);
|
||||||
echo "$TEMPLATE"
|
echo "$TEMPLATE"
|
||||||
retry 5 5 "so-elasticsearch-query _component_template/$TEMPLATE -d@$i -XPUT | grep '{\"acknowledged\":true}'" || fail "Could not load template: $TEMPLATE"
|
retry 24 5 "so-elasticsearch-query _component_template/$TEMPLATE -d@$i -XPUT | grep '{\"acknowledged\":true}'" || fail "Could not load template: $TEMPLATE"
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ if [ ! -f /opt/so/state/estemplates.txt ]; then
|
|||||||
for i in $pattern; do
|
for i in $pattern; do
|
||||||
TEMPLATE=${i::-14}
|
TEMPLATE=${i::-14}
|
||||||
echo "$TEMPLATE"
|
echo "$TEMPLATE"
|
||||||
retry 5 5 "so-elasticsearch-query _index_template/$TEMPLATE -d@$i -XPUT | grep '{\"acknowledged\":true}'" || fail "Could not load template: $TEMPLATE"
|
retry 24 5 "so-elasticsearch-query _index_template/$TEMPLATE -d@$i -XPUT | grep '{\"acknowledged\":true}'" || fail "Could not load template: $TEMPLATE"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
{% if GLOBALS.role == 'so-heavynode' %}
|
{% if GLOBALS.role == 'so-heavynode' %}
|
||||||
|
|||||||
Reference in New Issue
Block a user