Hide Forgot
Description of problem: When a running satellite-sync process gets killed during the download of rpms, some of the packages might not be downloaded completely. As a result, there are incomplete rpm packages in /var/satellite. A subsequent `satellite-sync --no-packages` will crash, when comparing checksum of the package in /var/satellite with the data from the source storage. Without spacewalk-data-fsck, a user has no way to find a corrupt file. Version-Release number of selected component (if applicable): RHN Satellite 5.4.1 spacewalk-backend-tools-1.2.13-58.el6sat.noarch How reproducible: deterministic Steps to Reproduce: 1. # satellite-sync -c some-channel ( 2. Kill it during rpm downloading phase 3. # satellite-sync -c some-channel --no-rpms Actual results: Diffing: ######################################## - complete 08:25:00 08:25:00 Downloading package metadata 08:25:00 Retrieving / parsing *relevant* package metadata: rhel-ppc64-server-6 (NONE RELEVANT) 08:25:00 Retrieving / parsing *relevant* package metadata: rhel-s390x-server-6 (NONE RELEVANT) 08:25:01 08:25:01 Importing package metadata 08:25:01 Importing *relevant* package metadata: rhel-ppc64-server-6 (5933) 08:25:01 * WARNING: this may be a slow process. ________________________________________ Importing: ###error: rpmts_HdrFromFdno: MD5 digest: BAD Expected(19b7783602fc4775dd65924eb2c016b7) != (2a84eafd483ca8981f5d95c82fa6b8a7) +++ sending log as an email +++ SYNC ERROR: unhandled exception occurred: (Check logs/email for potentially more detail) error('error reading package header',) error reading package header Expected results: Either: - Avoid storing corrupted files in /var/satelite - Repack the exception to name filepath to the corrupted rpm - Remove corrupted files during subsequent satellite-sync Additional info:
Following is a snippet from traceback mail. 05:01:54 SYNC ERROR: unhandled exception occurred: Exception reported from smqa-r210-04.lab.eng.brq.redhat.com Time: Sun Dec 11 05:01:54 2011 Exception type <class '_rpm.error'> Exception Handler Information Traceback (most recent call last): File "/usr/bin/satellite-sync", line 143, in main return satsync.Runner().main() File "/usr/share/rhn/satellite_tools/satsync.py", line 226, in main ret = method() File "/usr/share/rhn/satellite_tools/satsync.py", line 343, in _step_packages self._affected_channels = self.syncer.import_packages() File "/usr/share/rhn/satellite_tools/satsync.py", line 1785, in import_packages sync_handlers.import_packages(batch, sources) File "/usr/share/rhn/satellite_tools/sync_handlers.py", line 433, in import_packages importer.run() File "/usr/share/rhn/server/importlib/importLib.py", line 651, in run self.submit() File "/usr/share/rhn/server/importlib/packageImport.py", line 323, in submit self._import_signatures() File "/usr/share/rhn/server/importlib/packageImport.py", line 511, in _import_signatures header = rhn_rpm.get_package_header(filename=full_path) File "/usr/lib/python2.6/site-packages/spacewalk/common/rhn_rpm.py", line 293, in get_package_header hdr = ts.hdrFromFdno(file_desc) File "/usr/lib/python2.6/site-packages/spacewalk/common/rhn_rpm.py", line 110, in hdrFromFdno return self.ts.hdrFromFdno(fd) File "/usr/lib64/python2.6/site-packages/rpm/transaction.py", line 154, in hdrFromFdno raise rpm.error("error reading package header") error: error reading package header
*** Bug 759406 has been marked as a duplicate of this bug. ***
We have re-reviewed this bug, as part of an ongoing effort to improve Satellite/Proxy feature and bug updates, review and backlog. We're closing this Bugzilla due to the Satellite 5 version this bug was reported against having been EOL (End-of-Life) [1]. Comment 5 also mentions a usable workaround. Please re-open if the issue still exists in the latest Satellite 5 version. Tomas and Xixi [1] Satellite Life Cycle page: https://access.redhat.com/support/policy/updates/satellite