Compare commits

..
+1 -13
View File
@@ -5,7 +5,6 @@
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
. /usr/sbin/so-image-common
@@ -17,6 +16,7 @@ INSTALLEDVERSION=$(cat /etc/soversion)
# not finish its post-upgrade steps; its contents are the resume point. It is read
# here before preupgrade_changes mutates INSTALLEDVERSION and before any highstate
# stamps /etc/soversion from the pillar.
POSTVERSION_FILE=/etc/sopostversion
if [ -f "$POSTVERSION_FILE" ]; then
@@ -55,7 +55,6 @@ fi
# used to display messages to the user at the end of soup
declare -a FINAL_MESSAGE_QUEUE=()
SOUP_ERR_CONTEXT=
TELEGRAF_REPAIR_RAN=
check_err() {
@@ -1064,17 +1063,6 @@ up_to_3.3.0() {
}
telegraf_repair() {
# post_to_3.3.0 and post_to_3.5.0 both call this; run it once per soup.
[[ -n "$TELEGRAF_REPAIR_RAN" ]] && return 0
TELEGRAF_REPAIR_RAN=true
local output
output=$(salt-call pillar.get telegraf:output --out=newline_values_only)
output=$(tr -d '[:space:]' <<<"$output" | tr '[:lower:]' '[:upper:]')
output=${output:-INFLUXDB}
case "$output" in
POSTGRES|BOTH) ;;
*) return 0 ;;
esac
# Only grids whose Telegraf partitions stalled need this; --check exits 1
# when there is something to repair, so everyone else is left alone.
local repair=/usr/sbin/so-telegraf-repair