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 1190021

Summary: Creating repository with docker content is failing
Product: Red Hat Satellite Reporter: Tazim Kolhar <tkolhar>
Component: HammerAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED NOTABUG QA Contact: Tazim Kolhar <tkolhar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: cwelton, kbidarka
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-06 11:24:46 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1190289    

Description Tazim Kolhar 2015-02-06 05:27:05 UTC
Description of problem:
Creating repository with docker content is failing

Version-Release number of selected component (if applicable):
# rpm -q foreman
foreman-1.7.2.3-1.el7sat.noarch


How reproducible:
everytime

Steps to Reproduce:
1.# hammer repository create --name test_dock --organization 'Default Organization' --product test_prod --url 'https://registry.hub.docker.com' --content-type 'docker'
[Foreman] Username: admin
[Foreman] Password for admin: 
Could not create the repository:
  Validation failed: Repository URL and Upstream Name cannot be empty. Both are required for syncing from the upstream.

2.
3.

Actual results:
repository creation failed

Expected results:
repository creation works as expected

Additional info:

Comment 1 RHEL Program Management 2015-02-06 05:43:19 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Kedar Bidarkar 2015-02-06 11:24:46 UTC
Looks like the following option was missing. 

--docker-upstream-name 'fedora'

I was able to create docker repo and start the sync too, so this is fine.

[root@xxxx yum.repos.d]# hammer repository create --name test_docker_fedora --organization-id 1 --product-id 1 --url 'https://registry.hub.docker.com/_/fedora/' --content-type 'docker' --docker-upstream-name 'fedora'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:68: warning: already initialized constant DEFAULT_LABEL_INDENT
[Foreman] Username: admin
[Foreman] Password for admin: 
Repository created
[root@xxxx yum.repos.d]# hammer -u admin -p changeme repository list --organization-id 1 --product-id 1
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:68: warning: already initialized constant DEFAULT_LABEL_INDENT
---|--------------------|--------------|--------------|------------------------------------------
ID | NAME               | PRODUCT      | CONTENT TYPE | URL                                      
---|--------------------|--------------|--------------|------------------------------------------
1  | docker_centos_repo | kbidarka_prd | docker       | https://registry.hub.docker.com/_/centos/
6  | test_docker        | kbidarka_prd | docker       | https://registry.hub.docker.com/_/centos/
7  | test_docker_fedora | kbidarka_prd | docker       | https://registry.hub.docker.com/_/fedora/
---|--------------------|--------------|--------------|------------------------------------------
[root@xxx yum.repos.d]# hammer -u admin -p changeme repository synchronize --id 7 --organization-id 1/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:68: warning: already initialized constant DEFAULT_LABEL_INDENT
[............................................................................                                                                                                         ] [42%]


will be moving to 'CLOSED NOTABUG'