Bug 735359

Summary: Upstream repo in the content is causing issues.
Product: Red Hat Satellite Reporter: Bryan Kearney <bkearney>
Component: APIAssignee: Ivan Necas <inecas>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: cwelton, inecas, mmccune, omaciel
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-0.1.76-1~2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 735116 (view as bug list) Environment:
Last Closed: 2012-08-22 17:55:15 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-09-02 13:25:06 UTC
When createing a product in Katello, Candlepin is populated with two content records. The first references the upstream repo. The second, references the location which would be exposed by pulp. This first content record needs to not exists.

Steps to reproduce

Execute the following script within the katello shell:

# Create a new org
org create --name TestOrg --description "This rocks"

# Create a Custom Provider
provider create --org TestOrg --name katello --type custom
product create --org TestOrg --provider katello --name katello 
repo create --org TestOrg --product katello --name base --url http://repos.fedorapeople.org/repos/katello/katello/fedora-15/x86_64/
provider synchronize --org TestOrg --name katello

# Create an Environemnt
environment create --org TestOrg --name Dev --prior Locker
environment create --org TestOrg --name Prod --prior Dev

# Promtote Katello to Dev
changeset create --org TestOrg --name "PromoteKatello" --environment Dev
changeset update --org TestOrg --name PromoteKatello --environment Dev --add_product katello    
changeset promote --org TestOrg --name PromoteKatello --environment Dev

Now look in the candlepin database. You will see 2 content records. The first has a content url of http://repos.fedorapeople.org/repos/katello/katello/fedora-15/x86_64/. The second has one of katello/base. The first record should not exists as it causes yum to error out when it is used.

Comment 1 Ivan Necas 2011-09-02 13:48:00 UTC
The process with content in CP is as follows:

The first content (with upstream repo) is created, then a repo is created. It corresponds to the Locker repo. The second is created, when the repo is promoted.

We can prevent from creating the content in the first case.

Second case the content is created for Locker environment is while importing manifest. In this case, CP creates the content it self. Should we delete it immediately? Or shouldn't CP create it in the first place?

Comment 2 Bryan Kearney 2011-09-02 13:52:44 UTC
We will never need that first content in candlepin. Pulp will need it to mirror, but candlepin will not. So if it is possible to never create it, that is fine.

Comment 3 Ivan Necas 2011-09-02 16:09:05 UTC
Fixed in commit 2e9f377c3a389d4e86057217b79a6d5053d71671

Comment 4 Corey Welton 2011-12-16 14:23:57 UTC
*** Bug 735116 has been marked as a duplicate of this bug. ***

Comment 6 Og Maciel 2012-02-24 20:13:52 UTC
candlepin=> select name, label, contenturl from cp_content order by name, contenturl asc;

     name     |             label              |           contenturl           
--------------+--------------------------------+--------------------------------
 CFTools      | Seattle_RHN_CFTools            | /custom/RHN/CFTools
 RHEL 6.2     | Seattle_RHN_RHEL_6.2           | /custom/RHN/RHEL_6_2
 RHEL 6Server | Seattle_RHN_RHEL_6Server       | /custom/RHN/RHEL_6Server
 el6-se       | Seattle_SystemEngine_el6-se    | /custom/SystemEngine/el6-se
 el6-tools    | Seattle_SystemEngine_el6-tools | /custom/SystemEngine/el6-tools
(5 rows)




Validated:
* candlepin-0.5.22-1.el6.noarch
* candlepin-tomcat6-0.5.22-1.el6.noarch
* katello-0.1.300-1.el6.noarch
* katello-all-0.1.300-1.el6.noarch
* katello-certs-tools-1.0.2-2.el6.noarch
* katello-cli-0.1.100-2.el6.noarch
* katello-cli-common-0.1.100-2.el6.noarch
* katello-common-0.1.300-1.el6.noarch
* katello-configure-0.1.100-7.el6.noarch
* katello-glue-candlepin-0.1.300-1.el6.noarch
* katello-glue-foreman-0.1.300-1.el6.noarch
* katello-glue-pulp-0.1.300-1.el6.noarch
* katello-httpd-ssl-key-pair-1.0-1.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-repos-0.1.5-1.el6.noarch
* katello-selinux-0.1.7-1.el6.noarch
* katello-trusted-ssl-cert-1.0-1.noarch
* pulp-0.0.267-2.el6.noarch
* pulp-admin-0.0.267-2.el6.noarch
* pulp-client-lib-0.0.267-2.el6.noarch
* pulp-common-0.0.267-2.el6.noarch
* pulp-selinux-server-0.0.267-2.el6.noarch

Comment 8 Mike McCune 2013-08-16 18:17:22 UTC
getting rid of 6.0.0 version since that doesn't exist