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
This commit is contained in:
@@ -913,15 +913,20 @@ function install_ceph {
|
|||||||
# Update package repo.
|
# Update package repo.
|
||||||
REPOS_UPDATED=False
|
REPOS_UPDATED=False
|
||||||
install_package ${CEPH_PACKAGES}
|
install_package ${CEPH_PACKAGES}
|
||||||
else
|
elif is_fedora; then
|
||||||
DISTRO_TYPE=${os_VENDOR,,}
|
|
||||||
RELEASE=$(echo $os_RELEASE | awk -F . '{print $1}')
|
RELEASE=$(echo $os_RELEASE | awk -F . '{print $1}')
|
||||||
|
if [ "$os_VENDOR" != "Fedora" ] && [ $RELEASE != 7 ]; then
|
||||||
|
# Fedora proper includes the packages already in the distribution,
|
||||||
|
# while CentOS/RHEL/etc needs to be at version 7.
|
||||||
|
die $LINENO "Need Fedora or CentOS/RHEL/etc 7"
|
||||||
|
fi
|
||||||
|
DISTRO_TYPE=${os_VENDOR,,}
|
||||||
|
|
||||||
CEPH_PACKAGES="ceph"
|
CEPH_PACKAGES="ceph"
|
||||||
|
|
||||||
if is_ceph_enabled_for_service manila; then
|
if is_ceph_enabled_for_service manila; then
|
||||||
if [ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]; then
|
if [ $MANILA_CEPH_DRIVER == 'cephfsnfs' ]; then
|
||||||
if [ $DISTRO_TYPE == 'centos' ] && [ $RELEASE == 7 ]; then
|
if [ $DISTRO_TYPE == 'centos' ]; then
|
||||||
curl -L https://shaman.ceph.com/api/repos/ceph/luminous/latest/$DISTRO_TYPE/$RELEASE/repo | \
|
curl -L https://shaman.ceph.com/api/repos/ceph/luminous/latest/$DISTRO_TYPE/$RELEASE/repo | \
|
||||||
sudo tee /etc/yum.repos.d/ext-ceph.repo
|
sudo tee /etc/yum.repos.d/ext-ceph.repo
|
||||||
curl -L https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/$DISTRO_TYPE/$RELEASE/flavors/ceph_luminous/repo | \
|
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 {
|
|||||||
fi
|
fi
|
||||||
CEPH_PACKAGES="${CEPH_PACKAGES} nfs-ganesha nfs-ganesha-ceph"
|
CEPH_PACKAGES="${CEPH_PACKAGES} nfs-ganesha nfs-ganesha-ceph"
|
||||||
else
|
else
|
||||||
if [ $DISTRO_TYPE == 'centos' ] && [ $RELEASE == 7 ]; then
|
if [ $DISTRO_TYPE == 'centos' ]; then
|
||||||
curl -L https://shaman.ceph.com/api/repos/ceph/jewel/latest/$DISTRO_TYPE/$RELEASE/repo | \
|
curl -L https://shaman.ceph.com/api/repos/ceph/jewel/latest/$DISTRO_TYPE/$RELEASE/repo | \
|
||||||
sudo tee /etc/yum.repos.d/ext-ceph.repo
|
sudo tee /etc/yum.repos.d/ext-ceph.repo
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if [ $DISTRO_TYPE == 'centos' ]; then
|
||||||
|
curl -L https://shaman.ceph.com/api/repos/ceph/jewel/latest/$DISTRO_TYPE/$RELEASE/repo | \
|
||||||
|
sudo tee /etc/yum.repos.d/ext-ceph.repo
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ENABLE_CEPH_RGW" = "True" ]; then
|
if [ "$ENABLE_CEPH_RGW" = "True" ]; then
|
||||||
install_package ceph-radosgw
|
|
||||||
CEPH_PACKAGES="${CEPH_PACKAGES} ceph-radosgw"
|
CEPH_PACKAGES="${CEPH_PACKAGES} ceph-radosgw"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_package ${CEPH_PACKAGES}
|
install_package ${CEPH_PACKAGES}
|
||||||
|
else
|
||||||
|
die $LINENO "${os_VENDOR} is not supported by the Ceph plugin for Devstack"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user