Red Hat Bugzilla – Bug 889306
yum-config-manager issues in 1.1. Repository Configuration
Last modified: 2016-04-26 19:36:53 EDT
- 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
*** Bug 886548 has been marked as a duplicate of this bug. ***
*** Bug 889557 has been marked as a duplicate of this bug. ***
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
(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
failovermethod = priority
gpgcadir = /var/lib/yum/repos/x86_64/6Server/rhel-6-server-beta-rpms/gpgcadir
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
keepalive = True
mdpolicy = group:primary
metadata_expire = 86400
mirrorlist_expire = 86400
name = Red Hat Enterprise Linux 6 Server Beta (RPMs)
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
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
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?
(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.
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.
Fixed in: Red_Hat_OpenStack_Preview-Getting_Started_Guide-2-web-en-US-1.0-9.el6eng
Stage links to follow.
Fixed typo in comment 9
(In reply to comment #10)
> Fixed typo in comment 9