From 775492b49fc4e0e7a6103c9c1995116946aa113c Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 23 Jan 2013 10:03:07 +0530 Subject: object-storage: Store the lock file in /var/run/swift. * Openstack swift uses the /var/run/swift directory to store the pid files for all the servers. * Also, added a script that would unmount the gluster client on a volume stop. Change-Id: Ib5b9a2964987ca7696d9a2570f1f7af8490b2168 BUG: 861497 Signed-off-by: Mohammed Junaid Reviewed-on: http://review.gluster.org/4417 Reviewed-by: Peter Portante Tested-by: Gluster Build System Reviewed-by: Anand Avati --- extras/hook-scripts/S40ufo-stop.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 extras/hook-scripts/S40ufo-stop.py (limited to 'extras/hook-scripts') diff --git a/extras/hook-scripts/S40ufo-stop.py b/extras/hook-scripts/S40ufo-stop.py new file mode 100755 index 0000000..107f196 --- /dev/null +++ b/extras/hook-scripts/S40ufo-stop.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +import os +from optparse import OptionParser + +if __name__ == '__main__': + # check if swift is installed + try: + from gluster.swift.common.Glusterfs import get_mnt_point, unmount + except ImportError: + import sys + sys.exit("Openstack Swift does not appear to be installed properly"); + + op = OptionParser(usage="%prog [options...]") + op.add_option('--volname', dest='vol', type=str) + op.add_option('--last', dest='last', type=str) + (opts, args) = op.parse_args() + + + mnt_point = get_mnt_point(opts.vol) + if mnt_point: + unmount(mnt_point) + else: + sys.exit("get_mnt_point returned none for mount point") -- cgit