Bug 746238

Summary: Duplicate repo exposed to RHSM with url of upstream repo
Product: Red Hat Satellite Reporter: Jeff Weiss <jweiss>
Component: APIAssignee: Tomas Strachota <tstrachota>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.0CC: bkearney, dajohnso, kbidarka
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-0.1.96-1.git.15.371d68d Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:01:18 UTC Type: ---
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: 747354    

Description Jeff Weiss 2011-10-14 13:42:10 UTC
Description of problem:
When subscribing to a product in RHSM, two repos are produced, one is correct, the other is corrupted and exposes the original repo url that pulp is syncing from.

Version-Release number of selected component (if applicable):
katello-0.1.92-1.git.34.2858cdd.fc15.noarch

How reproducible:


Steps to Reproduce:
1. Create an environment Development in ACME_Corporation
2. Create a provider and product "katello", with a repo "f14-x86-64", url of http://repos.fedorapeople.org/repos/katello/katello/fedora-14/x86_64/
3. Sync the product.
4. Promote the product to development.
5. on an RHSM box, register to your katello server, and subscribe to the product katello. 
6. yum repolist (this will generate a redhat.repo file)

Actual results:
/etc/yum.repos.d/redhat.repo contents:

#
# Red Hat Repositories
# Managed by (rhsm) subscription-manager
#





[1318464917816-f14-x86-64-ACME_Corporation]
name = f14-x86-64
baseurl = /ACME_Corporation/$env/http://repos.fedorapeople.org/repos/katello/katello/fedora-14/x86_64/
enabled = 0
gpgcheck = 1
sslverify = 1
sslcacert = /etc/pki/CA/certs/pulp-ca.crt
sslclientkey = /etc/pki/entitlement/3159983628409910714-key.pem
sslclientcert = /etc/pki/entitlement/3159983628409910714.pem

[1318464917816-f14-x86-64-Development-ACME_Corporation]
name = f14-x86-64
baseurl = https://katello-test-f15-1.usersys.redhat.com/pulp/repos/ACME_Corporation/$env/katello/f14-x86-64
enabled = 1
gpgcheck = 1
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-ca-pub.key
sslclientkey = /etc/pki/entitlement/3159983628409910714-key.pem
sslclientcert = /etc/pki/entitlement/3159983628409910714.pem


Expected results:
The first repo is invalid and should not be there.  It also exposes the original repo url in katello, which should never happen.

Additional info:

Comment 1 Tomas Strachota 2011-10-17 08:56:42 UTC
This will be fixed when we stop creating content in Candlepin for repos in Locker environments. I'm working on a patch.

Comment 2 Tomas Strachota 2011-10-26 12:41:33 UTC
Fixed in:

commit b90cc5f0eee06a704560c26e45be2cbac213880d
Author: Tomas Strachota <tstrachota>
Date:   Wed Oct 26 14:02:24 2011 +0200

Comment 3 Kedar Bidarkar 2011-11-16 06:03:43 UTC
[root@dhcp201-xxx yum.repos.d]# cat redhat.repo 
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#

[fedora-15]
name = fedora-15
baseurl = https://dhcp201-xxx.englab.pnq.redhat.com/pulp/repos/ACME_Corporation/$env/f15/fedora-15
enabled = 1
gpgcheck = 1
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-ca.crt
sslclientkey = /etc/pki/entitlement/4915222881176597898-key.pem
sslclientcert = /etc/pki/entitlement/4915222881176597898.pem