Browse Source

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
Bharat Kumar Kobagana 3 years ago
parent
commit
daeb29f125
2 changed files with 15 additions and 5 deletions
  1. 8
    3
      devstack/gluster-functions.sh
  2. 7
    2
      devstack/plugin.sh

+ 8
- 3
devstack/gluster-functions.sh View File

@@ -3,15 +3,20 @@
3 3
 # devstack/gluster-functions.sh
4 4
 # Functions to control the installation and configuration of the **GlusterFS** storage
5 5
 
6
-# Installs 3.6.x version of glusterfs
6
+# Installs 3.x version of glusterfs
7 7
 # Triggered from devstack/plugin.sh as part of devstack "pre-install"
8 8
 function install_glusterfs {
9 9
     if [[ ${DISTRO} =~ rhel7 ]] && [[ ! -f /etc/yum.repos.d/glusterfs-epel.repo ]]; then
10 10
         sudo wget $GLUSTERFS_CENTOS_REPO -O /etc/yum.repos.d/glusterfs-epel.repo
11 11
     elif is_ubuntu; then
12 12
         sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 3FE869A9
13
-        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
14
-        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
13
+        if [ "$1" == "3.6" ]; then
14
+            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
15
+            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
16
+        elif [ "$1" == "3.7" ]; then
17
+            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
18
+            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
19
+        fi
15 20
         NO_UPDATE_REPOS=False
16 21
         REPOS_UPDATED=False
17 22
     fi

+ 7
- 2
devstack/plugin.sh View File

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

Loading…
Cancel
Save