Bug 353731 - Satellite-sync from channel dump fails with iteration over non-sequence
Satellite-sync from channel dump fails with iteration over non-sequence
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Jan Pazdziora
Preethi Thomas
: Regression
Depends On:
Blocks: 248627
  Show dependency treegraph
Reported: 2007-10-26 04:40 EDT by Jan Pazdziora
Modified: 2008-04-02 20:18 EDT (History)
1 user (show)

See Also:
Fixed In Version: sat510
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-02 20:18:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Jan Pazdziora 2007-10-26 04:40:13 EDT
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

How reproducible:


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 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 Retrieving / parsing arches data
10:30:13 arches data complete
10:30:13 Retrieving / parsing additional arches data
10:30:13 additional arches data complete
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
+++ 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 04:41:35 EDT
The email traceback is:

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
  File "/usr/share/rhn/satellite_tools/satsync.py", line 596, in process_channels
  File "/usr/share/rhn/satellite_tools/sync_handlers.py", line 186, in
  File "/usr/share/rhn/server/importlib/importLib.py", line 612, in run
  File "/usr/share/rhn/server/importlib/channelImport.py", line 23, in preprocess
  File "/usr/share/rhn/server/importlib/channelImport.py", line 36, in
    for release in channel['release']:
TypeError: iteration over non-sequence

Comment 2 Jan Pazdziora 2007-10-26 04:42:24 EDT
Taking this, I'm gonna fix it.
Comment 3 Jan Pazdziora 2007-10-26 05:45:29 EDT
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 11:13:18 EDT
Patch applied to SVN, trunk, revision 133291.
Comment 5 Jan Pazdziora 2007-10-29 11:20:04 EDT
Built rhns*-5.1.0-17.noarch.rpm.
Comment 6 Jan Pazdziora 2007-10-30 05:48:13 EDT
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

Satellite 5.1.0-21 ISOs are now available as
rhn-satellite-5.1.0-21-redhat-linux-as-* @:

Comment 7 Preethi Thomas 2007-11-05 12:52:26 EST
verified in build 23
Comment 8 Pradeep Kilambi 2008-03-24 14:07:08 EDT
    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-02 20:18:36 EDT
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.