diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 84627a4ea..6ff298770 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -246,6 +246,7 @@ postupgrade_changes() { [[ "$POSTVERSION" =~ rc.1 ]] && post_rc1_to_rc2 [[ "$POSTVERSION" == 2.3.20 || "$POSTVERSION" == 2.3.21 ]] && post_2.3.2X_to_2.3.30 + [[ "$POSTVERSION" == 2.3.30 ]] && post_2.3.30_to_2.3.40 } post_rc1_to_2.3.21() { @@ -260,6 +261,13 @@ post_2.3.2X_to_2.3.30() { POSTVERSION=2.3.30 } +post_2.3.30_to_2.3.40() { + so-playbook-sigma-refresh >> /root/soup_playbook_sigma_refresh.log 2>&1 & + so-kibana-space-defaults + POSTVERSION=2.3.40 +} + + rc1_to_rc2() { # Move the static file to global.sls diff --git a/salt/reactor/fleet.sls b/salt/reactor/fleet.sls index bc2131427..cd548e689 100644 --- a/salt/reactor/fleet.sls +++ b/salt/reactor/fleet.sls @@ -89,7 +89,7 @@ def run(): # Update the Fleet host in the static pillar for line in fileinput.input(STATICFILE, inplace=True): - line = re.sub(r'fleet_custom_hostname:.*\n', f"fleet_custom_hostname: {CUSTOMHOSTNAME}", line.rstrip()) + line = re.sub(r'fleet_custom_hostname:.*$', f"fleet_custom_hostname: {CUSTOMHOSTNAME}", line.rstrip()) print(line) return {} diff --git a/setup/so-functions b/setup/so-functions index 73c66c194..29a58e718 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -949,7 +949,7 @@ create_repo() { } detect_cloud() { - echo "Testing if setup is running on a cloud instance..." >> "$setup_log" 2>&1 + echo "Testing if setup is running on a cloud instance..." | tee -a "$setup_log" if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ) || ( dmidecode -s bios-vendor | grep -q Google > /dev/null); then export is_cloud="true"; fi } @@ -1942,7 +1942,7 @@ reset_proxy() { [[ -f /etc/systemd/system/docker.service.d/http-proxy.conf ]] && rm -f /etc/systemd/system/docker.service.d/http-proxy.conf systemctl daemon-reload - command -v docker &> /dev/null && echo "Restarting Docker..." && systemctl restart docker + command -v docker &> /dev/null && echo "Restarting Docker..." | tee -a "$setup_log" && systemctl restart docker [[ -f /root/.docker/config.json ]] && rm -f /root/.docker/config.json diff --git a/setup/so-setup b/setup/so-setup index 6c77fcd5e..82e414ca4 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -361,10 +361,10 @@ percentage=0 echo "Could not install packages required for setup, exiting now." >> "$setup_log" 2>&1 kill -SIGUSR1 "$setup_proc"; exit 1 fi - set_progress_str 99 "Detecting whether setup is running in the cloud." nolog - detect_cloud } | progress '...' +detect_cloud + short_name=$(echo "$HOSTNAME" | awk -F. '{print $1}') MINION_ID=$(echo "${short_name}_${install_type}" | tr '[:upper:]' '[:lower:]') @@ -799,6 +799,9 @@ set_redirect >> $setup_log 2>&1 set_progress_str 70 "$(print_salt_state_apply 'kibana')" salt-call state.apply -l info kibana >> $setup_log 2>&1 + + set_progress_str 70 "Setting up default Space in Kibana" + so-kibana-space-defaults >> $setup_log 2>&1 fi if [[ "$PLAYBOOK" = 1 ]]; then