Bug 1290952

Summary: mongod throws "too much data for sort()"
Product: Red Hat Satellite Reporter: Taylor Shrauner-Biggs <tbiggs>
Component: Inter Satellite SyncAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.5CC: tbiggs
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-08 18:23:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Taylor Shrauner-Biggs 2015-12-12 01:40:21 UTC
Description of problem:  When running larger katello-disconnected commands (such as sort or publish with 100s of RPM repos), mongod throws this error:

"database error: too much data for sort() with no index.  add an index or specify a smaller limit"

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

pulp-katello-0.5-1.el7sat.noarch
ruby193-rubygem-katello-2.2.0.76-1.el7sat.noarch
katello-utils-2.2.5-1.el7sat.noarch

How reproducible: Usually


Steps to Reproduce:
1.  Import a few hundred large RPM repositories with katello-disconnected.
2.  Run a katello-disconnected publish.
3.  Watch journalctl throw mongod and katello errors similar to above.

Actual results:

"database error: too much data for sort() with no index.  add an index or specify a smaller limit"


Expected results:

No error, complete publishing of all RPMS.

Additional info:

This fixes the issue.  Perhaps it should be added to setup phases of katello (migrate DB)?

[root@host ~]# mongo
MongoDB shell version: 2.4.9
connecting to: test
> use pulp_database
switched to db pulp_database
> db.units_rpm.ensureIndex( { name: 1, epoch: 1, version: 1, release: 1, arch: 1, checksumtype: 1, checksum: 1 } )

Comment 1 Bryan Kearney 2016-02-08 18:23:58 UTC
The katello-disconnected server synchronization and export functions are being moved into the Satellite server itself. With 6.2, the katello-disconnected command will no longer be delivered and instead will be replaced with a new export and import functions delivered via the UI and hammer CLI. This bug is being closed as "WONTFIX" since it relates only to the existing katello-disconnected tooling. Please check the Satellite docs with the release of Satellite 6.2 on how to use the new content export and import features.