diff options
author | Mohammed Junaid <junaid@redhat.com> | 2013-01-23 10:03:07 +0530 |
---|---|---|
committer | Peter Portante <peter.portante@redhat.com> | 2013-04-29 16:35:57 -0400 |
commit | 775492b49fc4e0e7a6103c9c1995116946aa113c (patch) | |
tree | 7e111e46f108a78153b924dc7b3e4faf485096ef /extras | |
parent | 1e9a2579a49b4e78632da58de90431d15e59b921 (diff) |
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 <junaid@redhat.com>
Reviewed-on: http://review.gluster.org/4417
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'extras')
-rwxr-xr-x | extras/hook-scripts/S40ufo-stop.py | 24 |
1 files changed, 24 insertions, 0 deletions
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") |