Whamcloud - gitweb
EX-5978 scripts: remove zfsobj2fid
authorJian Yu <yujian@whamcloud.com>
Wed, 21 Sep 2022 20:28:43 +0000 (13:28 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 23 Sep 2022 16:34:10 +0000 (16:34 +0000)
The zfsobj2fid utility is not needed on EXA cluster.

Test-Parameters: trivial clientdistro=el9.0 \
env=SANITY_EXCEPT="101j 130 244a" testlist=sanity

Change-Id: I40993c7c4ddef3f389c002076f5c118a9f610758
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/48621
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Gaurang Tapase <gtapase@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre.spec.in
lustre/scripts/Makefile.am
lustre/scripts/zfsobj2fid [deleted file]

index 159273f..7a50b09 100644 (file)
@@ -899,9 +899,6 @@ fi
 %exclude %{_sbindir}/wirecheck
 %exclude %{_sbindir}/wiretest
 %endif
-%if %{with zfs}
-%exclude %{_sbindir}/zfsobj2fid
-%endif
 %if %{with pumount}
 %exclude %{_sbindir}/pumount
 %endif
index 3ec741a..f3bd3c9 100644 (file)
@@ -76,10 +76,6 @@ scriptlib_SCRIPTS = haconfig
 scriptlib_DATA = lc_common
 endif # SERVER
 
-if ZFS_ENABLED
-sbin_SCRIPTS += zfsobj2fid
-endif
-
 if ENABLE_BASH_COMPLETION
 bashcompletiondir = $(BASH_COMPLETION_DIR)
 dist_bashcompletion_DATA = bash-completion/lustre bash-completion/lctl \
@@ -92,7 +88,7 @@ EXTRA_DIST = license-status lustre_rmmod ldev lc_mon lhbadm \
             lc_servip lustre_routes_config lustre_routes_conversion \
             $(addsuffix .in,$(genscripts)) lfs_migrate lustre_req_history \
             lustre lsvcgss lc_common haconfig Lustre.ha_v2 dkms.mkconf \
-            zfsobj2fid ko2iblnd-probe ksocklnd-config statechange-lustre.sh \
+            ko2iblnd-probe ksocklnd-config statechange-lustre.sh \
             bash-completion/lustre bash-completion/lctl bash-completion/lfs \
             umount.lustre
 
diff --git a/lustre/scripts/zfsobj2fid b/lustre/scripts/zfsobj2fid
deleted file mode 100755 (executable)
index f7ae96b..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env python2
-
-# Copyright (c) 2014, Lawrence Livermore National Security, LLC.
-# Produced at the Lawrence Livermore National Laboratory.
-# Written by Christopher J. Morrone <morrone2@llnl.gov>
-# LLNL-CODE-468512
-#
-# This file is part of lustre-tools-llnl.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (as published by the
-# Free Software Foundation) version 2, dated June 1991.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the IMPLIED WARRANTY OF
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# terms and conditions of the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-# Given a zfs dataset for a Lustre OST and the object number of a file
-# in that dataset, this script will call zdb to retreive the Lustre FID
-# and print it out in standard Lustre FID format.
-
-import sys
-import subprocess
-
-def from_bytes(b):
-    return sum(b[i] << i*8 for i in range(len(b)))
-
-def main():
-    if len(sys.argv) != 3:
-        print "Usage:", sys.argv[0], "<dataset> <object>"
-        return 1
-
-    p = subprocess.Popen(["zdb", "-e", "-vvv", sys.argv[1], sys.argv[2]],
-                          stdout=subprocess.PIPE)
-    pout, perr = p.communicate()
-
-    b = bytearray()
-    found_fid = False
-    for line in pout.split('\n'):
-        part = line.split()
-        if not part or part[0] != 'trusted.fid':
-            continue
-        fid = part[2]
-        found_fid = True
-        while len(fid) > 0:
-            val = fid[0]
-            fid = fid[1:]
-            if val == '\\':
-                val = fid[0:3]
-                fid = fid[3:]
-                b.append(int(val, 8))
-            else:
-                b.append(ord(val))
-        break
-
-    if not found_fid:
-        print "FID not found on", sys.argv[1], sys.argv[2]
-        return 1
-
-    print '[' \
-        + hex(from_bytes(b[0:8])) \
-        + ':' \
-        + hex(from_bytes(b[8:12])) \
-        + ':' \
-        + hex(from_bytes(b[12:16])) \
-        + ']'
-
-    return 0
-
-if __name__ == '__main__':
-      sys.exit(main())