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 1722713 - Unable to import content view when there are more than 20 of enabled repositories in the target Satellite
Summary: Unable to import content view when there are more than 20 of enabled reposito...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Inter Satellite Sync
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.6.0
Assignee: Chris Roberts
QA Contact: Perry Gagne
URL: https://projects.theforeman.org/issue...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-21 05:36 UTC by Hao Chang Yu
Modified: 2019-10-22 12:47 UTC (History)
4 users (show)

Fixed In Version: rubygem-hammer_cli_katello-0.18.0.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 12:47:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27807 0 High Closed Unable to import content view when there are more than 20 of enabled repositories in the target Satellite 2021-01-25 12:47:05 UTC
Red Hat Product Errata RHSA-2019:3172 0 None None None 2019-10-22 12:47:49 UTC

Description Hao Chang Yu 2019-06-21 05:36:14 UTC
Description of problem:
# hammer content-view version import --export-tar /var/lib/pulp/katello-export/export-sat-tool-only-32.tar --organization-id 1
Could not import the content view:
  Error: Unable to sync repositories, no library repository found for Red_Hat_Satellite_Tools_6_4_for_RHEL_7_Server_RPMs_x86_64


In "/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.16.0.11/lib/hammer_cli_katello/content_view_version.rb"

      def sync_repositories(repositories, organization_id, options)
        export_tar_dir =  options[:dirname]
        export_tar_prefix = options[:prefix]

        repositories.each do |repo|

########### This call is going to fetch all library repos and by default only 20 entries will be returned if "per_page" is not given ##############
          library_repos = index(
            :repositories,
            'organization_id' => organization_id,
            'library' => true
          )
<snip>



This issue can workaround by increase the "entries_per_page" setting temporary.

hammer settings set --name entries_per_page --value 1000

hammer content-view version import --export-tar /var/lib/pulp/katello-export/export-my-cv-34.tar --organization-id 1

hammer settings set --name entries_per_page --value 20

Comment 5 Perry Gagne 2019-09-18 18:15:31 UTC
Verified fix in Sat 6.6 Snap 20.1

Was able to import a tar that contains 30 repos.

Comment 7 errata-xmlrpc 2019-10-22 12:47:39 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/RHSA-2019:3172


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