summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
authorLuigi Toscano <ltoscano@redhat.com>2018-05-30 16:16:45 +0200
committerLuigi Toscano <ltoscano@redhat.com>2018-05-30 16:16:45 +0200
commit023be1103fa60f610da80ec498758d093d2f809a (patch)
tree8307ac1bff70e14ec4ab6334718d38d8184895e7 /devstack
parent5b07d43b3ecc39640dabd11376847c4d9e882cc1 (diff)
Cleanup CentOS/Fedora support
Clean the "CentOS" branch, so that it should work for all CentOS/RHEL variants (7.x). Make sure to install the required repositories also in the non-Manila case. Fedora already ships Ceph packages so does not need additional repositories. Do not try to install ceph-radosgw twice. Finally, explicitly fail for other distributions (not supported de-facto even in the current code). Change-Id: I83b1fffad405bc122bc55ef1173f5239f41d2b36
Notes
Notes (review): Code-Review+2: Tom Barron <tpb@dyncloud.net> Code-Review+2: Ramana Raja <rraja@redhat.com> Workflow+1: Ramana Raja <rraja@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 05 Jun 2018 11:17:02 +0000 Reviewed-on: https://review.openstack.org/571294 Project: openstack/devstack-plugin-ceph Branch: refs/heads/master
Diffstat (limited to 'devstack')
-rw-r--r--devstack/lib/ceph21
1 files changed, 16 insertions, 5 deletions
diff --git a/devstack/lib/ceph b/devstack/lib/ceph
index 96ba38c..99f788f 100644
--- a/devstack/lib/ceph
+++ b/devstack/lib/ceph
@@ -913,15 +913,20 @@ function install_ceph {
913 # Update package repo. 913 # Update package repo.
914 REPOS_UPDATED=False 914 REPOS_UPDATED=False
915 install_package ${CEPH_PACKAGES} 915 install_package ${CEPH_PACKAGES}
916 else 916 elif is_fedora; then
917 DISTRO_TYPE=${os_VENDOR,,}
918 RELEASE=$(echo $os_RELEASE | awk -F . '{print $1}') 917 RELEASE=$(echo $os_RELEASE | awk -F . '{print $1}')
918 if [ "$os_VENDOR" != "Fedora" ] && [ $RELEASE != 7 ]; then
919 # Fedora proper includes the packages already in the distribution,
920 # while CentOS/RHEL/etc needs to be at version 7.
921 die $LINENO "Need Fedora or CentOS/RHEL/etc 7"
922 fi
923 DISTRO_TYPE=${os_VENDOR,,}
919 924
920 CEPH_PACKAGES="ceph" 925 CEPH_PACKAGES="ceph"
921 926
922 if is_ceph_enabled_for_service manila; then 927 if is_ceph_enabled_for_service manila; then
923 if [ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]; then 928 if [ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]; then
924 if [ $DISTRO_TYPE == 'centos' ] && [ $RELEASE == 7 ]; then 929 if [ $DISTRO_TYPE == 'centos' ]; then
925 curl -L https://shaman.ceph.com/api/repos/ceph/luminous/latest/$DISTRO_TYPE/$RELEASE/repo | \ 930 curl -L https://shaman.ceph.com/api/repos/ceph/luminous/latest/$DISTRO_TYPE/$RELEASE/repo | \
926 sudo tee /etc/yum.repos.d/ext-ceph.repo 931 sudo tee /etc/yum.repos.d/ext-ceph.repo
927 curl -L https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/$DISTRO_TYPE/$RELEASE/flavors/ceph_luminous/repo | \ 932 curl -L https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/$DISTRO_TYPE/$RELEASE/flavors/ceph_luminous/repo | \
@@ -929,19 +934,25 @@ function install_ceph {
929 fi 934 fi
930 CEPH_PACKAGES="${CEPH_PACKAGES} nfs-ganesha nfs-ganesha-ceph" 935 CEPH_PACKAGES="${CEPH_PACKAGES} nfs-ganesha nfs-ganesha-ceph"
931 else 936 else
932 if [ $DISTRO_TYPE == 'centos' ] && [ $RELEASE == 7 ]; then 937 if [ $DISTRO_TYPE == 'centos' ]; then
933 curl -L https://shaman.ceph.com/api/repos/ceph/jewel/latest/$DISTRO_TYPE/$RELEASE/repo | \ 938 curl -L https://shaman.ceph.com/api/repos/ceph/jewel/latest/$DISTRO_TYPE/$RELEASE/repo | \
934 sudo tee /etc/yum.repos.d/ext-ceph.repo 939 sudo tee /etc/yum.repos.d/ext-ceph.repo
935 fi 940 fi
936 fi 941 fi
942 else
943 if [ $DISTRO_TYPE == 'centos' ]; then
944 curl -L https://shaman.ceph.com/api/repos/ceph/jewel/latest/$DISTRO_TYPE/$RELEASE/repo | \
945 sudo tee /etc/yum.repos.d/ext-ceph.repo
946 fi
937 fi 947 fi
938 948
939 if [ "$ENABLE_CEPH_RGW" = "True" ]; then 949 if [ "$ENABLE_CEPH_RGW" = "True" ]; then
940 install_package ceph-radosgw
941 CEPH_PACKAGES="${CEPH_PACKAGES} ceph-radosgw" 950 CEPH_PACKAGES="${CEPH_PACKAGES} ceph-radosgw"
942 fi 951 fi
943 952
944 install_package ${CEPH_PACKAGES} 953 install_package ${CEPH_PACKAGES}
954 else
955 die $LINENO "${os_VENDOR} is not supported by the Ceph plugin for Devstack"
945 fi 956 fi
946} 957}
947 958