Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 516976

Summary: spacewalk-repo-sync fails for the last some pkgs
Product: [Community] Spacewalk Reporter: Sandro Mathys <sandro>
Component: ServerAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 0.6CC: jsherril
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-11 18:37:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 543511    

Description Sandro Mathys 2009-08-12 06:19:25 UTC
Description of problem:
I spacewalk-repo-sync'd fedora-11-i386 (17510 pkgs, os+updates). This went pretty smooth and I was also able to interrupt (ctrl+c) it now and then to continue the sync later. Works perfect!

But then, just when the task is about to finish, I get errors with the last some pkgs. I have two spacewalk set up and they both run that task. One failed with the last 6 pkgs, the other with the last 5. The last batch (i.e. the number of pkgs still to sync since the last interrupt-and-go-again) was once <2k and once >13k.

In both cases, running spacewalk-repo-sync with the exact same parameters had no problem to sync the remaining 5-6 pkgs. Oh, and it's not been the same pkgs that failed.

Version-Release number of selected component (if applicable):
spacewalk-backend-tools-0.6.30-1.el5.noarch

How reproducible:
Twice so far

Steps to Reproduce:
1. spacewalk-repo-sync a yum repo that has F11 os+updates merged into one (as of yesterday 17510 pkgs)
2. wait some hours (except you have lots of CPU cores/power and RAM)
  
Actual results:
InvalidPackageError

Expected results:
no errors at all

Additional info:
Example-error

Exception reported from spacewalk.ethz.ch
Time: Wed Aug 12 07:48:46 2009
Exception type server.importlib.importLib.InvalidPackageError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/reposync.py", line 154, in import_packages
    self.associate_package(pack, md5)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 196, in associate_package
    self._importer_run(package, caller, backend)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 204, in _importer_run
    importer.run()
  File "/usr/share/rhn/server/importlib/importLib.py", line 628, in run
    self.submit()
  File "/usr/share/rhn/server/importlib/packageImport.py", line 114, in submit
    self.backend.lookupPackages(self.batch)
  File "/usr/share/rhn/server/importlib/backend.py", line 519, in lookupPackages
    self.__lookupObjectCollection(packages, 'rhnPackage', ignore_missing)
  File "/usr/share/rhn/server/importlib/backend.py", line 1771, in __lookupObjectCollection
    raise InvalidPackageError(object, "Could not find object %s in table %s" % (object, tableName))
InvalidPackageError: Could not find object [<server.importlib.importLib.IncompletePackage instance; attributes={'package_size': None, 'package_arch_id': 103, 'name': 'lirc', 'md5sum': '766f2539c4c14ea96c2b7975d620481f', 'org_id': '1', 'package_id': None, 'channels': {101: 'fedora-11-i386'}, 'nevra_id': 13204, 'epoch': '', 'version': '0.8.5', 'name_id': 5947, 'last_modified': None, 'release': '1.pre2.fc11', 'arch': 'i586', 'evr_id': 2304}] in table rhnPackage

Comment 1 Sandro Mathys 2009-08-24 13:52:19 UTC
Update: this has been reported by other users as well and it's not always the
last some pkgs but can also happen in the middle of some thousand pkgs.

So, while this happens now and then, it does not always happen nor does it seem
to be specific to a distro (centos or fedora). I think I've also seen this with
3rd-party repos.

The hard thing is to reproduce this at will, which was not yet accomplished.

Comment 2 Justin Sherrill 2010-01-11 18:37:18 UTC
This should have been fixed by some changes in spacewalk 0.8.

I'm going to go ahead and close this bug, but if you are still encountering the issue, please reopen.

Thanks.

Comment 3 Michael Mráka 2010-02-16 12:59:59 UTC
Spacewalk 0.8 has been released