From 1d9fae304c15f81c3f656ad030b7eb845f8fc0be Mon Sep 17 00:00:00 2001 From: Wes Lambert Date: Thu, 13 Dec 2018 22:01:21 +0000 Subject: [PATCH 1/3] Setup - Get Curator disk size when /nsm not present --- so-setup-network.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/so-setup-network.sh b/so-setup-network.sh index 775207864..af9eed4d6 100644 --- a/so-setup-network.sh +++ b/so-setup-network.sh @@ -449,7 +449,11 @@ get_filesystem_nsm(){ get_log_size_limit() { - DISK_SIZE_K=`df /nsm |grep -v "^Filesystem" | awk '{print $2}'` + DISK_DIR="/" + if [ -d /nsm ]; then + DISK_DIR="/nsm" + fi + DISK_SIZE_K=`df $DISK_DIR |grep -v "^Filesystem" | awk '{print $2}'` PERCENTAGE=85 DISK_SIZE=DISK_SIZE_K*1000 PERCENTAGE_DISK_SPACE=`echo $(($DISK_SIZE*$PERCENTAGE/100))` From a662badc5bd46e914759d6d394420d938c40e4d9 Mon Sep 17 00:00:00 2001 From: Wes Lambert Date: Thu, 13 Dec 2018 23:52:15 +0000 Subject: [PATCH 2/3] Firewall - Fix stuff for sensor --- salt/firewall/init.sls | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/salt/firewall/init.sls b/salt/firewall/init.sls index 34e69739f..18d0c814d 100644 --- a/salt/firewall/init.sls +++ b/salt/firewall/init.sls @@ -1,19 +1,11 @@ # Firewall Magic for the grid - -{% if grains['role'] == 'so-master' or grains['role'] == 'so-eval' %} - +{%- if grains['role'] == 'so-master' or grains['role'] == 'so-eval' %} {%- set ip = salt['pillar.get']('static:masterip', '') %} - -{% elif grains['role'] == 'so-node'%} - +{%- elif grains['role'] == 'so-node' %} {%- set ip = salt['pillar.get']('node:mainip', '') %} - -{% elif grains['role'] == 'so-sensor'%} - -{%- set ip = salt['pillar.get']('node:mainip', '') %} - -{% endif %} - +{%- elif grains['role'] == 'so-sensor' %} +{%- set ip = salt['pillar.get']('sensor:mainip', '') %} +{%- endif %} # Keep localhost in the game iptables_allow_localhost: iptables.append: From 9ce41f81b9d2a7e0326f8c50918e4924930535dc Mon Sep 17 00:00:00 2001 From: Wes Lambert Date: Fri, 14 Dec 2018 00:12:37 +0000 Subject: [PATCH 3/3] Setup - Make sensor minion config consistent --- so-setup-network.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/so-setup-network.sh b/so-setup-network.sh index af9eed4d6..4b1be119a 100644 --- a/so-setup-network.sh +++ b/so-setup-network.sh @@ -1684,7 +1684,7 @@ if (whiptail_you_sure); then sensor_pillar saltify docker_install - configure_minion SENSOR + configure_minion sensor copy_minion_pillar sensors salt_firstcheckin # Accept the Salt Key