Bug 730812 - DepSolver object is broken
Summary: DepSolver object is broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 27
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On: 727574 743916
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-15 20:05 UTC by Chris St. Pierre
Modified: 2012-02-24 20:18 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:14:03 UTC


Attachments (Terms of Use)
Patch to fix the described bug (498 bytes, application/octet-stream)
2011-08-15 20:05 UTC, Chris St. Pierre
no flags Details

Description Chris St. Pierre 2011-08-15 20:05:32 UTC
Created attachment 518324 [details]
Patch to fix the described bug

Description of problem:

In the pulp.server.api.depsolver.DepSolver constructor, a yum.repos.RepoStorage object is instantiated as such:

self._repostore = RepoStorage(self)

But the RepoStorage constructor isn't expecting a Pulp DepSolver object; it's expecting a yum.YumBase object.  This doesn't become evident until DepSolver.setup() is called, whereupon the stack trace listed below obtains.


Version-Release number of selected component (if applicable):

0.0.223

How reproducible:

Always

Steps to Reproduce:

1. Attempt to resolve the dependencies of a package:

from pulp.client.api import server
from pulp.client.api.service import ServiceAPI
from pulp.client.consumer.config import ConsumerConfig
from pulp.client.admin.credentials import Login as LoginBundle

config = ConsumerConfig()
pulpserver = server.PulpServer(config.server['host'],
                               int(config.server['port']),
                               config.server['scheme'],
                               config.server['path'])
bundle = LoginBundle()
pulpserver.set_ssl_credentials(bundle.crtpath())
server.set_active_server(pulpserver)

sapi = ServiceAPI()
sapi.dependencies(["perl"], ["centos-5-x86_64-os"], recursive=1)
  
Actual results:

Ugly borkage:

AttributeError: DepSolver instance has no attribute '_override_sigchecks'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/services.py", line 72, in POST
    return self.ok(papi.package_dependency(data[\'pkgnames\'], data[\'repoids\'], recursive=recursive))
  File "/usr/lib/python2.6/site-packages/pulp/server/api/package.py", line 241, in package_dependency
    dsolve = DepSolver(repos, pkgnames)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/depsolver.py", line 38, in __init__
    self.setup()
  File "/usr/lib/python2.6/site-packages/pulp/server/api/depsolver.py", line 49, in setup
    self._repostore.add(self.yrepo)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 113, in add
    repoobj._override_sigchecks = self.ayum._override_sigchecks

Expected results:

Ugly dependency list.

Additional info:

Patch attached.  This at least appears to fix this exact bug, although I've been getting sporadic stack traces of a different nature with it.  That might be user error, though.

Comment 1 Pradeep Kilambi 2011-08-17 18:38:41 UTC
This issue is actually fixed in yum itself. The RepoStorage object is fixed to handle _override_sigchecks. Its waiting on getting upstream in fedora and RHEL-6. We dont want to load the YumBase in pulp's depsolver as that will initialize and load the locally enabled repos from /etc/yum.repo.d which will skew the dep results. Here we only want to load the repos from pulp that were passed and resolve them on the fly.

If this is blocking you, you can grab yum and createrepo from fedora-rawhide, which has this fix. I'm working with yum maintainer to get this upstream asap.

Comment 2 Pradeep Kilambi 2011-08-17 18:45:29 UTC
actually setting it to 'Modified', as its still not live. We'll re-qa it once yum patch is upstream and move it to closed.

Comment 3 Pradeep Kilambi 2011-08-17 19:57:08 UTC
fix is in yum-3.2.29-9.fc15.noarch.rpm

Comment 4 Preethi Thomas 2011-09-02 12:04:37 UTC
verified
[root@preethi ~]# rpm -q yum
yum-3.2.29-9.fc15.noarch

Comment 5 Chris St. Pierre 2011-09-29 11:57:51 UTC
It looks like this fix did not get into RHEL 6.2, so I'm stuck waiting for RHEL 6.3.  That's a long wait for a fairly major piece of functionality in Pulp.  Any chance we could get a workaround for this Yum bug, as the Yum maintainers don't seem particularly motivated to fix it on their end?  Thanks.

Comment 6 Pradeep Kilambi 2011-09-29 13:47:41 UTC
As per 727574 it looks like its ack'ed for 6.2 and verified not sure why it missed, I'll check on this.

Comment 7 Preethi Thomas 2012-02-24 20:14:03 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 8 Preethi Thomas 2012-02-24 20:18:46 UTC
Pulp v1.0 is released.


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