From: Alfredo Deza Date: Thu, 5 Jun 2014 12:56:02 +0000 (-0400) Subject: create a helper function to install plugin priorities X-Git-Tag: v1.5.4~3^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f244cf8869e27bddb4708bcceaba35407808662;p=ceph-deploy.git create a helper function to install plugin priorities Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/hosts/centos/install.py b/ceph_deploy/hosts/centos/install.py index 3fce37c..a9d36a2 100644 --- a/ceph_deploy/hosts/centos/install.py +++ b/ceph_deploy/hosts/centos/install.py @@ -120,6 +120,34 @@ def install_epel(distro): ) +def install_yum_priorities(distro): + """ + EPEL started packaging Ceph so we need to make sure that the ceph.repo we + install has a higher priority than the EPEL repo so that when installing + Ceph it will come from the repo file we create. + + The name of the package changed back and forth (!) since CentOS 4: + + From the CentOS wiki:: + + Note: This plugin has carried at least two differing names over time. + It is named yum-priorities on CentOS-5 but was named + yum-plugin-priorities on CentOS-4. CentOS-6 has reverted to + yum-plugin-priorities. + + """ + if distro.normalized_name == 'centos': + if distro.release[0] == '6': + package_name = 'yum-plugin-priorities' + else: + package_name = 'yum-priorities' + + pkg_managers.yum( + distro.conn, + package_name, + ) + + def mirror_install(distro, repo_url, gpg_url, adjust_repos): repo_url = repo_url.strip('/') # Remove trailing slashes gpg_url_path = gpg_url.split('file://')[-1] # Remove file if present