Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1316110 - hammer import repository-enable/content-views fails to create any CVs
Summary: hammer import repository-enable/content-views fails to create any CVs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Adam Price
QA Contact: Lukas Pramuk
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-09 12:40 UTC by Lukas Pramuk
Modified: 2019-09-26 14:46 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 09:26:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14404 0 Normal Closed hammer import repository-enable/content-views fails to create any CVs 2020-01-13 11:54:01 UTC
Red Hat Product Errata RHBA-2016:1501 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 12:28:58 UTC

Description Lukas Pramuk 2016-03-09 12:40:39 UTC
Description of problem:
hammer import repository-enable stopped working, no CVs are created only repositories are mapped/enabled. CV creation fails with: 
500 Internal Server Error: "undefined method `composite?' for nil:NilClass"

Version-Release number of selected component (if applicable):
tfm-rubygem-hammer_cli_import-0.10.23-1.el6sat.noarch
@Satellite6.2.0-Beta-SNAP2

How reproducible:
100%

Steps to Reproduce:

0. Import organization(s) and upload manifest(s)

# cat users.csv 
organization_id,organization,user_id,username,last_name,first_name,position,email,role,creation_time,last_login_time,active
1,SATELLITE QE,1,admin,Admin,Admin,,root@localhost,Satellite Administrator,,,enabled

# hammer import organization --csv-file users.csv
Summary
  Created 1 organization.

# hammer subscription upload --file MANIFEST --organization 'SATELLITE QE'

1. Prepare csv file for repository-enablement

# cat channels.csv 
channel_id,channel_label,channel_name,number_of_packages,org_id
101,rhel-x86_64-server-6,Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64),0,

2. Run import repository-enable 

# hammer import repository-enable --verbose --synchronize --wait --csv-file channels.csv
Importing from channels.csv
Enabling /content/dist/rhel/server/6/6Server/x86_64/rhn-tools/os/Packages for channel rhn-tools-rhel-x86_64-server-6 in org 7
Mapping redhat repository [[1, 105]->29].
Registering tasks for uuids: ["a3e976fa-365d-493d-9306-be2f7de461e3"].
Starting thread for async tasks
Waiting for async tasks to finish
Asynchronous tasks: 0 of 1 done (~ 0.50%)
...
Asynchronous tasks: 0 of 1 done (~67.50%)
Condition ["a3e976fa-365d-493d-9306-be2f7de461e3"] met
Creating new redhat content view: RHN Tools for RHEL (v. 6 for 64-bit x86_64)
Exception caught while executing post-["a3e976fa-365d-493d-9306-be2f7de461e3"]:
500 Internal Server Error: {"displayMessage":"undefined method `composite?' for nil:NilClass","errors":["undefined method `composite?' for nil:NilClass"]}
Asynchronous tasks: 1 of 1 done (~100.00%)
Exiting thread (exit requested, all tasks done).
Summary
  Mapped 1 redhat repository.

Actual results:
ISE, no CV created

Expected results:
CV is created

Additional info:

Comment 1 Lukas Pramuk 2016-03-09 12:46:13 UTC
without specifying --wait option step 2. needs two commands and error looks different but the result is the same - no CV created.

2B. Run import repository-enable

# hammer import repository-enable --verbose --csv-file channels.csv
Importing from channels.csv
Enabling /content/dist/rhel/server/6/6Server/x86_64/rhn-tools/os/Packages for channel rhn-tools-rhel-x86_64-server-6 in org 7
Mapping redhat repository [[1, 105]->27].
Summary
  Mapped 1 redhat repository.

(wait for syncing, should be fast ~1minute)

# hammer import repository-enable --verbose --synchronize --csv-file channels.csv
Importing from channels.csv
Repository 'RHN Tools for Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server' already enabled as 27.
Creating new redhat content view: RHN Tools for RHEL (v. 6 for 64-bit x86_64)
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line:
{"channel_id"=>"105", "channel_label"=>"rhn-tools-rhel-x86_64-server-6", "channel_name"=>"RHN Tools for RHEL (v. 6 for 64-bit x86_64)", "number_of_packages"=>"129", "org_id"=>nil}
Summary
  No action taken.

