Bug 483811 - --orgid= does not work in satellite-sync
Summary: --orgid= does not work in satellite-sync
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 530
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Pradeep Kilambi
QA Contact: Jeff Browning
URL:
Whiteboard:
Depends On:
Blocks: 457071
TreeView+ depends on / blocked
 
Reported: 2009-02-03 18:17 UTC by Jeff Browning
Modified: 2009-09-10 20:04 UTC (History)
1 user (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 20:04:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeff Browning 2009-02-03 18:17:21 UTC
Description of problem:
When trying to sat sync to a specific organization using --orgid=, an unhandled exception occurs.

Version-Release number of selected component (if applicable):
Satellite-5.3.0-RHEL5-re20090127.2-i386-embedded-oracle.iso

How reproducible:
100%

Steps to Reproduce:
1. Export packages from your satellite's default org to a local directory
2. Pointing at that directory, attempt to satellite sync the packages to another Org on the same satellite using --orgid=
  
Actual results:
In console:
12:28:22 Red Hat Network Satellite - file-system synchronization
12:28:22    mp:  /testexport
12:28:22    db:  rhnsat/<password>@rhnsat
12:28:22 
12:28:22 Retrieving / parsing channel-families data
12:28:22 channel-families data complete
12:28:22 
12:28:22 Retrieving / parsing arches data
12:28:23 arches data complete
12:28:23 
12:28:23 Retrieving / parsing additional arches data
12:28:23 additional arches data complete
12:28:23 
12:28:23 Retrieving / parsing channel data
12:28:23    p = previously imported/synced channel
12:28:23    . = channel not yet imported/synced
12:28:23    base-channels:
12:28:23       . centos_5                                    1
12:28:23       . fedora_9                                    3
12:28:23       . rhel_5                                      2
12:28:23 
+++ sending log as an email +++

SYNC ERROR: unhandled exception occurred:

(Check logs/email for potentially more detail)

Error: Unable to lookup Org Id 2 

In email:
12:24:28 
SYNC ERROR: unhandled exception occurred:

Exception reported from fjs-0-01.rhndev.redhat.com
Time: Tue Feb  3 12:24:28 2009
Exception type satellite_tools.satCerts.NoOrgIdError

Exception Handler Information
Traceback (most recent call last):
  File "/usr/bin/satellite-sync", line 142, in main
    return satsync.Runner().main()
  File "/usr/share/rhn/satellite_tools/satsync.py", line 206, in main
    ret = method()
  File "/usr/share/rhn/satellite_tools/satsync.py", line 280, in _step_channels
    self.syncer.process_channels()
  File "/usr/share/rhn/satellite_tools/satsync.py", line 621, in process_channels
    orgid=OPTIONS.orgid or None)
  File "/usr/share/rhn/satellite_tools/sync_handlers.py", line 201, in import_channels
    raise NoOrgIdError("Error: Unable to lookup Org Id %s " \
NoOrgIdError: Error: Unable to lookup Org Id 2 

Expected results:
The target channels should be synced to the specified organization.

Additional info:
This is being blocked against inter-satellite sync, but it also prevents the completion of two NEVRA test cases.

Comment 3 Jeff Browning 2009-02-03 22:36:18 UTC
SQL> SELECT id FROM web_customer;

        ID
----------
         1
         2

The sat does have an OrgID 2.

I created the new Org just before the test and got the ID from the URL in the Org Details page ( the oid=2 part of the URL ).

My understanding is that the satellite sync should take the dumped channels and sync them to the specified org, creating the channels on that org in addition to populating the packages and other data. Is this correct?

Comment 5 Jeff Browning 2009-02-09 20:49:08 UTC
fjs-0-01 has an Org 2.

Also, I was able to use Sat Sync --orgid= for syncing from the dump.new. However, it's still not seeing the --orgid=2 when pointing at the dump made with rhn-satellite-exporter when exporting custom channel packages.

Comment 7 Jeff Browning 2009-04-20 17:19:31 UTC
Verified

Comment 9 Brandon Perkins 2009-09-10 20:04:25 UTC
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.

http://rhn.redhat.com/errata/RHEA-2009-1434.html


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