Bug 250638 - Yum is breaking rhn_check
Summary: Yum is breaking rhn_check
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin
Version: 5.1
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Shannon Hughes
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-02 17:01 UTC by Preethi Thomas
Modified: 2014-01-21 06:10 UTC (History)
3 users (show)

Fixed In Version: RHBA-2007-0594
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-07 17:24:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0594 0 normal SHIPPED_LIVE yum-rhn-plugin bug fix update 2007-10-30 16:22:39 UTC

Description Preethi Thomas 2007-08-02 17:01:31 UTC
Description of problem:
The latest yum build _(yum-3.2.1-4.el5) seems to be breaking rhn_check.
We have tried  rhn_check the previous yum build  and it works.  The
trace back is attached. 

Version-Release number of selected component (if applicable):
Rhel 5.1
yum-3.2.1-4.el5

How reproducible:

always
Steps to Reproduce:
1. Register a Rhel5.1 client to webqa
2. schedule a package install on the client.
3. run rhn_check -vvv
  
Actual results:

exception (see aditional info)

Expected results:
successful package install.

Additional info:
Mon Jul 30 14:56:06 2007] up2date D: check_action {'action': "<?xml
version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>alacarte</string></value>\n<value><string>0.10.0</string></value>\n<value><string>1.fc6</string></value>\n<value><string></string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n",
'version': 2, 'id': 57625154}
[Mon Jul 30 14:56:06 2007] up2date updating login info
[Mon Jul 30 14:56:06 2007] up2date logging into up2date server
[Mon Jul 30 14:56:06 2007] up2date successfully retrieved authentication
token from up2date server
[Mon Jul 30 14:56:06 2007] up2date D: logininfo: {'X-RHN-Server-Id':
1007658916, 'X-RHN-Auth-Server-Time': '1185822804.11', 'X-RHN-Auth':
'xaK9ua0I8EfrT+lw/f7QOA==', 'X-RHN-Auth-Channels':
[['rhel-i386-server-5', '20070726152304', '1', '1'],
['rhn-tools-rhel-i386-server-5', '20070625154343', '0', '1']],
'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
[Mon Jul 30 14:56:06 2007] up2date D: handle_action {'action': "<?xml
version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>alacarte</string></value>\n<value><string>0.10.0</string></value>\n<value><string>1.fc6</string></value>\n<value><string></string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n",
'version': 2, 'id': 57625154}
[Mon Jul 30 14:56:06 2007] up2date D: handle_action actionid = 57625154,
version = 2
[Mon Jul 30 14:56:06 2007] up2date D: do_call packages.update
([['alacarte', '0.10.0', '1.fc6', '']],)
[Mon Jul 30 14:56:06 2007] up2date D: Called update [['alacarte',
'0.10.0', '1.fc6', '']]
[Mon Jul 30 14:56:09 2007] up2date D: Searching for installed package to
remove: ('python', 'i386', '0', '2.4.3', '19.el5')
[Mon Jul 30 14:56:09 2007] up2date D: Found 1 package(s) to remove
[Mon Jul 30 14:56:09 2007] up2date
Traceback (most recent call last):
 File "/usr/sbin/rhn_check", line 273, in __run_action
   (status, message, data) = CheckCli.__do_call(method, params)
 File "/usr/sbin/rhn_check", line 266, in __do_call
   retval = method(*params)
 File "/usr/share/rhn/actions/packages.py", line 217, in update
   return runTransaction(transaction_data)
 File "/usr/share/rhn/actions/packages.py", line 250, in runTransaction
   return _run_yum_action(command)
 File "/usr/share/rhn/actions/packages.py", line 282, in _run_yum_action
   yum_base.buildTransaction()
 File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 527, in
buildTransaction
(rescode, restring) = self.resolveDeps()
 File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 804, in
resolveDeps
   deps = self._mytsCheck()
 File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 774, in
_mytsCheck
   thisneeds = self._checkInstall(txmbr)
 File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 958, in
_checkInstall
   if txmbr.name == dep.name:
exceptions.AttributeError: 'list' object has no attribute 'name'

[Mon Jul 30 14:56:09 2007] up2date D: Sending back response ((6,),
'Fatal error in Python code occured', {})
[Mon Jul 30 14:56:09 2007] up2date D: do_call packages.checkNeedUpdate
('rhnsd=1',)
[Mon Jul 30 14:56:09 2007] up2date D: local action status:  (0, 'rpm
database not modified since last update (or package list recently
updated)', {})

Comment 1 Pradeep Kilambi 2007-08-02 17:26:35 UTC
so in this 

Comment 2 Pradeep Kilambi 2007-08-02 18:07:20 UTC
If we downgrade to 
yum-3.0.1-5.el5
yum-metadata-parser-1.0-8.fc6
yum-updatesd-3.0.1-5.el5

the latest GA everything works fine.. looks like rhn_check as always is passing
in the pkg data as a list, but apparently this has changed in 5.1 yum and its
now expecting a pkg object? 

yum should take into account how rhn_check is passing data and handle the dep
solving appropriately.



Comment 4 James Antill 2007-08-02 19:06:04 UTC
 Maybe, it might be easier to fix rhn_check or action/packages.py

 One thing that stands out in add_transaction_data() in RHN plugin is that
update/install are just passing the keywords for the packages ... but remove
(which I think is the one failing) does calls to rpmdb.returnPackages() and then
yum.packages.parsePackages() and then yum.misc.unique().
 Is there a reason for this?


Comment 5 James Antill 2007-08-02 20:39:31 UTC
 So with lots of thanks to Seth and Pradeep we've found the problem in
yum-rhn-plugin:

 In actions/packages.py we have:

class YumAction(yum.YumBase):
    def getInstalledPackageObject(self, package_tup):

...and this returns a list of package objects, instead of a single package
object or None. The same call in yum itself only returns a single package, and
code relies on that.
 One easy way to fix this is to remove the above function and calling
self.remove(**pkgkeys) like for update/install, the other being to just call it
something else?

Comment 6 James Antill 2007-08-02 20:52:09 UTC
 It's also worth noting that there's a very significant chance we'll move the
yum errata to 5.2.


Comment 7 Pradeep Kilambi 2007-08-03 20:46:15 UTC
fixed
Committed revision 118874.

Comment 10 Preethi Thomas 2007-08-07 19:26:44 UTC
verified

Comment 12 errata-xmlrpc 2007-11-07 17:24:51 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0594.html



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