Upgrade to glusterfs-7
- Switch from using "service" commands to systemd commands - Fix a previously unhandled bashate error Change-Id: Ia5907f566ebe65db083b80cedc047ba5a9031449
This commit is contained in:
@@ -8,7 +8,7 @@ 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 add-apt-repository ppa:gluster/glusterfs-6 -y
|
sudo add-apt-repository ppa:gluster/glusterfs-7 -y
|
||||||
NO_UPDATE_REPOS=False
|
NO_UPDATE_REPOS=False
|
||||||
REPOS_UPDATED=False
|
REPOS_UPDATED=False
|
||||||
fi
|
fi
|
||||||
@@ -16,31 +16,21 @@ function install_glusterfs {
|
|||||||
install_package glusterfs-server
|
install_package glusterfs-server
|
||||||
install_package xfsprogs
|
install_package xfsprogs
|
||||||
|
|
||||||
if is_fedora; then
|
|
||||||
stop_glusterfs
|
stop_glusterfs
|
||||||
_start_glusterfs
|
_start_glusterfs
|
||||||
fi
|
|
||||||
|
|
||||||
_create_glusterfs_disk
|
_create_glusterfs_disk
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start gluster service
|
# Start gluster service
|
||||||
function _start_glusterfs {
|
function _start_glusterfs {
|
||||||
if is_ubuntu; then
|
sudo systemctl start glusterd
|
||||||
sudo service glusterfs-server start
|
|
||||||
else
|
|
||||||
sudo service glusterd start
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop running gluster service
|
# Stop running gluster service
|
||||||
# Triggered from devstack/plugin.sh as part of devstack "unstack"
|
# Triggered from devstack/plugin.sh as part of devstack "unstack"
|
||||||
function stop_glusterfs {
|
function stop_glusterfs {
|
||||||
if is_ubuntu; then
|
sudo systemctl stop glusterd
|
||||||
sudo service glusterfs-server stop
|
|
||||||
else
|
|
||||||
sudo service glusterd stop
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clean Shares
|
# Clean Shares
|
||||||
@@ -153,7 +143,7 @@ function cleanup_glusterfs {
|
|||||||
# Setting up glusterfs
|
# Setting up glusterfs
|
||||||
function _create_glusterfs_disk {
|
function _create_glusterfs_disk {
|
||||||
# create a backing file disk
|
# create a backing file disk
|
||||||
local disk_image_directory=$(dirname "${GLUSTERFS_DISK_IMAGE}")
|
disk_image_directory=$(dirname "${GLUSTERFS_DISK_IMAGE}")
|
||||||
mkdir -p $disk_image_directory
|
mkdir -p $disk_image_directory
|
||||||
create_disk ${GLUSTERFS_DISK_IMAGE} ${GLUSTERFS_DATA_DIR} ${GLUSTERFS_LOOPBACK_DISK_SIZE}
|
create_disk ${GLUSTERFS_DISK_IMAGE} ${GLUSTERFS_DATA_DIR} ${GLUSTERFS_LOOPBACK_DISK_SIZE}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user