Description of problem: I have a channel dump generated from 5.0.0. When I try to do satellite-sync -m. -c rhel-i386-server-5 -c rhn-tools-rhel-i386-server-5 the sync fails. Version-Release number of selected component (if applicable): # rpm -qf /usr/share/rhn/server/importlib/channelImport.py rhns-server-5.1.0-16 How reproducible: Deterministic. Steps to Reproduce: 1. Have a channel dump generated from 5.0. 2. Run satellite-sync -m . Actual results: # satellite-sync -m. -c rhel-i386-server-5 -c rhn-tools-rhel-i386-server-5 10:30:13 Red Hat Network Satellite - file-system synchronization 10:30:13 mp: /mnt/hostel/export/sputnik-prod 10:30:13 db: rhnsat/<password>@rhnsat 10:30:13 10:30:13 Retrieving / parsing channel-families data 10:30:13 channel-families data complete 10:30:13 WARNING: ignoring unavailable channel family bea-weblogic-jrockit-7.0 10:30:13 WARNING: ignoring unavailable channel family rh-stronghold 10:30:13 WARNING: ignoring unavailable channel family rhel-sdk 10:30:13 10:30:13 Retrieving / parsing arches data 10:30:13 arches data complete 10:30:13 10:30:13 Retrieving / parsing additional arches data 10:30:13 additional arches data complete 10:30:13 10:30:13 Retrieving / parsing channel data 10:30:13 p = previously imported/synced channel 10:30:13 . = channel not yet imported/synced 10:30:13 base-channels: 10:30:13 . rhel-i386-server-5 2470 10:30:13 rhel-i386-server-5: 10:30:13 . rhn-tools-rhel-i386-server-5 348 10:30:13 +++ sending log as an email +++ SYNC ERROR: unhandled exception occurred: (Check logs/email for potentially more detail) iteration over non-sequence # Expected results: No error. Additional info: I believe the change from revision 133056 is at fault -- the channel release might not be present.
The email traceback is: 10:30:13 SYNC ERROR: unhandled exception occurred: Exception reported from sat4-510.englab.brq.redhat.com Time: Fri Oct 26 10:30:13 2007 Exception type exceptions.TypeError Exception Handler Information Traceback (most recent call last): File "/usr/bin/satellite-sync", line 136, in main return satsync.Runner().main() File "/usr/share/rhn/satellite_tools/satsync.py", line 199, in main ret = method() File "/usr/share/rhn/satellite_tools/satsync.py", line 272, in _step_channels self.syncer.process_channels() File "/usr/share/rhn/satellite_tools/satsync.py", line 596, in process_channels sync_handlers.import_channels(requested_channels) File "/usr/share/rhn/satellite_tools/sync_handlers.py", line 186, in import_channels importer.run() File "/usr/share/rhn/server/importlib/importLib.py", line 612, in run self.preprocess() File "/usr/share/rhn/server/importlib/channelImport.py", line 23, in preprocess self.__processChannel(channel) File "/usr/share/rhn/server/importlib/channelImport.py", line 36, in __processChannel for release in channel['release']: TypeError: iteration over non-sequence
Taking this, I'm gonna fix it.
Created attachment 238731 [details] Path to get satellite-sync working again. I had to apply the following patch to be able to satellite-sync my 5.0 channel dumps. Especially the changes + if entrylist is None: + continue seem rather strange -- it whould probably be the task of the code before this one to make sure we do not have entries with values None -- they probably should not be there at all, or have some decent default. On the other hand, this get satellite-sync working for me. Please raise your voices if you do not like this patch applied to trunk.
Patch applied to SVN, trunk, revision 133291.
Built rhns*-5.1.0-17.noarch.rpm.
Let's see what QA thinks about: QA Push for Vega Complete! Satellite 5.1.0-21 and Proxy 5.1.0-14 Content now available on webqa Channels. Satellite 5.1.0-21 ISOs are now available as rhn-satellite-5.1.0-21-redhat-linux-as-* @: http://barn.rhndev.redhat.com/satellite-isos/devel/satellite-5.1/
verified in build 23
Import complete: Begin time: Mon Mar 24 14:06:02 2008 End time: Mon Mar 24 14:06:41 2008 release pending
5.1 Sat GA so Closed for Current Release.