Bug 822620 - spacewalk-repo-sync errors if package already exists in another org
spacewalk-repo-sync errors if package already exists in another org
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Mráka
Red Hat Satellite QA List
: Patch
Depends On:
Blocks: 822621 space18
  Show dependency treegraph
Reported: 2012-05-17 11:52 EDT by Tasos Papaioannou
Modified: 2012-11-01 12:20 EDT (History)
0 users

See Also:
Fixed In Version: spacewalk-backend-1.8.27-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 822621 (view as bug list)
Last Closed: 2012-11-01 12:20:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch for spacewalk-repo-sync query (893 bytes, patch)
2012-05-17 11:52 EDT, Tasos Papaioannou
no flags Details | Diff

  None (edit)
Description Tasos Papaioannou 2012-05-17 11:52:09 EDT
Created attachment 585260 [details]
proposed patch for spacewalk-repo-sync query

Description of problem:

If the same package exists in another organization, then spacewalk-repo-sync will fail to import that package for the currently syncing channel, with an error like the following:

Could not find object [<server.importlib.importLib.IncompletePackage instance; attributes={'package_size': None, 'package_arch_id': 119, 'name': 'fibreutils', 'checksum_list': None, 'md5sum': None, 'org_id': '45', 'epoch': '', 'checksums': {'md5': '668aaed9c017895da3578b4c96634892'}, 'channels': {1945: 'tpapaioa-00589382-rhel6'}, 'nevra_id': 137349, 'package_id': None, 'last_modified': None, 'name_id': 9555, 'version': '3.2', 'checksum': '668aaed9c017895da3578b4c96634892', 'release': '4', 'checksum_type': 'md5', 'arch': 'x86_64', 'evr_id': 30886, 'checksum_id': 7538339}] in table rhnPackage
Sync complete

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


How reproducible:


Steps to Reproduce:
1.) Create channel in org #1, linked to an external yum repo.
2.) Run spacewalk-repo-sync for that channel.
3.) Create another channel in org #2, linked to the same repo.
4.) Run spacewalk-repo-sync for the new channel.
Actual results:

"Could not find object" errors like the one above. Packages not imported into the organization or linked to the channel.

Expected results:

No error, package created in org #2, and package linked to the channel successfully.

Additional info:

The get_info_for_package query in backend/server/rhnPackage.py does not filter on packages in the same org as the channel. I'm attaching a patch that works in my testing.
Comment 1 Michael Mráka 2012-05-18 08:42:12 EDT
Fixed in spacewalk master by
commit a901506ac8abb58804876fae3f65c1dac089daf9
    822620 - lookup packages only from correct org
Comment 2 Jan Pazdziora 2012-10-30 15:24:55 EDT
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/
Comment 3 Jan Pazdziora 2012-11-01 12:20:22 EDT
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18

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