Bug 886178 - configure yum-plugin-priorities
configure yum-plugin-priorities
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: doc-Getting_Started_Guide (Show other bugs)
2.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Stephen Gordon
ecs-bugs
: Documentation, Triaged
Depends On: 889306
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-11 12:17 EST by Derek Higgins
Modified: 2013-02-21 15:30 EST (History)
4 users (show)

See Also:
Fixed In Version: Red_Hat_OpenStack_Preview-Getting_Started_Guide-2-web-en-US-1.0-11.el6eng
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 886177
Environment:
Last Closed: 2013-02-21 15:30:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Derek Higgins 2012-12-11 12:17:46 EST
details of how todo this manually need to also be put into the docs

+++ This bug was initially created as a clone of Bug #886177 +++

openstack-packstack needs to configure the openstack yum repository to have a higher priority then EPEL. 

If installed RHOS should have a higher priority.
Comment 2 Alan Pevec 2013-01-15 13:22:51 EST
In theory, following should work:
$ yum-config-manager --setopt=rhel-server-ost-6-folsom-rpms.priority=1 --save

but this fails on RHEL 6.4 with traceback:
  File "/usr/bin/yum-config-manager", line 154, in <module>
    writeRawConfigFile(fn, 'main', ybc.conf.yumvar,
AttributeError: 'YumConf' object has no attribute 'conf'

Next best option would be to use openstack-config which is a pretty much generic INI editor, and handles .repo files just fine:
$ openstack-config --set /etc/yum.repos.d/redhat.repo rhel-server-ost-6-folsom-rpms priority 1

So in Guide, add in "1.2. Installing Utilities" after $ sudo subscription-manager list example box:

Install YUM priorities plugin:
$ sudo yum install yum-plugin-priorities

Raise priority of the Red Hat OpenStack Folsom repository:
$ openstack-config --set /etc/yum.repos.d/redhat.repo rhel-server-ost-6-folsom-rpms priority 1
Comment 3 Stephen Gordon 2013-01-24 11:56:43 EST
(In reply to comment #2)
> In theory, following should work:
> $ yum-config-manager --setopt=rhel-server-ost-6-folsom-rpms.priority=1 --save
> 
> but this fails on RHEL 6.4 with traceback:
>   File "/usr/bin/yum-config-manager", line 154, in <module>
>     writeRawConfigFile(fn, 'main', ybc.conf.yumvar,
> AttributeError: 'YumConf' object has no attribute 'conf'
> 
> Next best option would be to use openstack-config which is a pretty much
> generic INI editor, and handles .repo files just fine:
> $ openstack-config --set /etc/yum.repos.d/redhat.repo
> rhel-server-ost-6-folsom-rpms priority 1

I did some poking and found that this actually appears to work:

yum-config-manager --setopt=rhel-server-ost-6-folsom-rpms.priority=1 --save rhel-server-ost-6-folsom-rpms
Comment 4 Stephen Gordon 2013-01-24 12:14:47 EST
(In reply to comment #3:
> I did some poking and found that this actually appears to work:
> 
> yum-config-manager --setopt=rhel-server-ost-6-folsom-rpms.priority=1 --save
> rhel-server-ost-6-folsom-rpms

Further to that I found that by adding the instruction to install "yum-plugin-priorities" at the same time as "yum-utils" I was able to combine this into the step for enabling the repository in the first place (NB: --enable implicitly saves):

# yum-config-manager --enable rhel-server-ost-6-folsom-rpms --setopt="rhel-server-ost-6-folsom-rpms.priority=1"
Comment 5 Stephen Gordon 2013-01-24 12:19:55 EST
commit 69e24f29fbc0c8bc9e3d9d158c49bc22587059a2
Comment 6 Stephen Gordon 2013-01-25 16:47:00 EST
Fixed in Red_Hat_OpenStack_Preview-Getting_Started_Guide-2-web-en-US-1.0-11.el6eng

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