Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 731446

Summary: Repo addition requires discovery
Product: Red Hat Satellite Reporter: Bryan Kearney <bkearney>
Component: katello-agentAssignee: Mike McCune <mmccune>
Status: CLOSED CURRENTRELEASE QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: dmitri, mmccune, sghai
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 17:52:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 747354    

Description Bryan Kearney 2011-08-17 17:16:08 UTC
The following cli command:

katello repo create  --org=ACME_Corporation --name=testrepo23 --url=http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-15/x86_64/ --product=custom1

will tail on discovery since there are no child repos. This should be valid since hte --url is a valid repo.

Comment 1 Mike McCune 2011-08-17 22:31:08 UTC
taking this one ..

Comment 2 Mike McCune 2011-08-17 22:41:34 UTC
commit e4b1ce088343af4f1402dabb9fc7954433756aef
Author: Mike McCune <mmccune>
Date:   Wed Aug 17 15:30:17 2011 -0700

    731446 - adding new 'discovery' command for repo discovery
    
    Splitting repo creation and discovery into 2 commands.  Discovery
    utilizes the discovery calls and Create now just creates one repo.

             print _("No product [ %s ] found") % prodName

commit e4047173689cc1163c02631d63472e1cb3174bfb
Author: Mike McCune <mmccune>
Date:   Wed Aug 17 15:34:01 2011 -0700

    731446 - fixing variable name

commit 7841e24550d74edd06cd587491c5912cd9e9d8d7
Author: Mike McCune <mmccune>
Date:   Wed Aug 17 15:35:12 2011 -0700

    731446 - variable name fix

Comment 3 Mike McCune 2011-08-17 22:42:09 UTC
Added a new 'discovery' command that does what create did before and made create just create 1 repo.

Comment 4 Dmitri Dolguikh 2011-08-18 08:42:26 UTC
Hmm, there was a requirement for discovery to be part of repo creation process. The original issue is a bug in pulp (which I thought was fixed) where pulp doesn't find the repository if a full url was passed in for discovery.

Comment 5 Mike McCune 2011-08-18 16:16:41 UTC
Discussed on IRC and decided to split out discovery into 2 commands, create and discover.

Comment 7 Sachin Ghai 2012-02-16 11:45:43 UTC
Verified with following katello builds:

katello-0.1.237-1.el6.noarch
katello-cli-0.1.54-1.el6.noarch
katello-glue-pulp-0.1.237-1.el6.noarch
pulp-0.0.264-1.el6.noarch


repo discovery command is added and working as expected:


[root@scroponok manifests]# katello -u admin -p admin shell
katello> provider create --name rhel --org sghai_org
Successfully created provider [ rhel ]

katello> product create --org sghai_org --name rhel6 --provider rhel
Successfully created product [ rhel6 ]
katello> repo discover --org sghai_org --name rhel62 --product=rhel6 --url http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/
Discovering repository urls, this could take some time...
(-)  [1] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Workstation/x86_64/os
(-)  [2] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Workstation/x86_64/os/Workstation
(-)  [3] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Workstation/x86_64/os/ScalableFileSystem
(-)  [4] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Workstation/optional/x86_64/os
(-)  [5] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Workstation/optional/i386/os
(-)  [6] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Workstation/i386/os
(-)  [7] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Workstation/i386/os/Workstation
(-)  [8] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/x86_64/os
(-)  [9] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/x86_64/os/Server
(-)  [10] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/x86_64/os/ScalableFileSystem
(-)  [11] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/x86_64/os/ResilientStorage
(-)  [12] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/x86_64/os/LoadBalancer
(-)  [13] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/x86_64/os/HighAvailability
(-)  [14] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/optional/x86_64/os
(-)  [15] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/optional/i386/os
(-)  [16] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/i386/os
(-)  [17] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/i386/os/Server
(-)  [18] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/i386/os/ResilientStorage
(-)  [19] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/i386/os/LoadBalancer
(-)  [20] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Server/i386/os/HighAvailability
(-)  [21] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Client/x86_64/os
(-)  [22] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Client/x86_64/os/Client
(-)  [23] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Client/optional/x86_64/os
(-)  [24] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Client/optional/i386/os
(-)  [25] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Client/i386/os
(-)  [26] http://download.eng.pnq.redhat.com/pub/rhel/released/RHEL-6/6.2/Client/i386/os/Client

Select urls for which candidate repos should be created; use `y` to confirm (h for help):y
Successfully created repository [ rhel62_pub_rhel_released_RHEL-6_6.2_Client_x86_64_os ]
Successfully created repository [ rhel62_pub_rhel_released_RHEL-6_6.2_Workstation_x86_64_os ]
katello> 

created 2 repos:
=================

katello> repo list --org sghai_org
-----------------------------------------------------------------------------
               Repo List For Org sghai_org Environment Library

 Id     Name                                                        Package Count  
-----------------------------------------------------------------------------
 1236   rhel62_pub_rhel_released_RHEL-6_6.2_Client_x86_64_os        0              
 1237   rhel62_pub_rhel_released_RHEL-6_6.2_Workstation_x86_64_os   0              
katello> 


sync successfully completed:
===========================

katello> repo status --name "rhel62_pub_rhel_released_RHEL-6_6.2_Client_x86_64_os" --org sghai_org --product rhel6
-----------------------------------------------------------------------------
                              Repository Status
-----------------------------------------------------------------------------

Package Count: 2864
Last Sync:     2012/02/16 12:13:41
Sync State:    Finished

katello> 


katello> repo status --name "rhel62_pub_rhel_released_RHEL-6_6.2_Workstation_x86_64_os" --org sghai_org --product rhel6
-----------------------------------------------------------------------------
                              Repository Status
-----------------------------------------------------------------------------

Package Count: 3804
Last Sync:     2012/02/16 12:15:21
Sync State:    Finished

katello>