Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1150697

Summary: Satellite5.6: spacewalk-export --org fails for system-profile
Product: Red Hat Satellite 5 Reporter: Grant Gainey <ggainey>
Component: ClientAssignee: Grant Gainey <ggainey>
Status: CLOSED ERRATA QA Contact: Radovan Drazny <rdrazny>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 560CC: aladke, jdostal, rdrazny, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-utils-2.0.2-28 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1151121 (view as bug list) Environment:
Last Closed: 2016-09-14 12:04:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 924189    

Description Grant Gainey 2014-10-08 17:45:08 UTC
Description of problem:

Specifying --org <org-id> for spacewalk-export fails to export system-profiles

Version-Release number of selected component (if applicable):

spacewalk-utils-2.0.2-16.el6sat.noarch

How reproducible:

Try "spacewalk-export --org 1"

Actual results:

===
~ $ spacewalk-export --org 1
INFO: Processing users...
INFO: Processing system-groups...
INFO: Processing config-files...
INFO: Processing repositories...
INFO: Processing channels...
Processing organization: RED HAT SATELLITE ENGINEERING
INFO: Processing activation-keys...
INFO: Processing kickstart-scripts...
INFO: Processing system-profiles...
Unknown column [org_id] in report [system-profiles].
INFO: Export-file created at /root/spacewalk-export-dir/spacewalk_export.tar.gz
===

Expected results:

===
~ $ spacewalk-export --org 1
INFO: Processing users...
INFO: Processing system-groups...
INFO: Processing config-files...
INFO: Processing repositories...
INFO: Processing channels...
Processing organization: RED HAT SATELLITE ENGINEERING
INFO: Processing activation-keys...
INFO: Processing kickstart-scripts...
INFO: Processing system-profiles...
INFO: Export-file created at /root/spacewalk-export-dir/spacewalk_export.tar.gz
===

Additional info:

spacewalk-report system-profiles calls it 'organization_id'

Workaround:

  Export system-profiles directly:

  # spacewalk-report --where-organization-id <ID> system-profiles > ~/spacewalk-export-dir/exports/system-profiles.csv

Comment 1 Grant Gainey 2014-10-08 17:49:16 UTC
spacewalk commit 0310f02553ed4475ccedf93746631b2b832fe4a6

Comment 6 Radovan Drazny 2016-08-29 09:56:28 UTC
Reproduced with spacewalk-utils-2.0.2-27 using the reproducer in the initial report. 

# spacewalk-export --org 1
INFO: Processing users...
INFO: Processing system-groups...
INFO: Processing config-files...
INFO: Processing repositories... 
INFO: Processing channels...
Processing organization: Red Hat SatTeam QA
INFO: Processing activation-keys...
INFO: Processing kickstart-scripts...
INFO: Processing system-profiles...
Unknown column [org_id] in report [system-profiles].
INFO: Export-file created at /root/spacewalk-export-dir/spacewalk_export.tar.gz

The file /root/spacewalk-export-dir/exports/system-profiles.csv is empty, and the same file in the /root/spacewalk-export-dir/spacewalk_export.tar.gz archive is empty as well (naturally). 

Updated to spacewalk-utils-2.0.2-28

# spacewalk-export --org 1
INFO: Processing users...
INFO: Processing system-groups...
INFO: Processing config-files...
INFO: Processing repositories...
INFO: Processing channels...
Processing organization: Red Hat SatTeam QA
INFO: Processing activation-keys...
INFO: Processing kickstart-scripts...
INFO: Processing system-profiles...
INFO: Export-file created at /root/spacewalk-export-dir/spacewalk_export.tar.gz

There is no error in the output. Checking the /root/spacewalk-export-dir/exports/system-profiles.csv shows correctly exported csv file, and the /root/spacewalk-export-dir/spacewalk_export.tar.gz archive contains correctly exported file as well. 

VERIFIED

Comment 8 errata-xmlrpc 2016-09-14 12:04:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1866.html

Comment 9 Tomas Lestach 2017-02-17 08:06:12 UTC
*** Bug 1275207 has been marked as a duplicate of this bug. ***