summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2017-02-01 07:50:17 -0500
committerKaleb KEITHLEY <kkeithle@redhat.com>2017-03-21 13:14:30 -0400
commit0cf2963f12a8b540a7042605d8c79f638fdf6cee (patch)
treeb8c84847c2577a0f8ffc5b3d442316d6da5794f4
parent843e1b04b554ab887ec656ae7b468bb93ee4e2f7 (diff)
packaging: (ganesha) remove glusterfs-ganesha subpackage and related files)
Indiana Jones and the Temple of Ganesha HA, part two. remove glsuterfs-ganesha subpackage, superceded by storhaug Change-Id: I42a1fc59159add108d77080b9b130696216aa76d BUG: 1418417 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/16506 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
-rw-r--r--configure.ac3
-rw-r--r--extras/Makefile.am2
-rw-r--r--extras/ganesha/Makefile.am2
-rw-r--r--extras/ganesha/config/Makefile.am4
-rw-r--r--extras/ganesha/config/ganesha-ha.conf.sample19
-rw-r--r--extras/ganesha/scripts/Makefile.am4
-rwxr-xr-xextras/ganesha/scripts/create-export-ganesha.sh91
-rwxr-xr-xextras/ganesha/scripts/dbus-send.sh61
-rwxr-xr-xextras/ganesha/scripts/generate-epoch.py48
-rw-r--r--extras/hook-scripts/start/post/Makefile.am2
-rwxr-xr-xextras/hook-scripts/start/post/S31ganesha-start.sh122
-rw-r--r--glusterfs.spec.in29
12 files changed, 6 insertions, 381 deletions
diff --git a/configure.ac b/configure.ac
index cc723bfba16..c7b6c38c002 100644
--- a/configure.ac
+++ b/configure.ac
@@ -220,9 +220,6 @@ AC_CONFIG_FILES([Makefile
extras/init.d/glustereventsd-Debian
extras/init.d/glustereventsd-Redhat
extras/init.d/glustereventsd-FreeBSD
- extras/ganesha/Makefile
- extras/ganesha/config/Makefile
- extras/ganesha/scripts/Makefile
extras/systemd/Makefile
extras/systemd/glusterd.service
extras/systemd/glustereventsd.service
diff --git a/extras/Makefile.am b/extras/Makefile.am
index 9dfc93d2411..29f7222203d 100644
--- a/extras/Makefile.am
+++ b/extras/Makefile.am
@@ -5,7 +5,7 @@ EditorModedir = $(docdir)
EditorMode_DATA = glusterfs-mode.el glusterfs.vim
SUBDIRS = init.d systemd benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM \
- $(GEOREP_EXTRAS_SUBDIR) ganesha snap_scheduler firewalld cliutils
+ $(GEOREP_EXTRAS_SUBDIR) snap_scheduler firewalld cliutils
confdir = $(sysconfdir)/glusterfs
conf_DATA = glusterfs-logrotate gluster-rsyslog-7.2.conf gluster-rsyslog-5.8.conf \
diff --git a/extras/ganesha/Makefile.am b/extras/ganesha/Makefile.am
deleted file mode 100644
index 542de68156b..00000000000
--- a/extras/ganesha/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-SUBDIRS = scripts config
-CLEANFILES =
diff --git a/extras/ganesha/config/Makefile.am b/extras/ganesha/config/Makefile.am
deleted file mode 100644
index c729273096e..00000000000
--- a/extras/ganesha/config/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-EXTRA_DIST= ganesha-ha.conf.sample
-
-confdir = $(sysconfdir)/ganesha
-conf_DATA = ganesha-ha.conf.sample
diff --git a/extras/ganesha/config/ganesha-ha.conf.sample b/extras/ganesha/config/ganesha-ha.conf.sample
deleted file mode 100644
index c22892bde56..00000000000
--- a/extras/ganesha/config/ganesha-ha.conf.sample
+++ /dev/null
@@ -1,19 +0,0 @@
-# Name of the HA cluster created.
-# must be unique within the subnet
-HA_NAME="ganesha-ha-360"
-#
-# N.B. you may use short names or long names; you may not use IP addrs.
-# Once you select one, stay with it as it will be mildly unpleasant to
-# clean up if you switch later on. Ensure that all names - short and/or
-# long - are in DNS or /etc/hosts on all machines in the cluster.
-#
-# The subset of nodes of the Gluster Trusted Pool that form the ganesha
-# HA cluster. Hostname is specified.
-HA_CLUSTER_NODES="server1,server2,..."
-#HA_CLUSTER_NODES="server1.lab.redhat.com,server2.lab.redhat.com,..."
-#
-# Virtual IPs for each of the nodes specified above.
-VIP_server1="10.0.2.1"
-VIP_server2="10.0.2.2"
-#VIP_server1_lab_redhat_com="10.0.2.1"
-#VIP_server2_lab_redhat_com="10.0.2.2"
diff --git a/extras/ganesha/scripts/Makefile.am b/extras/ganesha/scripts/Makefile.am
deleted file mode 100644
index 9ee8867ebcc..00000000000
--- a/extras/ganesha/scripts/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-EXTRA_DIST= create-export-ganesha.sh generate-epoch.py dbus-send.sh
-
-scriptsdir = $(libexecdir)/ganesha
-scripts_SCRIPTS = create-export-ganesha.sh generate-epoch.py
diff --git a/extras/ganesha/scripts/create-export-ganesha.sh b/extras/ganesha/scripts/create-export-ganesha.sh
deleted file mode 100755
index 1ffba427457..00000000000
--- a/extras/ganesha/scripts/create-export-ganesha.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-
-#This script is called by glusterd when the user
-#tries to export a volume via NFS-Ganesha.
-#An export file specific to a volume
-#is created in GANESHA_DIR/exports.
-
-# Try loading the config from any of the distro
-# specific configuration locations
-if [ -f /etc/sysconfig/ganesha ]
- then
- . /etc/sysconfig/ganesha
-fi
-if [ -f /etc/conf.d/ganesha ]
- then
- . /etc/conf.d/ganesha
-fi
-if [ -f /etc/default/ganesha ]
- then
- . /etc/default/ganesha
-fi
-
-GANESHA_DIR=${1%/}
-OPTION=$2
-VOL=$3
-CONF=$GANESHA_DIR"/ganesha.conf"
-declare -i EXPORT_ID
-
-function check_cmd_status()
-{
- if [ "$1" != "0" ]
- then
- rm -rf $GANESHA_DIR/exports/export.$VOL.conf
- sed -i /$VOL.conf/d $CONF
- exit 1
- fi
-}
-
-
-if [ ! -d "$GANESHA_DIR/exports" ];
- then
- mkdir $GANESHA_DIR/exports
- check_cmd_status `echo $?`
-fi
-
-function write_conf()
-{
-echo -e "# WARNING : Using Gluster CLI will overwrite manual
-# changes made to this file. To avoid it, edit the
-# file and run ganesha-ha.sh --refresh-config."
-
-echo "EXPORT{"
-echo " Export_Id = 2;"
-echo " Path = \"/$VOL\";"
-echo " FSAL {"
-echo " name = "GLUSTER";"
-echo " hostname=\"localhost\";"
-echo " volume=\"$VOL\";"
-echo " }"
-echo " Access_type = RW;"
-echo " Disable_ACL = true;"
-echo ' Squash="No_root_squash";'
-echo " Pseudo=\"/$VOL\";"
-echo ' Protocols = "3", "4" ;'
-echo ' Transports = "UDP","TCP";'
-echo ' SecType = "sys";'
-echo " }"
-}
-if [ "$OPTION" = "on" ];
-then
- if ! (cat $CONF | grep $VOL.conf\"$ )
- then
- write_conf $@ > $GANESHA_DIR/exports/export.$VOL.conf
- echo "%include \"$GANESHA_DIR/exports/export.$VOL.conf\"" >> $CONF
- count=`ls -l $GANESHA_DIR/exports/*.conf | wc -l`
- if [ "$count" = "1" ] ; then
- EXPORT_ID=2
- else
- EXPORT_ID=`cat $GANESHA_DIR/.export_added`
- check_cmd_status `echo $?`
- EXPORT_ID=EXPORT_ID+1
- sed -i s/Export_Id.*/"Export_Id= $EXPORT_ID ;"/ \
- $GANESHA_DIR/exports/export.$VOL.conf
- check_cmd_status `echo $?`
- fi
- echo $EXPORT_ID > $GANESHA_DIR/.export_added
- fi
-else
- rm -rf $GANESHA_DIR/exports/export.$VOL.conf
- sed -i /$VOL.conf/d $CONF
-fi
diff --git a/extras/ganesha/scripts/dbus-send.sh b/extras/ganesha/scripts/dbus-send.sh
deleted file mode 100755
index c071d03480c..00000000000
--- a/extras/ganesha/scripts/dbus-send.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-# Try loading the config from any of the distro
-# specific configuration locations
-if [ -f /etc/sysconfig/ganesha ]
- then
- . /etc/sysconfig/ganesha
-fi
-if [ -f /etc/conf.d/ganesha ]
- then
- . /etc/conf.d/ganesha
-fi
-if [ -f /etc/default/ganesha ]
- then
- . /etc/default/ganesha
-fi
-
-GANESHA_DIR=${1%/}
-OPTION=$2
-VOL=$3
-CONF=$GANESHA_DIR"/ganesha.conf"
-
-function check_cmd_status()
-{
- if [ "$1" != "0" ]
- then
- logger "dynamic export failed on node :${hostname -s}"
- fi
-}
-
-#This function keeps track of export IDs and increments it with every new entry
-function dynamic_export_add()
-{
- dbus-send --system \
---dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \
-org.ganesha.nfsd.exportmgr.AddExport string:$GANESHA_DIR/exports/export.$VOL.conf \
-string:"EXPORT(Path=/$VOL)"
- check_cmd_status `echo $?`
-}
-
-#This function removes an export dynamically(uses the export_id of the export)
-function dynamic_export_remove()
-{
- removed_id=`cat $GANESHA_DIR/exports/export.$VOL.conf |\
-grep Export_Id | awk -F"[=,;]" '{print$2}'| tr -d '[[:space:]]'`
- dbus-send --print-reply --system \
---dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \
-org.ganesha.nfsd.exportmgr.RemoveExport uint16:$removed_id
- check_cmd_status `echo $?`
-}
-
-if [ "$OPTION" = "on" ];
-then
- dynamic_export_add $@
-fi
-
-if [ "$OPTION" = "off" ];
-then
- dynamic_export_remove $@
-fi
-
diff --git a/extras/ganesha/scripts/generate-epoch.py b/extras/ganesha/scripts/generate-epoch.py
deleted file mode 100755
index 5db5e56b480..00000000000
--- a/extras/ganesha/scripts/generate-epoch.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
-# This file is part of GlusterFS.
-#
-# This file is licensed to you under your choice of the GNU Lesser
-# General Public License, version 3 or any later version (LGPLv3 or
-# later), or the GNU General Public License, version 2 (GPLv2), in all
-# cases as published by the Free Software Foundation.
-#
-# Generates unique epoch value on each gluster node to be used by
-# nfs-ganesha service on that node.
-#
-# Configure 'EPOCH_EXEC' option to this script path in
-# '/etc/sysconfig/ganesha' file used by nfs-ganesha service.
-#
-# Construct epoch as follows -
-# first 32-bit contains the now() time
-# rest 32-bit value contains the local glusterd node uuid
-
-import time
-import binascii
-
-# Calculate the now() time into a 64-bit integer value
-def epoch_now():
- epoch_time = int(time.mktime(time.localtime())) << 32
- return epoch_time
-
-# Read glusterd UUID and extract first 32-bit of it
-def epoch_uuid():
- file_name = '/var/lib/glusterd/glusterd.info'
-
- for line in open(file_name):
- if "UUID" in line:
- glusterd_uuid = line.split('=')[1].strip()
-
- uuid_bin = binascii.unhexlify(glusterd_uuid.replace("-",""))
-
- epoch_uuid = int(uuid_bin.encode('hex'), 32) & 0xFFFF0000
- return epoch_uuid
-
-# Construct epoch as follows -
-# first 32-bit contains the now() time
-# rest 32-bit value contains the local glusterd node uuid
-epoch = (epoch_now() | epoch_uuid())
-print str(epoch)
-
-exit(0)
diff --git a/extras/hook-scripts/start/post/Makefile.am b/extras/hook-scripts/start/post/Makefile.am
index 03bb300c5c2..384a5822a0c 100644
--- a/extras/hook-scripts/start/post/Makefile.am
+++ b/extras/hook-scripts/start/post/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = S29CTDBsetup.sh S30samba-start.sh S31ganesha-start.sh
+EXTRA_DIST = S29CTDBsetup.sh S30samba-start.sh
hookdir = $(GLUSTERD_WORKDIR)/hooks/1/start/post/
hook_SCRIPTS = $(EXTRA_DIST)
diff --git a/extras/hook-scripts/start/post/S31ganesha-start.sh b/extras/hook-scripts/start/post/S31ganesha-start.sh
deleted file mode 100755
index 90ba6bc73a5..00000000000
--- a/extras/hook-scripts/start/post/S31ganesha-start.sh
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/bash
-PROGNAME="Sganesha-start"
-OPTSPEC="volname:,gd-workdir:"
-VOL=
-declare -i EXPORT_ID
-ganesha_key="ganesha.enable"
-GANESHA_DIR="/var/run/gluster/shared_storage/nfs-ganesha"
-CONF1="$GANESHA_DIR/ganesha.conf"
-GLUSTERD_WORKDIR=
-
-function parse_args ()
-{
- ARGS=$(getopt -l $OPTSPEC -o "o" -name $PROGNAME $@)
- eval set -- "$ARGS"
-
- while true; do
- case $1 in
- --volname)
- shift
- VOL=$1
- ;;
- --gd-workdir)
- shift
- GLUSTERD_WORKDIR=$1
- ;;
- *)
- shift
- break
- ;;
- esac
- shift
- done
-}
-
-
-
-#This function generates a new export entry as export.volume_name.conf
-function write_conf()
-{
-echo -e "# WARNING : Using Gluster CLI will overwrite manual
-# changes made to this file. To avoid it, edit the
-# file, copy it over to all the NFS-Ganesha nodes
-# and run ganesha-ha.sh --refresh-config."
-
-echo "EXPORT{"
-echo " Export_Id = 2;"
-echo " Path = \"/$VOL\";"
-echo " FSAL {"
-echo " name = \"GLUSTER\";"
-echo " hostname=\"localhost\";"
-echo " volume=\"$VOL\";"
-echo " }"
-echo " Access_type = RW;"
-echo " Disable_ACL = true;"
-echo " Squash=\"No_root_squash\";"
-echo " Pseudo=\"/$VOL\";"
-echo " Protocols = \"3\", \"4\" ;"
-echo " Transports = \"UDP\",\"TCP\";"
-echo " SecType = \"sys\";"
-echo "}"
-}
-
-#It adds the export dynamically by sending dbus signals
-function export_add()
-{
- dbus-send --print-reply --system --dest=org.ganesha.nfsd \
-/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \
-string:$GANESHA_DIR/exports/export.$VOL.conf string:"EXPORT(Export_Id=$EXPORT_ID)"
-
-}
-
-# based on src/scripts/ganeshactl/Ganesha/export_mgr.py
-function is_exported()
-{
- local volume="${1}"
-
- dbus-send --type=method_call --print-reply --system \
- --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \
- org.ganesha.nfsd.exportmgr.ShowExports \
- | grep -w -q "/${volume}"
-
- return $?
-}
-
-# Check the info file (contains the volume options) to see if Ganesha is
-# enabled for this volume.
-function ganesha_enabled()
-{
- local volume="${1}"
- local info_file="${GLUSTERD_WORKDIR}/vols/${VOL}/info"
- local enabled="off"
-
- enabled=$(grep -w ${ganesha_key} ${info_file} | cut -d"=" -f2)
-
- [ "${enabled}" == "on" ]
-
- return $?
-}
-
-parse_args $@
-
-if ganesha_enabled ${VOL} && ! is_exported ${VOL}
-then
- if [ ! -e ${GANESHA_DIR}/exports/export.${VOL}.conf ]
- then
- #Remove export entry from nfs-ganesha.conf
- sed -i /$VOL.conf/d $CONF1
- write_conf ${VOL} > ${GANESHA_DIR}/exports/export.${VOL}.conf
- EXPORT_ID=`cat $GANESHA_DIR/.export_added`
- EXPORT_ID=EXPORT_ID+1
- echo $EXPORT_ID > $GANESHA_DIR/.export_added
- sed -i s/Export_Id.*/"Export_Id=$EXPORT_ID;"/ \
- $GANESHA_DIR/exports/export.$VOL.conf
- echo "%include \"$GANESHA_DIR/exports/export.$VOL.conf\"" >> $CONF1
- else
- EXPORT_ID=$(grep ^[[:space:]]*Export_Id $GANESHA_DIR/exports/export.$VOL.conf |\
- awk -F"[=,;]" '{print $2}' | tr -d '[[:space:]]')
- fi
- export_add $VOL
-fi
-
-exit 0
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index afe9fcd84fa..134af07707c 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -236,6 +236,7 @@ Obsoletes: hekafs
Obsoletes: %{name}-common < %{version}-%{release}
Obsoletes: %{name}-core < %{version}-%{release}
Obsoletes: %{name}-ufo
+Obsoletes: %{name}-ganesha
Provides: %{name}-common = %{version}-%{release}
Provides: %{name}-core = %{version}-%{release}
@@ -369,26 +370,6 @@ is in user space and easily manageable.
This package provides support to FUSE based clients and inlcudes the
glusterfs(d) binary.
-%package ganesha
-Summary: NFS-Ganesha configuration
-Group: Applications/File
-
-Requires: %{name}-server%{?_isa} = %{version}-%{release}
-Requires: nfs-ganesha-gluster >= 2.4.1
-Requires: dbus
-
-%description ganesha
-GlusterFS is a distributed file-system capable of scaling to several
-petabytes. It aggregates various storage bricks over Infiniband RDMA
-or TCP/IP interconnect into one large parallel network file
-system. GlusterFS is one of the most sophisticated file systems in
-terms of features and extensibility. It borrows a powerful concept
-called Translators from GNU Hurd kernel. Much of the code in GlusterFS
-is in user space and easily manageable.
-
-This package provides the configuration and related files for using
-NFS-Ganesha as the NFS server using GlusterFS
-
%if ( 0%{!?_without_georeplication:1} )
%package geo-replication
Summary: GlusterFS Geo-replication
@@ -1056,11 +1037,6 @@ exit 0
%endif
%endif
-%files ganesha
-%{_sysconfdir}/ganesha/*
-%{_libexecdir}/ganesha/*
-%{_sharedstatedir}/glusterd/hooks/1/start/post/S31ganesha-start.sh
-
%if ( 0%{!?_without_georeplication:1} )
%files geo-replication
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterfs-georep
@@ -1277,6 +1253,9 @@ exit 0
* Thu Feb 16 2017 Niels de Vos <ndevos@redhat.com>
- Obsolete and Provide python-gluster for upgrading from glusterfs < 3.10
+* Wed Feb 7 2017 Kaleb S. KEITHLEY <kkeithle@redhat.com>
+- remove ganesha (#1418417)
+
* Wed Feb 1 2017 Poornima G <pgurusid@redhat.com>
- Install /var/lib/glusterd/groups/metadata-cache by default