Bug 655207
Summary: | update-packages fails when a package is corrupt but does not say which package it is | ||
---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Guil Barros <gbarros> |
Component: | Installer | Assignee: | Milan Zázrivec <mzazrivec> |
Status: | CLOSED ERRATA | QA Contact: | Šimon Lukašík <slukasik> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 540 | CC: | cperry, fnadge, msuchy, slukasik |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | spacewalk-backend-1.2.13-23 | Doc Type: | Bug Fix |
Doc Text: |
Cause: When processing a corrupted package, update-packages script did not inform which specific package was corrupted.
Consequence: In the problematic situations, it wasn't obvious which package is corrupted.
Fix: the fix was quite easy and non-invasive.
Result: update-packages now correctly informs of corrupted packages.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2011-02-01 16:16:42 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: | 646488 |
Description
Guil Barros
2010-11-19 21:10:06 UTC
# diff -u updatePackages.py.SAVE updatePackages.py --- updatePackages.py.SAVE 2010-11-19 14:34:17.000000000 -0600 +++ updatePackages.py 2010-11-19 14:44:39.000000000 -0600 @@ -183,6 +183,7 @@ try: hdr = rhn_rpm.get_package_header(filename=old_abs_path) except: + print "error = %s" %(old_abs_path) rhnSQL.commit() raise spacewalk.git master: 99485b395298838990eae61ec61f61092ac32b29 cherrypicked to satellite-git as commit 389351b35422ddc875e2c9e32ea3a536d15ce3a9 Flipping back to Assigned: I've finally managed to get the traceback from comment 0. Although I cannot see the fix. Could you please look at the issue? .RHN_NOT_LINK.[07:14:42][root@hp-xw9400-02 NULL]# /usr/bin/update-packages --db=$(spacewalk-cfg-get default_db) \ > --update-filer \ > --update-kstrees \ > --debug Connecting to rhnsat/rhnsat@rhnsat ________________________________________ standby: ####Traceback (most recent call last): File "/usr/bin/update-packages", line 102, in ? sys.exit(abs(main() or 0)) File "/usr/bin/update-packages", line 92, in main return updatePackages.main() File "/usr/share/rhn/satellite_tools/updatePackages.py", line 85, in main process_package_data() File "/usr/share/rhn/satellite_tools/updatePackages.py", line 190, in process_package_data hdr = rhn_rpm.get_package_header(filename=old_abs_path) File "/usr/lib/python2.4/site-packages/spacewalk/common/rhn_rpm.py", line 276, in get_package_header hdr = ts.hdrFromFdno(file_desc) File "/usr/lib/python2.4/site-packages/spacewalk/common/rhn_rpm.py", line 110, in hdrFromFdno return self.ts.hdrFromFdno(fd) _rpm.error: error reading package header .RHN_NOT_LINK.1:[07:14:58][root@hp-xw9400-02 NULL]# rpm -q spacewalk-backend-tools spacewalk-backend-tools-1.2.13-22.el5sat The original patch would put an information about the problematic package into the log file and leave the traceback you're seeing so as it is, so what you're describing in comment #5 is expected. Although I agree that we could be printing this information into stdout as well: spacewalk.git master: 8253a75b97c3fae372d39ac86b93bc1166e163e6 253bab4bfd72c3674eb438468a14df0226cf11b2 satellite.git SATELLITE-5.4: 96e83eb3c1f54e1c66e437ef0271cf6c4c7cb042 603a85bbdb5669d27752b5a5a00c273597043195 Changing to Verified: Testing procedure: - upgrade satellite 520 to 540 - (apply available errata right after the install phase) - then up to the comment 0. Verified against: spacewalk-backend-tools-1.2.13-23.el5sat Thanks for the fix! Please be so kind and add a few key words to the Technical Note field of this bugzilla entry using the following structure: Cause: Consequence: Fix: Result: For details, see: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Consequence: Fix: Result: Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,7 +1,7 @@ -Cause: +Cause: When processing a corrupted package, update-packages script did not inform which specific package was corrupted. -Consequence: +Consequence: In the problematic situations, it wasn't obvious which package is corrupted. -Fix: +Fix: the fix was quite easy and non-invasive. -Result:+Result: update-packages now correctly informs of corrupted packages. Milan, many thanks for the excellent CCFR. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0190.html |