Bug 733716 - add_package fails with database error
Summary: add_package fails with database error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 28
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-26 15:21 UTC by Preethi Thomas
Modified: 2013-09-09 16:28 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Preethi Thomas 2011-08-26 15:21:49 UTC
Description of problem:


[root@pulp-f15 ~]# pulp-admin repo add_package --id=repo-new  --source=pulp-f14-clone -p pulp-common-0.0.223-4.fc14.noarch.rpm -r
error: operation failed: AttributeError: DepSolver instance has no attribute '_override_sigchecks'


Version-Release number of selected component (if applicable):
[root@pulp-f15 ~]# rpm -q pulp
pulp-0.0.227-1.fc15.noarch

Comment 1 Pradeep Kilambi 2011-08-26 15:28:56 UTC
This is a bug in yum, which was addressed in the lastest yum upstream.. Please update your yum version to latest and retry.

Comment 2 Preethi Thomas 2011-08-26 19:01:10 UTC
I updated yum and now get a database error when trying to run add_package

[root@pulp-f15 ~]# pulp-admin repo add_package --id=repo-new  --source=pulp-f14-clone -p pulp-common-0.0.223-4.fc14.noarch.rpm
error: operation failed: OperationFailure: database error: $or requires nonempty array


From pulp.log

2011-08-26 15:57:47,373 26571:139846304708352: pulp.server.webservices.controllers.services:WARNING: services:141 deprecated DependencyActions.PUT called
2011-08-26 15:57:47,392 26571:139846304708352: pulp.server.webservices.controllers.services:INFO: services:136 Search [{'regex': False, 'checksum_type': 'sha256', 'filename': 'pulp-common-0.0.223-4.fc14.noarch.rpm'}]: package lookup: 0.0011670589447, repo correlation: 0.000870943069458, total: 0.00203800201416
2011-08-26 15:57:47,436 26571:139846039348992: pulp.server.webservices.controllers.services:WARNING: services:141 deprecated DependencyActions.PUT called
2011-08-26 15:57:47,462 26571:139846039348992: pulp.server.webservices.controllers.services:INFO: services:136 Search [{'regex': False, 'checksum_type': 'sha256', 'filename': 'pulp-common-0.0.223-4.fc14.noarch.rpm'}]: package lookup: 0.00144004821777, repo correlation: 0.00134205818176, total: 0.00278210639954
2011-08-26 15:57:47,537 26571:139846304708352: pulp.server.api.package:INFO: package:248  results from depsolver {<YumAvailablePackageSqlite : pulp-common-0.0.223-4.fc14.noarch (0x7f306469be90)>: {('python(abi)', 'EQ', ('0', '2.7', None)): []}}
2011-08-26 15:57:47,621 26571:139846039348992: pulp.server.webservices.controllers.decorators:ERROR: decorators:52 Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 1360, in POST
    return action(id)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 1213, in get_package_by_nvrea
    return self.ok(api.get_packages_by_nvrea(id, data['nvrea']))
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 772, in get_packages_by_nvrea
    result = self.packageapi.or_query(nvreas, restrict_ids=repo_packages)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/package.py", line 320, in or_query
    return list(self.collection.find(q, fields))
  File "/usr/lib64/python2.7/site-packages/pymongo/cursor.py", line 601, in next
    if len(self.__data) or self._refresh():
  File "/usr/lib64/python2.7/site-packages/pymongo/cursor.py", line 564, in _refresh
    self.__query_spec(), self.__fields))
  File "/usr/lib64/python2.7/site-packages/pymongo/cursor.py", line 533, in __send_message
    self.__tz_aware)
  File "/usr/lib64/python2.7/site-packages/pymongo/helpers.py", line 100, in _unpack_response
    error_object["$err"])
OperationFailure: database error: $or requires nonempty array

Comment 3 Pradeep Kilambi 2011-09-09 19:33:21 UTC
fixed! commit bb92932ea8591d8ea6f493dc305c3de4096c1568
$ sudo pulp-admin repo create --id=testsel
Successfully created repository [ testsel ]

$ sudo pulp-admin repo add_package --source=testimport --id=testsel -p acroread-plugin-9.4.2-5.el6.i686.rpm

Following dependencies are suggested. [u'acroread-9.4.2-5.el6.i686.rpm'] 
Would you like us to add these?(Y/N/Q):y
Successfully associated packages [u'acroread-plugin-9.4.2-5.el6.i686', u'acroread-9.4.2-5.el6.i686'] to repo [testsel].
2 packages associated to repo [testsel]

Comment 4 Jeff Ortel 2011-09-14 20:27:06 UTC
build: 0.231

Comment 5 Preethi Thomas 2011-09-19 16:59:13 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.232-1.fc15.noarch

[root@preethi ~]# pulp-admin repo add_package --source=addpackage
Usage: pulp-admin <options> repo add_package <options>

pulp-admin: error: Option --id is required; please see --help
[root@preethi ~]# pulp-admin repo add_package --source=pulp --id=addpackage -p gofer-0.48-3.fc15.noarch.rpm 

Following dependencies are suggested. [u'python-gofer-0.48-3.fc15.noarch.rpm'] 
Would you like us to add these?(Y/N/Q):y
Successfully associated packages [u'gofer-0.48-3.fc15.noarch', u'python-gofer-0.48-3.fc15.noarch'] to repo [addpackage].
2 packages associated to repo [addpackage]

Comment 6 Preethi Thomas 2012-02-24 20:12:52 UTC
Pulp v1.0 is released
Closed Current Release.


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