This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 440047 - The yum-updatesd package included with yum in RHEL5 causes python stack trace when GetUpdateInfo is called and no updates are available.
The yum-updatesd package included with yum in RHEL5 causes python stack trace...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-updatesd (Show other bugs)
5.1
All Linux
low Severity high
: rc
: ---
Assigned To: James Antill
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-01 10:46 EDT by Jason Smith
Modified: 2008-12-03 01:26 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-03 01:26:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jason Smith 2008-04-01 10:46:30 EDT
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 11:26:26 EDT
 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 15:57:17 EDT
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 16:11:09 EDT
 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 02:30:07 EDT
Works fine on 5.2 for me.
Comment 5 Jason Smith 2008-07-08 10:52:22 EDT
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

Note You need to log in before you can comment on or make changes to this bug.