Red Hat Bugzilla – Bug 861251
please backport YUM’s --setopt=exit_on_lock=true feature
Last modified: 2014-01-21 01:25:35 EST
I'm currently maintaining check_yum which is THE Nagios/Icinga check for the YUM package update status.
A rather important feature of check_yum is its "--no-warn-on-lock" option, which makes that invocations of check_yum that fail (due to an already running/blocking YUM) are ignored.
Otherwise one would get many false positives.
Now the thing is that (since some time?) YUM blocks, when another YUM process is already running (which is undesired for check_yum, as it will run into a timeout, which must be considered an error).
Now recent yum versions support a feature (--setopt=exit_on_lock=true) which makes YUM exit, when the lock cannot be gained.
In a thread on yum-devel, James Antill suggested me that it should be very easy to backport that feature for RHEL5 and that I should ask here for it.
RHEL-6 already has exit_on_lock, RHEL-5 is unlikely to get any backported features at this point.