From 9d2b84818f2b7bb4bd20b601d52aead6653e072b Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 3 Nov 2023 15:00:13 -0400 Subject: [PATCH] apply es and soc states to manager if new search or hn are added --- salt/manager/tools/sbin/so-minion | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/salt/manager/tools/sbin/so-minion b/salt/manager/tools/sbin/so-minion index eca96da5c..1baf88cad 100755 --- a/salt/manager/tools/sbin/so-minion +++ b/salt/manager/tools/sbin/so-minion @@ -631,8 +631,15 @@ if [[ "$OPERATION" == 'add' || "$OPERATION" == 'setup' ]]; then # and they need to wait for ca creation to update the mine updateMine checkMine "network.ip_addrs" + # apply the elasticsearch state to the manager if a new searchnode was added + if [[ "$NODETYPE" == "SEARCHNODE" || "$NODETYPE" == "HEAVYNODE" ]]; then + # calls so-common and set_minionid sets MINIONID to local minion id + set_minionid + salt $MINIONID state.apply elasticsearch queue=True --async + salt $MINIONID state.apply soc queue=True --async + fi # run this async so the cli doesn't wait for a return - salt "$MINION_ID" state.highstate --async + salt "$MINION_ID" state.highstate --async queue=True fi fi