aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2016-07-25 12:26:42 +0530
committerBryn M. Reeves <bmr@redhat.com>2017-01-17 16:51:46 +0000
commitdaaddf7c3b1a2530029102863062110489154deb (patch)
tree758f3c01cdf31f4abfe75ba6697a0fceb7eafd6b
parent5c2332cad833778f0816dbb004b4fdb2489f021f (diff)
downloadsos-daaddf7c3b1a2530029102863062110489154deb.tar.gz
[nfsganesha] Add nfsganesha file server support
Included a plugin to collect the below information about NFS-Ganesha file server provided nfs-ganesha package is installed. Configuration files: "/etc/ganesha/*" "/etc/sysconfig/ganesha" "/var/run/sysconfig/ganesha" Log files: "/var/log/ganesha.log" "/var/log/ganesha-gfapi.log" (used by FSAL_GLUSTER) Output of below commands: -"dbus-send --type=method_call --print-reply" " --system --dest=org.ganesha.nfsd " "/org/ganesha/nfsd/ExportMgr " "org.ganesha.nfsd.exportmgr.ShowExports" Output of below commands is already covered under sunrpc and nfsserver plugins - -"rpcinfo -p localhost" -"showmount -e localhost" Also it is recommended to move FSAL specific configuration files under specific FSAL plugin. Hence added below nfs-ganesha/gluster related config to gluster plugin - -"/var/run/gluster/shared_storage/nfs-ganesha/" (nfs-ganesha configuration) Signed-off-by: Soumya Koduri <skoduri@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com> Closes: #386, #858.
-rw-r--r--sos/plugins/gluster.py4
-rw-r--r--sos/plugins/nfsganesha.py44
2 files changed, 47 insertions, 1 deletions
diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py
index a303f818..47fb40de 100644
--- a/sos/plugins/gluster.py
+++ b/sos/plugins/gluster.py
@@ -91,7 +91,9 @@ class Gluster(Plugin, RedHatPlugin):
"/etc/glusterd.rpmsave",
# common to all versions
"/etc/glusterfs",
- "/var/lib/glusterd/"
+ "/var/lib/glusterd/",
+ # collect nfs-ganesha related configuration
+ "/var/run/gluster/shared_storage/nfs-ganesha/"
] + glob.glob('/var/run/gluster/*tier-dht/*'))
# collect logs - apply log_size for any individual file
diff --git a/sos/plugins/nfsganesha.py b/sos/plugins/nfsganesha.py
new file mode 100644
index 00000000..9894dd39
--- /dev/null
+++ b/sos/plugins/nfsganesha.py
@@ -0,0 +1,44 @@
+# 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; either version 2 of the License, or
+# (at your option) any later version.
+
+# 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
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+
+
+class NfsGanesha(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ """NFS-Ganesha file server information
+ """
+ plugin_name = 'nfsganesha'
+ profiles = ('storage', 'network', 'nfs')
+ packages = ('nfs-ganesha')
+
+ def setup(self):
+ self.add_copy_spec([
+ "/etc/ganesha",
+ "/etc/sysconfig/ganesha",
+ "/var/run/sysconfig/ganesha",
+ "/var/log/ganesha.log",
+ "/var/log/ganesha-gfapi.log"
+ ])
+
+ self.add_cmd_output([
+ "dbus-send --type=method_call --print-reply"
+ " --system --dest=org.ganesha.nfsd "
+ "/org/ganesha/nfsd/ExportMgr "
+ "org.ganesha.nfsd.exportmgr.ShowExports"
+ ])
+
+ return
+
+
+# vim: set et ts=4 sw=4 :