Bug 440047

Summary: The yum-updatesd package included with yum in RHEL5 causes python stack trace when GetUpdateInfo is called and no updates are available.
Product: Red Hat Enterprise Linux 5 Reporter: Jason Smith <smithj4>
Component: yum-updatesdAssignee: James Antill <james.antill>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-03 06:26:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jason Smith 2008-04-01 14:46:30 UTC
Description of problem:
We are using a nagios plugin to monitor yum updates that apply to all of our
RHEL5 servers, among many other things that it monitors.  This plugin is written
in perl and uses the Net::DBus module from CPAN to get the update data from
dbus.  This works perfectly if there are updates, but when there are no updates
available, the empty list returned from yum-updatesd causes the script to
terminate with a python stack trace from dbus, instead of returning an empty
list to the script.

Version-Release number of selected component (if applicable):
yum-updatesd-3.0.1-5.el5

How reproducible:
Always.

Steps to Reproduce:
1. Install Net::DBus from CPAN:
http://search.cpan.org/~danberr/Net-DBus-0.33.6/

2. Run this example perl script to see the problem:
perl -MNet::DBus -e '$db=Net::DBus->system;
$s=$db->get_service("edu.duke.linux.yum"); $o=$s->get_object("/Updatesd");
@u=$o->GetUpdateInfo'

3. The last method called, GetUpdateInfo produces the following stack trace,
only when there are no updates that apply.  If there are updates then a list is
returned with the correct package update data, like it is supposed to do:

org.freedesktop.DBus.Python.exceptions.IndexError: Traceback (most recent call
last):
  File "/usr/lib64/python2.4/site-packages/dbus/service.py", line 341, in
_message_cb
    _method_reply_return(connection, message, method_name, signature, *retval)
  File "/usr/lib64/python2.4/site-packages/dbus/service.py", line 162, in
_method_reply_return
    iter.append(value)
  File "dbus_bindings.pyx", line 1081, in dbus_bindings.MessageIter.append
  File "dbus_bindings.pyx", line 1305, in dbus_bindings.MessageIter.append_array
IndexError: list index out of range

Additional info:
I tried various things and by updating the the version of the yum-updatesd
package to a more recent version (I chose the one that comes with Fedora 8 just
for testing, yum-updatesd-0.9-1) the problem went away.  Can the version of
yum-updatesd that ships with RHEL5 be updated to correct this problem?  It would
also be nice if you could include the perl-Net-DBus package in future versions
of RHEL.

Thanks,
~Jason

Comment 1 James Antill 2008-04-01 15:26:26 UTC
 There is a "completely new" yum-updatesd currently as a 5.2 errata, based on
the Fedora-8 version ... so I assume this will go away in RHEL-5.2


Comment 2 Jason Smith 2008-04-01 19:57:17 UTC
Thanks for the quick response, I will update this ticket after 5.2 is released
and I test it out.  Any idea when it will be released?  Soon or is it still
going through QA and its release is unknown?

Thanks,
~Jason


Comment 3 James Antill 2008-04-01 20:11:09 UTC
 For release information like that you should contact your RH representative ...
you should also be able to get early access to the Beta code.


Comment 4 Lubomir Rintel 2008-06-25 06:30:07 UTC
Works fine on 5.2 for me.

Comment 5 Jason Smith 2008-07-08 14:52:22 UTC
Works for me also now, looks like it was fixed in the update to RHEL 5.2
(yum-updatesd-0.9-2.el5).

Thanks,
~Jason