Rename so-grid-highstate to so-soup-grid-highstate

This commit is contained in:
Josh Patterson
2026-08-11 10:12:40 -04:00
parent a87a910585
commit 7400e3dffa
4 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ logrotate:
- extension .log
- dateext
- dateyesterday
/opt/so/log/salt/so-grid-highstate:
/opt/so/log/salt/so-soup-grid-highstate:
- daily
- rotate 14
- missingok
+2 -2
View File
@@ -140,9 +140,9 @@ logrotate:
multiline: True
global: True
forcedType: "[]string"
"/opt/so/log/salt/so-grid-highstate":
"/opt/so/log/salt/so-soup-grid-highstate":
description: List of logrotate options for this file.
title: /opt/so/log/salt/so-grid-highstate
title: /opt/so/log/salt/so-soup-grid-highstate
advanced: True
multiline: True
global: True
@@ -5,8 +5,8 @@
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
# so-grid-highstate
# =================
# so-soup-grid-highstate
# ======================
# Drives a batched, role-tiered highstate across every non-manager minion in the
# grid. soup fires this (detached) after it finishes upgrading the manager so the
# rest of the grid converges immediately instead of waiting for its own scheduled
@@ -28,8 +28,8 @@
# This is best-effort: soup has already completed by the time this runs, and the 120-minute
# scheduled highstate remains the backstop for any node that is offline or missed a batch.
LOG_FILE=/opt/so/log/salt/so-grid-highstate
LOCK_FILE=/opt/so/state/so-grid-highstate.lock
LOG_FILE=/opt/so/log/salt/so-soup-grid-highstate
LOCK_FILE=/opt/so/state/so-soup-grid-highstate.lock
SETTLE_MAX_WAIT=${GRID_HIGHSTATE_SETTLE_WAIT:-900} # backstop for the post-salt-upgrade settle loop
SETTLE_INTERVAL=15
SETTLE_STABLE_CHECKS=3
@@ -48,7 +48,7 @@ log() {
}
usage() {
echo "Usage: so-grid-highstate [--batch <spec>] [--batch-wait <sec>] [--salt-upgraded] [--reason <text>]"
echo "Usage: so-soup-grid-highstate [--batch <spec>] [--batch-wait <sec>] [--salt-upgraded] [--reason <text>]"
exit 1
}
@@ -69,7 +69,7 @@ mkdir -p "$(dirname "$LOG_FILE")" "$(dirname "$LOCK_FILE")"
# should not dispatch a competing set of batches.
exec 9>"$LOCK_FILE"
if ! flock -n 9; then
log "another so-grid-highstate is already running (lock $LOCK_FILE held); exiting"
log "another so-soup-grid-highstate is already running (lock $LOCK_FILE held); exiting"
exit 0
fi
+8 -8
View File
@@ -25,7 +25,7 @@ else
fi
INSTALLEDSALTVERSION=$(salt --versions-report | grep Salt: | awk '{print $2}')
# Optional -b override for the grid highstate batch size (a count like "5" or a
# percentage like "25%"). Empty means so-grid-highstate uses the salt:auto_apply:batch
# percentage like "25%"). Empty means so-soup-grid-highstate uses the salt:auto_apply:batch
# pillar default.
BATCHSIZE=
SOUP_LOG=/root/soup.log
@@ -458,13 +458,13 @@ highstate() {
push_grid_highstate() {
# Drive a batched, role-tiered highstate across the rest of the grid so remote minions
# pick up this upgrade now instead of waiting up to ~2.5 hours for their own scheduled
# highstate (the schedule moved from 15 to 120 minutes). so-grid-highstate does the work
# highstate (the schedule moved from 15 to 120 minutes). so-soup-grid-highstate does the work
# via orch.push_batch; it only exists once the manager highstate has deployed this
# version's sbin files, so guard on it. Launch fully detached (setsid) so it survives an
# SSH drop, and never let it affect soup's exit status -- it is best-effort with the
# scheduled highstate as backstop.
if [[ ! -x /usr/sbin/so-grid-highstate ]]; then
echo "so-grid-highstate not present; remote nodes will converge on their scheduled highstate."
if [[ ! -x /usr/sbin/so-soup-grid-highstate ]]; then
echo "so-soup-grid-highstate not present; remote nodes will converge on their scheduled highstate."
return 0
fi
@@ -476,8 +476,8 @@ push_grid_highstate() {
extra_args+=(--batch "$BATCHSIZE")
fi
echo "Dispatching a grid-wide highstate to remote nodes. Progress: /opt/so/log/salt/so-grid-highstate"
setsid nohup /usr/sbin/so-grid-highstate --reason soup "${extra_args[@]}" >/dev/null 2>&1 &
echo "Dispatching a grid-wide highstate to remote nodes. Progress: /opt/so/log/salt/so-soup-grid-highstate"
setsid nohup /usr/sbin/so-soup-grid-highstate --reason soup "${extra_args[@]}" >/dev/null 2>&1 &
}
masterlock() {
@@ -2154,7 +2154,7 @@ main() {
This appears to be a distributed deployment. soup has dispatched a batched, grid-wide highstate to update the other nodes now: Elasticsearch data nodes (search/heavy nodes) first, then receivers, then sensors and the remaining nodes. Progress is logged to /opt/so/log/salt/so-grid-highstate, and you can watch nodes update from the Grid section of SOC. Do not manually restart anything until you know that all the search/heavy nodes in your deployment are updated. This is especially important if you are using true clustering for Elasticsearch.
This appears to be a distributed deployment. soup has dispatched a batched, grid-wide highstate to update the other nodes now: Elasticsearch data nodes (search/heavy nodes) first, then receivers, then sensors and the remaining nodes. Progress is logged to /opt/so/log/salt/so-soup-grid-highstate, and you can watch nodes update from the Grid section of SOC. Do not manually restart anything until you know that all the search/heavy nodes in your deployment are updated. This is especially important if you are using true clustering for Elasticsearch.
Nodes are updated in batches, and things like network bandwidth can be a factor in how long the actual upgrade takes. If you have a heavy node on a slow link, it is going to take a while to get the containers to it. Depending on what changes happened between the versions, Elasticsearch might not be able to talk to said heavy node until the update is complete. Any node that is offline or missed a batch will converge on its own scheduled highstate (every 120 minutes by default).
@@ -2197,7 +2197,7 @@ while getopts ":b:f:y" opt; do
b )
BATCHSIZE="$OPTARG"
# Accept either a plain count (e.g. 5) or a percentage (e.g. 25%); passed through
# to so-grid-highstate --batch, which salt's batch/batch_wait accepts in both forms.
# to so-soup-grid-highstate --batch, which salt's batch/batch_wait accepts in both forms.
if ! [[ "$BATCHSIZE" =~ ^[1-9][0-9]*%?$ ]]; then
echo "Batch size must be a number greater than 0, optionally with a trailing % (e.g. 5 or 25%)."
exit 1