This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 857892 - rhn-satellite-exporter: incremental errata & ks tree export does not respect --use-rhn-date / --use-sync-date switches
rhn-satellite-exporter: incremental errata & ks tree export does not respect ...
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization (Show other bugs)
550
Unspecified Unspecified
urgent Severity high
: ---
: ---
Assigned To: Milan Zazrivec
Dimitar Yordanov
: Regression
Depends On:
Blocks: sat541-triage
  Show dependency treegraph
 
Reported: 2012-09-17 08:35 EDT by Milan Zazrivec
Modified: 2012-09-20 10:17 EDT (History)
2 users (show)

See Also:
Fixed In Version: spacewalk-backend-1.7.38-33
Doc Type: Bug Fix
Doc Text:
Cause: A bug in the code. Consequence: When doing an incremental channel export, rhn-satellite-exporter would incorrectly include errata(s) which do not belong to the specified date (time) range. The problem alone would manifest itself by a traceback during synchronization of such broken export. Fix: Simple. Result: rhn-satellite-exporter honors --use-rhn-date / --use-sync-date switches when exporting errata information.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-20 10:17:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Milan Zazrivec 2012-09-17 08:35:25 EDT
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.7.38-32

How reproducible:
Always

Steps to Reproduce:
1. Satellite 5.5, 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
Comment 1 Milan Zazrivec 2012-09-17 08:53:16 EDT
spacewalk.git master: aafc6ca94b190e08f72ff9be20635732f9c37679
Comment 7 errata-xmlrpc 2012-09-20 10:17:04 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-1300.html

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