From c9498452186d645d5ad6afec0ee32623106d0d76 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Wed, 29 Jul 2020 14:20:17 -0400 Subject: [PATCH] only try to upgrade salt on grid if salt upgraded on manager --- salt/common/tools/sbin/soup | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index e7561ecaa..05d934999 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -165,6 +165,7 @@ upgrade_check_salt() { if [ "$INSTALLEDSALTVERSION" == "$NEWSALTVERSION" ]; then echo "You are already running the correct version of Salt for Security Onion." else + SALTUPGRADED = True echo "Performing upgrade of Salt from $INSTALLEDSALTVERSION to $NEWSALTVERSION" echo "" # If CentOS @@ -269,7 +270,10 @@ echo "Running a highstate to complete upgrade" highstate echo "" echo "Upgrade from $INSTALLEDVERSION to $NEWVERSION complete." -echo "" -echo "Upgrading the remaining Security Onion nodes from $INSTALLEDSALTVERSION to $NEWSALTVERSION" -salt -C 'not *_eval and not *_helix and not *_manager and not *_managersearch and not *_standalone' -b $BATCHSIZE state.apply salt.minion -echo "" + +if [ SALTUPGRADED ]; then + echo "" + echo "Upgrading the remaining Security Onion nodes from $INSTALLEDSALTVERSION to $NEWSALTVERSION" + salt -C 'not *_eval and not *_helix and not *_manager and not *_managersearch and not *_standalone' -b $BATCHSIZE state.apply salt.minion + echo "" +fi