Bug 889306

Summary: yum-config-manager issues in 1.1. Repository Configuration
Product: Red Hat OpenStack Reporter: Alan Pevec <apevec>
Component: doc-Getting_Started_GuideAssignee: Stephen Gordon <sgordon>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: breeler, derekh, rbryant, sgordon
Target Milestone: ---Keywords: Documentation, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Red_Hat_OpenStack_Preview-Getting_Started_Guide-2-web-en-US-1.0-9.el6eng Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 15:30:11 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 886178    

Description Alan Pevec 2012-12-20 13:26:56 EST
- yum-config-manager is part of yum-utils which is not in minimal install
- The yum-config-manager commands do nothing before CDN repositories are refreshed. Need to run yum repolist first.

So please add before first yum-config-manager command:

$ yum repolist

$ yum install yum-utils
Comment 1 Derek Higgins 2012-12-20 18:16:12 EST
*** Bug 886548 has been marked as a duplicate of this bug. ***
Comment 2 Perry Myers 2012-12-22 21:57:53 EST
*** Bug 889557 has been marked as a duplicate of this bug. ***
Comment 3 Perry Myers 2012-12-22 21:58:58 EST
Some add'l detail for this bug:
Description of problem:

In section 1.1 of the doc for Repository Configuration, the steps are roughly as follows:

1. sudo subscription-manager register
2. sudo subscription-manager list --available
3. sudo subscription-manager subscribe --pool=POOLID
4. sudo yum-config-manager --disable rhel-server-ost-6-preview-rpms
5. sudo yum-config-manager --enable rhel-server-ost-6-folsom-rpms
6. sudo yum-config-manager --enable rhel-6-server-beta-rpms
7. sudo yum repolist

This set of steps will fail for most people, because /etc/yum.repos.d/redhat.repo is not populated with repositories until after the first yum repolist command is run.  So the yum-config-manager steps in 4/5/6 end up being ineffective, since there is no yum repo configuration for them to act on.

Instead we need an extra step here:
3.5. sudo yum repolist

Inserting the yum repolist here will populate the redhat.repo file, and then the subsequent yum-config-manager steps will have effect.

Also, we should provide sample output for each of the yum repolist commands so that folks know what to expect at each step from yum repolist.

It should look like this:

repo id                       repo name                                   status
rhel-6-server-beta-rpms       Red Hat Enterprise Linux 6 Server Beta (RPMs)1,103
rhel-6-server-rpms            Red Hat Enterprise Linux 6 Server (RPMs)     8,770
rhel-server-ost-6-folsom-rpms Red Hat OpenStack Folsom Preview (RPMs)      138
repolist: 11,066

(Note, I omitted a bunch of other irrelevant repos, the above three are the ones to make sure that are present)

It should also be noted that the output of yum-config-manager --enable should be to show the configuration for the repository that you just enabled.  For example, yum-config-manager --enable on the RHEL 6.4 beta repo shows this:

========================================================================================== repo: rhel-6-server-beta-rpms ==========================================================================================
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/6Server
baseurl = https://cdn.redhat.com/content/beta/rhel/server/6/6Server/x86_64/os
cache = 0
cachedir = /var/cache/yum/x86_64/6Server/rhel-6-server-beta-rpms
cost = 1000
enabled = True
enablegroups = True
exclude = 
failovermethod = priority
gpgcadir = /var/lib/yum/repos/x86_64/6Server/rhel-6-server-beta-rpms/gpgcadir
gpgcakey = 
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/6Server/rhel-6-server-beta-rpms/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,
hdrdir = /var/cache/yum/x86_64/6Server/rhel-6-server-beta-rpms/headers
http_caching = all
includepkgs = 
keepalive = True
mdpolicy = group:primary
mediaid = 
metadata_expire = 86400
metalink = 
mirrorlist = 
mirrorlist_expire = 86400
name = Red Hat Enterprise Linux 6 Server Beta (RPMs)
old_base_cache_dir = 
password = 
persistdir = /var/lib/yum/repos/x86_64/6Server/rhel-6-server-beta-rpms
pkgdir = /var/cache/yum/x86_64/6Server/rhel-6-server-beta-rpms/packages
proxy = 
proxy_dict = 
proxy_password = 
proxy_username = 
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientcert = /etc/pki/entitlement/4625270554705102875.pem
sslclientkey = /etc/pki/entitlement/4625270554705102875-key.pem
sslverify = True
throttle = 0
timeout = 30.0
username =
Comment 4 Stephen Gordon 2013-01-16 10:11:42 EST
Bug # 886178 is related here. There the suggestion is to use the more generic openstack-config tool to edit the redhat.repo file because yum-config-manager doesn't support the option being changed.

For consistency I suspect we probably need to use openstack-config for both?
Comment 5 Stephen Gordon 2013-01-21 12:05:09 EST
(In reply to comment #4)
> For consistency I suspect we probably need to use openstack-config for both?

This was actually a bit off the mark, because to install openstack-config in the first place you need to have enabled the RHOS repository. So these will actually require separate action after all.
Comment 6 Stephen Gordon 2013-01-21 15:23:38 EST
I've made a fair few changes to the way this procedure is laid out, in particular:

- Added a quick preamble explaining all commands need to be run as root and that you can log in as root directly or use sudo, if configured (I know we have bugs elsewhere about configuring sudo).
- Added output *where appropriate*. Note that this does not mean every single command now has full and complete output because frequently where UUIDs are involved or we're using employee subscriptions for testing this doesn't make sense.
- Added steps for yum repolist.
- Added step for installation of yum-utils, previously it seems it was assumed yum-config-manager was available but it actually isn't in @minimal.
- Various minor language cleanups and tweaks.

commit 1e348cd7c38247be5bf1b4f2f66ce3c993c5774c
Comment 7 Stephen Gordon 2013-01-23 12:51:19 EST
Fixed in: Red_Hat_OpenStack_Preview-Getting_Started_Guide-2-web-en-US-1.0-9.el6eng

Stage links to follow.
Comment 10 Bruce Reeler 2013-01-29 03:20:24 EST
Fixed typo in comment 9
Comment 11 Andrew Ross 2013-01-29 20:06:59 EST
(In reply to comment #10)
> Fixed typo in comment 9

Thanks Bruce,

Verified: Red_Hat_OpenStack_Preview-Getting_Started_Guide-2-en-US-1.0-13