summaryrefslogtreecommitdiffstats
path: root/extras/ganesha/scripts/generate-epoch.py
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 /extras/ganesha/scripts/generate-epoch.py
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>
Diffstat (limited to 'extras/ganesha/scripts/generate-epoch.py')
-rwxr-xr-xextras/ganesha/scripts/generate-epoch.py48
1 files changed, 0 insertions, 48 deletions
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)