Bug 353731 - Satellite-sync from channel dump fails with iteration over non-sequence
Summary: Satellite-sync from channel dump fails with iteration over non-sequence
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 510
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 248627
TreeView+ depends on / blocked
 
Reported: 2007-10-26 08:40 UTC by Jan Pazdziora
Modified: 2008-04-03 00:18 UTC (History)
1 user (show)

Fixed In Version: sat510
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-03 00:18:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Path to get satellite-sync working again. (3.34 KB, patch)
2007-10-26 09:45 UTC, Jan Pazdziora
no flags Details | Diff

Description Jan Pazdziora 2007-10-26 08:40:13 UTC
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.

Comment 1 Jan Pazdziora 2007-10-26 08:41:35 UTC
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



Comment 2 Jan Pazdziora 2007-10-26 08:42:24 UTC
Taking this, I'm gonna fix it.

Comment 3 Jan Pazdziora 2007-10-26 09:45:29 UTC
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.

Comment 4 Jan Pazdziora 2007-10-29 15:13:18 UTC
Patch applied to SVN, trunk, revision 133291.

Comment 5 Jan Pazdziora 2007-10-29 15:20:04 UTC
Built rhns*-5.1.0-17.noarch.rpm.

Comment 6 Jan Pazdziora 2007-10-30 09:48:13 UTC
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/


Comment 7 Preethi Thomas 2007-11-05 17:52:26 UTC
verified in build 23

Comment 8 Pradeep Kilambi 2008-03-24 18:07:08 UTC
    Import complete:
        Begin time: Mon Mar 24 14:06:02 2008
        End time:   Mon Mar 24 14:06:41 2008


release pending

Comment 9 Brandon Perkins 2008-04-03 00:18:36 UTC
5.1 Sat GA so Closed for Current Release.


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