Description of problem: Channel information serialized into an XML file during channel export contains errata information in two places: 1. /rhn-satellite/rhn-channels/rhn-channel/@channel-errata 2. /rhn-satellite/rhn-channels/rhn-channel/rhn-channel-errata/errata While the first is being exported correctly (i.e the list of erratas is exported either by rhnErrata.last_modified or rhnChannelErrata.modified; based on what was specified on command line), the second list of erratas is always being exported based on rhnChannelErrata.modified, regardless of what was specified on command line. This naturally poses a problem since: 1. List of the erratas falling into the two intervals will not always match 2. satellite-sync searches for the exported erratas based on the information contained in the second list A synchronization error occurs, when the second list contains an errata which is not contained in the first list. Version-Release number of selected component (if applicable): spacewalk-backend-1.2.13-38 How reproducible: Always Steps to Reproduce: 1. Satellite 5.4, redhat-rhn-proxy-4.2-as-i386-4 synced 2. rm -rf /var/cache/rhn/xml-*; 3. rhn-satellite-exporter -c redhat-rhn-proxy-4.2-as-i386-4 \ -d wherever --start-date 20090611000000 --end-date 20110407000000 4. cd wherever 5. xmllint -format channels/redhat-rhn-proxy-4.2-as-i386-4/channel.xml.gz 6. Check whether the erratas contained in the first and second list match 7. Make sure you're able to import the dump Actual results: The lists do not match, the sync fails with following 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 336, in _step_download_errata return self.syncer.download_errata() File "/usr/share/rhn/satellite_tools/satsync.py", line 1741, in download_errata stream_loader.process(chunk) File "/usr/share/rhn/satellite_tools/satsync.py", line 2100, in process stream = self.disk_loader.load() File "/usr/share/rhn/satellite_tools/xmlDiskSource.py", line 41, in load return self._loadFile(filename) File "/usr/share/rhn/satellite_tools/xmlDiskSource.py", line 59, in _loadFile raise MissingXmlDiskSourceFileError("unable to process file %s" % filename) MissingXmlDiskSourceFileError: unable to process file /var/satellite/channel-dumper/dump-iso/errata/5/rhn-erratum-4835.xml Expected results: The lists match, it is possible to import the dump. Additional info: N/A
Created attachment 490718 [details] patch
Created attachment 490793 [details] updated patch Updated patch: similar problem shows when exporting kickstartable trees.
satellite.git SATELLITE-5.4: 8e703c1009d367efd607cf0093c81ef0b632b480
One more fix -- export kickstart files based on kickstartable tree's last_modified time stamp: spacewalk.git master: c5bcfcc658c69df7005772c424dfb0f7cd82b365 satellite.git SATELLITE_5.4: 43b3f833ecc10eb15dab80140d5b8f5764242ec7
Fix for the problem described in comment #10: spacewalk.git master: c3cd0b7b7dee7275352ea8b148fd3843bd20106b satellite.git SATELLITE-5.4: 74b7f3f9b2a2a074ddcf6cb9e0fe49260f1d72a2
Verified on Stage. Moving to Release Pending
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. https://rhn.redhat.com/errata/RHEA-2011-0875.html