Bug 483811 - --orgid= does not work in satellite-sync
--orgid= does not work in satellite-sync
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Pradeep Kilambi
Jeff Browning
: Reopened
Depends On:
Blocks: 457071
  Show dependency treegraph
Reported: 2009-02-03 13:17 EST by Jeff Browning
Modified: 2009-09-10 16:04 EDT (History)
1 user (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-10 16:04:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeff Browning 2009-02-03 13:17:21 EST
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):

How reproducible:

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 Retrieving / parsing channel-families data
12:28:22 channel-families data complete
12:28:22 Retrieving / parsing arches data
12:28:23 arches data complete
12:28:23 Retrieving / parsing additional arches data
12:28:23 additional arches data complete
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
+++ 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:
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
  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 17:36:18 EST
SQL> SELECT id FROM web_customer;


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 15:49:08 EST
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 13:19:31 EDT
Comment 9 Brandon Perkins 2009-09-10 16:04:25 EDT
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.


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