Comment 2 Lukas Pramuk 2016-03-09 13:48:34 UTC
hammer import content-view for importing custom channels fails similarly

# hammer import content-view --verbose --csv-file /tmp/exports/CHANNELS/export.csv
Importing from /tmp/exports/CHANNELS/export.csv
No such {redhat_,}content_view: 105
Creating new content view: Clone of RHN Tools for RHEL (v. 6 for 64-bit x86_64)
Creating new content view: Custom 2
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line:
{"org_id"=>"2", "channel_id"=>"111", "channel_label"=>"custom-2", "channel_name"=>"Custom 2"}
No such {redhat_,}content_view: 104
Creating new content view: Clone of Red Hat Network Tools for RHEL Server (v.5 64-bit x86_64)
Creating new content view: Custom 3
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line:
{"org_id"=>"3", "channel_id"=>"112", "channel_label"=>"custom-3", "channel_name"=>"Custom 3"}
No such {redhat_,}content_view: 106
Creating new content view: Clone of RHN Tools for RHEL Server (v. 7 for x86_64)
Creating new content view: Custom 1
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line:
{"org_id"=>"1", "channel_id"=>"110", "channel_label"=>"custom-1", "channel_name"=>"Custom 1"}
Summary
  Created 3 content_views.

Comment 5 Adam Price 2016-03-30 22:02:13 UTC
Created redmine issue http://projects.theforeman.org/issues/14404 from this bug

Comment 6 Bryan Kearney 2016-03-31 00:04:20 UTC
Upstream bug component is Content Management

Comment 7 Adam Price 2016-03-31 16:51:34 UTC
https://github.com/Katello/katello/pull/5927

Comment 8 Bryan Kearney 2016-04-01 16:06:07 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14404 has been closed
-------------
Anonymous
Applied in changeset commit:katello|513a691c7c9c5fd43c1e83b89ccedbb50923dfa4.

Comment 9 Lukas Pramuk 2016-04-07 15:24:06 UTC
VERIFIED.

@Sat6.2.0-Beta-Snap6.2
tfm-rubygem-katello-3.0.0.14-1.el7sat.noarch   <-FIX
tfm-rubygem-hammer_cli_import-0.10.23-1.el7sat.noarch

# hammer import repository-enable --verbose --csv-file /tmp/exports/channels.csv --synchronize --wait --no-async
Importing from /tmp/exports/channels.csv
...
Enabling /content/dist/rhel/server/7/7Server/x86_64/rhn-tools/os/Packages for channel rhn-tools-rhel-x86_64-server-7 in org 5
Mapping redhat repository [[3, 106]->34].
Waiting for uuids (non async): ["09c9fecd-4fa2-4e08-a9ab-3ee7caace0a3"].
Creating new redhat content view: RHN Tools for RHEL Server (v. 7 for x86_64)
Summary
  Mapped 12 redhat_repositories.
  Created 12 redhat_content_views.

# hammer import content-view --verbose --csv-file /tmp/exports/CHANNELS/export.csv
Importing from /tmp/exports/CHANNELS/export.csv
Creating new content view: Clone of RHN Tools for RHEL (v. 6 for 64-bit x86_64)
Creating new content view: Custom 2
Creating new content view: Clone of Red Hat Network Tools for RHEL Server (v.5 64-bit x86_64)
Creating new content view: Custom 3
Creating new content view: Clone of RHN Tools for RHEL Server (v. 7 for x86_64)
Creating new content view: Custom 1
Summary
  Created 6 content_views.

>>> Both Red Hat repositories enablement and Content Views import work

Comment 11 errata-xmlrpc 2016-07-27 09:26:48 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://access.redhat.com/errata/RHBA-2016:1501


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