diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 12613bcff..9515c0828 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -266,8 +266,17 @@ check_log_size_limit() { local current_limit echo "getting log_size_limit pillar in check_log_size_limit" - current_limit=$(lookup_pillar "log_size_limit" "elasticsearch") + + # since it is possible for the salt-master service to be stopped when this is run, we need to check the pillar values locally + # we need to combine default local and default pillars before doing this so we can define --pillar-root in salt-call + local epoch_date=$(date +%s%N) + mkdir -p /opt/so/saltstack/soup_tmp_${epoch_date}/ + cp -r /opt/so/saltstack/default/pillar/ /opt/so/saltstack/soup_tmp_${epoch_date}/ + # use \cp here to overwrite any pillar files from default with those in local for the tmp directory + \cp -r /opt/so/saltstack/local/pillar/ /opt/so/saltstack/soup_tmp_${epoch_date}/ + current_limit=$(salt-call pillar.get elasticsearch:log_size_limit --local --pillar-root=/opt/so/saltstack/soup_tmp_${epoch_date}/pillar) echo "found log_size_limit to be $current_limit" + rm -rf /opt/so/saltstack/soup_tmp_${epoch_date}/ local percent case $node_type in