From 6adcb4c968a6459584c0f6f1d4a19f9060b987c2 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 7 Sep 2022 15:38:55 -0400 Subject: [PATCH 1/4] Remove crossthestreams --- salt/utility/init.sls | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/salt/utility/init.sls b/salt/utility/init.sls index a131f0f54..1dec22208 100644 --- a/salt/utility/init.sls +++ b/salt/utility/init.sls @@ -2,17 +2,6 @@ {% if sls in allowed_states %} -# This state is for checking things - {% if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone'] %} -# Make sure Cross Cluster is good. Will need some logic once we have hot/warm -crossclusterson: - cmd.script: - - shell: /bin/bash - - cwd: /opt/so - - source: salt://utility/bin/crossthestreams - - template: jinja - - {% endif %} {% if grains['role'] in ['so-eval', 'so-import'] %} fixsearch: cmd.script: From 6d1bc78f7bf59034b546abd9126756b9b1d7137e Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 7 Sep 2022 15:41:21 -0400 Subject: [PATCH 2/4] Remove crossthestreams --- salt/utility/init.sls | 1 - 1 file changed, 1 deletion(-) diff --git a/salt/utility/init.sls b/salt/utility/init.sls index 1dec22208..7ca841dd3 100644 --- a/salt/utility/init.sls +++ b/salt/utility/init.sls @@ -1,7 +1,6 @@ {% from 'allowed_states.map.jinja' import allowed_states %} {% if sls in allowed_states %} - {% if grains['role'] in ['so-eval', 'so-import'] %} fixsearch: cmd.script: From 5b65fdcc1cdddc878aea21d8050d8316264add88 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 7 Sep 2022 15:42:22 -0400 Subject: [PATCH 3/4] Remove crossthestreams --- salt/utility/bin/crossthestreams | 42 -------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 salt/utility/bin/crossthestreams diff --git a/salt/utility/bin/crossthestreams b/salt/utility/bin/crossthestreams deleted file mode 100644 index 38b7ab09c..000000000 --- a/salt/utility/bin/crossthestreams +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -{% set ES = salt['pillar.get']('global:managerip', '') %} -{% set MANAGER = salt['grains.get']('master') %} -{% set TRUECLUSTER = salt['pillar.get']('elasticsearch:true_cluster', False) %} - -# Wait for ElasticSearch to come up, so that we can query for version infromation -echo -n "Waiting for ElasticSearch..." -COUNT=0 -ELASTICSEARCH_CONNECTED="no" -while [[ "$COUNT" -le 30 ]]; do - curl -K /opt/so/conf/elasticsearch/curl.config -k --output /dev/null --silent --head --fail -L https://{{ ES }}:9200 - if [ $? -eq 0 ]; then - ELASTICSEARCH_CONNECTED="yes" - echo "connected!" - break - else - ((COUNT+=1)) - sleep 1 - echo -n "." - fi -done -if [ "$ELASTICSEARCH_CONNECTED" == "no" ]; then - echo - echo -e "Connection attempt timed out. Unable to connect to ElasticSearch. \nPlease try: \n -checking log(s) in /var/log/elasticsearch/\n -running 'docker ps' \n -running 'sudo so-elastic-restart'" - echo - - exit -fi - -echo "Applying cross cluster search config..." - curl -K /opt/so/conf/elasticsearch/curl.config -s -k -XPUT -L https://{{ ES }}:9200/_cluster/settings \ - -H 'Content-Type: application/json' \ - -d "{\"persistent\": {\"search\": {\"remote\": {\"{{ MANAGER }}\": {\"seeds\": [\"127.0.0.1:9300\"]}}}}}" - -# Add all the search nodes to cross cluster searching. -{%- if TRUECLUSTER is sameas false %} - {%- if salt['pillar.get']('nodestab', {}) %} - {%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %} -curl -K /opt/so/conf/elasticsearch/curl.config -s -k -XPUT -L https://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SN.split('_')|first }}:9300"]}}}}}' - {%- endfor %} - {%- endif %} -{%- endif %} From 39ed582a7242abf8af544dd4f25ddca967bf90ad Mon Sep 17 00:00:00 2001 From: Josh Brower Date: Wed, 7 Sep 2022 15:59:54 -0400 Subject: [PATCH 4/4] Update so-playbook-reset --- salt/common/tools/sbin/so-playbook-reset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-playbook-reset b/salt/common/tools/sbin/so-playbook-reset index 0ece18b54..9907e1807 100755 --- a/salt/common/tools/sbin/so-playbook-reset +++ b/salt/common/tools/sbin/so-playbook-reset @@ -15,4 +15,4 @@ salt-call state.apply playbook.db_init,playbook,playbook.automation_user_create echo "Importing Plays - this will take some time...." sleep 5 -/usr/sbin/so-playbook-ruleupdate +so-playbook-ruleupdate >> /root/setup_playbook_rule_update.log 2>&1 &