Skip to content

Commit

Permalink
Updated timeout waiting for security update checks
Browse files Browse the repository at this point in the history
Updated the security update timeout (using waitmax) before the logic statement about whether the --security yum feature is enabled. The check was not completing on many servers due to the sheer number of security updates that are required to be processed by yum, and thus the plugin reported "-2" to the check. This gave false results in the check suggesting no updates were available when they are.
  • Loading branch information
swampdogmash authored Feb 8, 2024
1 parent 3cfca8c commit b88fad6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agents/plugins/yum
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ then
fi
UPDATES=$(waitmax 25 /usr/bin/yum -C --noplugins --quiet list updates | grep "\." | cut -d' ' -f1 | wc -l || echo "-1")
# check if --security is available
waitmax 10 /usr/bin/yum -C --noplugins --quiet --security list updates > /dev/null 2>&1
# Updated the timeout for the initial security list validation because it takes longer than 10 seconds on many machines
waitmax 25 /usr/bin/yum -C --noplugins --quiet --security list updates > /dev/null 2>&1
if [ $? -eq 0 ]
then
SECURITY_UPDATES=$(waitmax 25 /usr/bin/yum -C --noplugins --quiet --security list updates | grep "\." | cut -d' ' -f1 | wc -l || echo "-1")
Expand Down

0 comments on commit b88fad6

Please sign in to comment.