Bug 886178 - configure yum-plugin-priorities
Summary: configure yum-plugin-priorities
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: doc-Getting_Started_Guide
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Stephen Gordon
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On: 889306
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-11 17:17 UTC by Derek Higgins
Modified: 2013-02-21 20:30 UTC (History)
4 users (show)

Fixed In Version: Red_Hat_OpenStack_Preview-Getting_Started_Guide-2-web-en-US-1.0-11.el6eng
Doc Type: Bug Fix
Doc Text:
Clone Of: 886177
Environment:
Last Closed: 2013-02-21 20:30:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Derek Higgins 2012-12-11 17:17:46 UTC
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 18:22:51 UTC
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 16:56:43 UTC
(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 17:14:47 UTC
(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 17:19:55 UTC
commit 69e24f29fbc0c8bc9e3d9d158c49bc22587059a2

Comment 6 Stephen Gordon 2013-01-25 21:47:00 UTC
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.