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 767311 - redhat.repo being created with empty repo name headers, breaks yum.
Summary: redhat.repo being created with empty repo name headers, breaks yum.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-12-13 18:54 UTC by Corey Welton
Modified: 2019-09-26 13:26 UTC (History)
3 users (show)

Fixed In Version: katello-0.1.220-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
(client): subscription-manager-0.98.3-1.el6.x86_64 (host): katello-0.1.135-2.el6.x86_64 ping result: {"result":"ok","status":{"pulp":{"result":"ok","duration_ms":"90"},"candlepin_auth":{"result":"ok","duration_ms":"17"},"pulp_auth":{"result":"ok","duration_ms":"52"},"candlepin":{"result":"ok","duration_ms":"18"}}}
Last Closed: 2012-08-22 18:13:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Corey Welton 2011-12-13 18:54:26 UTC
Description of problem:
After registering a system to katello and subsequently subscribing to a variety of (non-RH?) repos, a record is created in redhat.repo with an empty repo/product name header. Afterwards, yum cannot update.

Version-Release number of selected component (if applicable):


How reproducible:
readily, at least following these exact steps.

Steps to Reproduce:
1. On CLIENT box, rename or delete any existing /etc/yum.repos.d/redhat.repo
2. On KATELLO box:
  a) if it does not exist already, create a "dev" environment in ACME_Corporation.
  a) add RH product content to ACME_Corporation
  b) add two repos like so, to ACME_Corporation:
    Provider: Google
      Product: talkplugin
        Repo (name): talk plugin x86_64
        Repo (url): http://dl.google.com/linux/talkplugin/rpm/stable/x86_64
      Product: music
        Repo (name): music - x86_64
        Repo (url): http://dl.google.com/linux/musicmanager/rpm/stable/x86_64
3. Sync all repos
4. On CLIENT box, register to katello:
  subscription-manager register --force --username=admin --password=admin --org=ACME_Corporation --env=dev
5. List all available subscriptions in katello:
   subscription-manager list --available
6. Attempt to subscribe to all three available pools (substituting proper poolids)
  subscription-manager subscribe --pool  8a8b67673433345d0134342b77ed0028  --pool 8a8b67673433345d01343787515f0058 --pool 8a8b67673433345d013437887162005b
7. yum update
  
Actual results:
Loaded plugins: katello, product-id, rhnplugin, subscription-manager
Updating certificate-based repositories.
Config Error: File contains no section headers.
file: file://///etc/yum.repos.d/redhat.repo, line: 9
'[]\n'

Observing the newly created /etc/yum.repos.d/redhat.repo indicates:

[]
baseurl = 
...etc...


Expected results:
* The header should get populated appropriately
* Yum should work.

Additional info:

* I am fairly certain that this worked in recent builds of katello, because I was doing gpgkey testing and got as far as being able to pull down package names. Please see environment field above for relevant package versioning.

Comment 1 Kedar Bidarkar 2011-12-14 13:41:35 UTC
I get the repo name headers, but the $env values do not get parsed for repos other than f15.

It's the same even if I create a completely new env path, templates, changesets and promote all the three products at once. Only f15 repo's $env value get's parsed.

[music_manager]
name = music_manager
baseurl = https://xxx.redhat.com/pulp/repos/ACME_Corporation/$env/custom/music/music_manager
enabled = 1
gpgcheck = 1
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-local.pem
sslclientkey = /etc/pki/entitlement/2808427121217571823-key.pem
sslclientcert = /etc/pki/entitlement/2808427121217571823.pem

[gtalk_plugin]
name = gtalk_plugin
baseurl = https://xxx.redhat.com/pulp/repos/ACME_Corporation/$env/custom/gtalk/gtalk_plugin
enabled = 1
gpgcheck = 1
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-local.pem
sslclientkey = /etc/pki/entitlement/7877338748277184922-key.pem
sslclientcert = /etc/pki/entitlement/7877338748277184922.pem

[f15]
name = f15
baseurl = https://xxx.redhat.com/pulp/repos/ACME_Corporation/$env/custom/fedora15/f15
enabled = 1
gpgcheck = 1
sslverify = 1
sslcacert = /etc/rhsm/ca/candlepin-local.pem
sslclientkey = /etc/pki/entitlement/3702291654344418776-key.pem
sslclientcert = /etc/pki/entitlement/3702291654344418776.pem



[root@dhcp201-187 yum.repos.d]# yumdownloader google-talkplugin
Loaded plugins: product-id
https://scalpel.lab.eng.pnq.redhat.com/pulp/repos/ACME_Corporation/%24env/custom/gtalk/gtalk_plugin/google-talkplugin-2.5.6.0-1.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found : https://scalpel.lab.eng.pnq.redhat.com/pulp/repos/ACME_Corporation/$env/custom/gtalk/gtalk_plugin/google-talkplugin-2.5.6.0-1.x86_64.rpm
Trying other mirror.
Could not download/verify pkg google-talkplugin-2.5.6.0-1.x86_64: failure: google-talkplugin-2.5.6.0-1.x86_64.rpm from gtalk_plugin: [Errno 256] No more mirrors to try.



[root@scalpel Packages]# rpm -qav | grep -i katello 
katello-trusted-ssl-cert-1.0-1.noarch
katello-cli-common-0.1.23-3.el6.noarch
katello-certs-tools-1.0.1-2.el6.noarch
katello-glue-foreman-0.1.135-2.el6.x86_64
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-0.1.23-3.el6.noarch
katello-all-0.1.135-2.el6.x86_64
katello-configure-0.1.31-2.el6.noarch
katello-common-0.1.135-2.el6.noarch
katello-glue-candlepin-0.1.135-2.el6.x86_64
katello-0.1.135-2.el6.x86_64
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-glue-pulp-0.1.135-2.el6.x86_64

Comment 2 Bryan Kearney 2011-12-14 13:48:54 UTC
Corey.. can you plese attach the certificate file?

Comment 3 Bryan Kearney 2011-12-14 13:50:10 UTC
Kedar:

Unles you have the latest subscription-mamnager you will not see the $env be replaced. To Work around this create a file 

/etc/yum/vars/env

with on line which is the name of your environment.

Comment 4 Corey Welton 2011-12-16 14:10:21 UTC
Kedar,

Your test is invalid.  You've not named your repos/products exactly as I have above.  I suspect it has something to do with spaces in the names. I am retesting with a fresh katello.

Bryan: the RH cert?  It was one from November, I forget which, now - but it's not choking on the RH cert, it's choking on a third party repo.

Comment 7 Tomas Strachota 2012-02-07 12:39:28 UTC
Fixed in katello-0.1.220-1

Tested with:
subscription-manager-0.99.6-1
python-rhsm-0.99.3-1
candlepin-0.5.8-1
katello-0.1.220-1

Got following headers in redhat.repo:
ACME_Corporation_talkplugin_talk_plugin_x86_64
ACME_Corporation_music_music_x86_64

Comment 8 Corey Welton 2012-02-15 20:14:20 UTC
QA Verified.


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