Install glusterfs 3.7 for manila jobs

This patch modifies devstack-plugin-glusterfs code to install
glusterfs 3.7 for manila specific jobs.

Change-Id: Ica4a44cd8dfe65a2330f65a1dcbb69a24fb2c805
This commit is contained in:
Bharat Kumar Kobagana 2015-09-23 17:20:31 +05:30
parent aedb8a1050
commit daeb29f125
2 changed files with 15 additions and 5 deletions

View File

@ -3,15 +3,20 @@
# devstack/gluster-functions.sh # devstack/gluster-functions.sh
# Functions to control the installation and configuration of the **GlusterFS** storage # Functions to control the installation and configuration of the **GlusterFS** storage
# Installs 3.6.x version of glusterfs # Installs 3.x version of glusterfs
# Triggered from devstack/plugin.sh as part of devstack "pre-install" # Triggered from devstack/plugin.sh as part of devstack "pre-install"
function install_glusterfs { function install_glusterfs {
if [[ ${DISTRO} =~ rhel7 ]] && [[ ! -f /etc/yum.repos.d/glusterfs-epel.repo ]]; then if [[ ${DISTRO} =~ rhel7 ]] && [[ ! -f /etc/yum.repos.d/glusterfs-epel.repo ]]; then
sudo wget $GLUSTERFS_CENTOS_REPO -O /etc/yum.repos.d/glusterfs-epel.repo sudo wget $GLUSTERFS_CENTOS_REPO -O /etc/yum.repos.d/glusterfs-epel.repo
elif is_ubuntu; then elif is_ubuntu; then
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 3FE869A9 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 3FE869A9
echo "deb http://ppa.launchpad.net/gluster/glusterfs-3.6/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/glusterfs-3_6-trusty.list if [ "$1" == "3.6" ]; then
echo "deb-src http://ppa.launchpad.net/gluster/glusterfs-3.6/ubuntu trusty main" | sudo tee --append /etc/apt/sources.list.d/glusterfs-3_6-trusty.list echo "deb http://ppa.launchpad.net/gluster/glusterfs-3.6/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/glusterfs-3_6-trusty.list
echo "deb-src http://ppa.launchpad.net/gluster/glusterfs-3.6/ubuntu trusty main" | sudo tee --append /etc/apt/sources.list.d/glusterfs-3_6-trusty.list
elif [ "$1" == "3.7" ]; then
echo "deb http://ppa.launchpad.net/gluster/glusterfs-3.7/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/glusterfs-3_7-trusty.list
echo "deb-src http://ppa.launchpad.net/gluster/glusterfs-3.7/ubuntu trusty main" | sudo tee --append /etc/apt/sources.list.d/glusterfs-3_7-trusty.list
fi
NO_UPDATE_REPOS=False NO_UPDATE_REPOS=False
REPOS_UPDATED=False REPOS_UPDATED=False
fi fi

View File

@ -108,8 +108,13 @@ GLUSTERFS_CENTOS_REPO=${GLUSTERFS_CENTOS_REPO:-"http://download.gluster.org/pub/
source $GLUSTERFS_PLUGIN_DIR/gluster-functions.sh source $GLUSTERFS_PLUGIN_DIR/gluster-functions.sh
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
echo_summary "Installing GlusterFS" if is_service_enabled manila && [[ "$CONFIGURE_GLUSTERFS_MANILA" == "True" ]]; then
install_glusterfs echo_summary "Installing GlusterFS 3.7"
install_glusterfs 3.7
else
echo_summary "Installing GlusterFS 3.6"
install_glusterfs 3.6
fi
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
if is_service_enabled c-bak && [[ "$CONFIGURE_GLUSTERFS_BACKUP" == "True" ]]; then if is_service_enabled c-bak && [[ "$CONFIGURE_GLUSTERFS_BACKUP" == "True" ]]; then
echo_summary "Configuring GlusterFS as a backend for Cinder backup driver" echo_summary "Configuring GlusterFS as a backend for Cinder backup driver"