From daeb29f12532d9de78658359689e351ead2f151f Mon Sep 17 00:00:00 2001 From: Bharat Kumar Kobagana Date: Wed, 23 Sep 2015 17:20:31 +0530 Subject: [PATCH] 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 --- devstack/gluster-functions.sh | 11 ++++++++--- devstack/plugin.sh | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/devstack/gluster-functions.sh b/devstack/gluster-functions.sh index 28026e6..853d38b 100755 --- a/devstack/gluster-functions.sh +++ b/devstack/gluster-functions.sh @@ -3,15 +3,20 @@ # devstack/gluster-functions.sh # 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" function install_glusterfs { 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 elif is_ubuntu; then 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 - 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 + if [ "$1" == "3.6" ]; then + 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 REPOS_UPDATED=False fi diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 9c47764..406ea69 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -108,8 +108,13 @@ GLUSTERFS_CENTOS_REPO=${GLUSTERFS_CENTOS_REPO:-"http://download.gluster.org/pub/ source $GLUSTERFS_PLUGIN_DIR/gluster-functions.sh if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then - echo_summary "Installing GlusterFS" - install_glusterfs + if is_service_enabled manila && [[ "$CONFIGURE_GLUSTERFS_MANILA" == "True" ]]; then + 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 if is_service_enabled c-bak && [[ "$CONFIGURE_GLUSTERFS_BACKUP" == "True" ]]; then echo_summary "Configuring GlusterFS as a backend for Cinder backup driver"